Skip to content

An Elixir library for generating NAPLPS graphics files.

License

Notifications You must be signed in to change notification settings

rrcook/naplps_writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NaplpsWriter

This project is an Elixir implementation of a library to create NAPLPS graphics files. NAPLPS is the graphics format used in the Prodigy Online system, revived at The Prodigy Reloaded project.

This code

  import NaplpsWriter
  use NaplpsConstants
  ...
      gcu_init()
      |> append_byte(@cmd_shift_in)
      |> select_color(@color_blue)
      |> draw(@cmd_set_point_abs, {75 / 256, 75 / 256})
      |> draw(@cmd_line_rel, [
        {25 / 256, 100 / 256},
        {50 / 256, -100 / 256},
        {-90 / 256, 55 / 256},
        {100 / 256, 0 / 256},
        {-85 / 256, -55 / 256}
      ])
      |> draw(@cmd_set_point_rel, [])

will produce a drawing

Blue star drawn in GCU NAPLPS drawing program

Installation

If available in Hex, the package can be installed by adding naplps_writer to your list of dependencies in mix.exs:

def deps do
  [
    {:naplps_writer, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/naplps_writer.

About

An Elixir library for generating NAPLPS graphics files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages