# Prod Notes
>to get terminal output open the .app contents directly and run the WinterMoon executable, otherwise it will be gui only

# Build Notes
>lua *must* be installed to compile as index.cpp is not a valid cpp file

>lua is used to run injector.lua (injects library versions) and macapp.lua (generates the Info.plst file for the mac .app package)

**do not attempt to compile without the makefile as nothing will work**

# makefile Options
* : Compile debug for Host OS environment
* mac: Compile production for macOS !requires Macho host environment!
* bsd: Compile debug for generic unix !requires same host environment as target!
* amiga: Compile for Amiga OS 4.1
* windows: Compile for Windows NT ppc
* linux: Compile debug for linux !requires ELF host environment!
* preclean: Tidy up project root
* binary: Build the app executable and run C++ injections script
* plst: Assemble the macOS app index
* app: Build the macOS app !requires macho host environ!
* distr: Prepare macOS app for distribution
* clean: Remove object files for cleanlyness
* error: Display error message

# RenderTask Options
>All supplied objects to the render queue will be rendered in push order, please specify a position for specifc render order
>Identifiers do not need to be in english, only object types
## .indentifier
* string to identify what this render task is
## .surface
* normally push `NULL`, otherwise include raw SDL surface to bypass render processing
## .text
* default string data
## .text2
* extension string data
## .x
* number for x position to draw
## .y
* number for y position to draw
## .w
* number width to draw to
## .h
* number height to draw to
## .r
* number red value
## .g
* number green value
## .b
* number blue value
## .a
* number opacity value
## .type
* "delete": remove all render entries with a matching .identifier, any .surface data will also be freed from memory and the previous frame will render instead
`renderQueueP.push_back(RenderTask {"background", NULL, "", "", 0, 0, 0, 0, 0, 0, 0, 0, "delete"});`
* "rect": replace the default framebuffer with a colour of .r .g .b
`renderQueueP.push_back(RenderTask {"background", NULL, "", "", 0, 0, 0, 0, 255, 90, 120, 0, "rect"});`
* "image": draw an image to the screen at .x .y position, if no raw image data in provided in .surface then a .bmp will be loaded into .surface from .text
`renderQueueP.push_back(RenderTask {"lavenderch", NULL, "<root dir>Resources/package/resource/lavender.bmp", "", 100, 50, 0, 0, 0, 0, 0, 0, "image"});`
* "text": draw text to .surface then render to the screen at .x .y with .r .g .b colour and .a opacity, optionally provide a .surface image data instead to skip processing
`renderQueueP.push_back(RenderTask {"hello", NULL, "hello world", "", 0, 0, 0, 0, 0, 0, 0, 255, "text"});`
* "slide": same function as "text" but pushes to the screen 1 character per frame until matching .text and .text2, upon matching change .type to "text"
`renderQueueP.push_back(RenderTask {"hello", NULL, "", "hello world", 0, 0, 0, 0, 0, 0, 0, 255, "slide"});`
`renderQueueP.push_back(RenderTask {"hello", NULL, "hello", "hello world", 0, 0, 0, 0, 0, 0, 0, 255, "slide"});`