Useful Routines

From WikiPrizm
Revision as of 20:47, 17 April 2014 by ProgrammerNerd (talk | contribs) (→‎Graphical Routines: Minor correction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This will soon be populated with routines and child pages; in the meantime, please visit the following Cemetech thread:

Keyboard Routines

Hardware Interface Routines

Graphical Routines

  • CopySpriteMaskedAlpha - Copy a sprite with an alpha mask onto the screen
  • HeightColor - Convert a value between a maximum and a minimum value into a color.
  • DrawDialog - Draws a DCS SmallWindow-style dialog box
  • MakeGray - Make a 5-6-5 color gray
  • DrawLine - Draws a line. Uses the Bresenham line algorithm
  • Plot - Draw a point of color
  • FillArea - Fill a rectangular area of VRAM
  • Non-blocking DMA - Do other stuff while drawing to the screen.

SourceCoder-Compatible Sprites/Images

These routines work particularly well with the 8-bit, 2-bit, and 1-bit indexed data output from SourceCoder.


  • PrintMiniFix - Print a text on the screen in mini/small (glyph) font


  • Menu - Displays a menu system similar to Geometry plugin's one and returns the selected value.

Math Routines

  • floor - Implementation of math.floor (PrizmSDK does not have a math.floor)