COCKPIT OVERLAY SCRIPTING FOR SECONDWIND WIDE

- Cockpits are stored in the game's directory under a new folder called COCKPITS.
- In the COCKPITS folder, every folder represents a different cockpit.
- The cockpit's actual folder should contain a "textures" folder for the assets, "cockpit.lua" for the scripting and "info.txt" for information.


info.txt
	The "info.txt" file should contain "name", "year" and "credits" followed by a string without quotation marks. Right now these are not used by the program but may come useful in the future for any kind of GUI.


cockpit.lua
-- You should define your textures outside any functions like this
	local cockpitTex

-- Since this is an actual lua script, you can define any arbitrary variable you want to use later.

-- The lua script should contain 3 functions.

-- The 'config' function may contain the following sub functions. This is only called once when the program starts.
function config()
	HideCockpit_All() -- Hides all the default cockpit graphics.
	HideCockpit_Rim() -- Hides only the outer rim of the cockpit which gets colored based on the user settings.
	HideCockpit_Dashboard() -- Hides the inner area of the cockpit.
	HideCockpit_Mirrors() -- Hides the mirror graphics.
	HideCockpit_Windshield() -- Hides the windshield graphics.
	HideCockpit_LCD() -- Hides the LCD display.
end

-- The 'load' function. This is only called once when the program starts to load the assets.
function load()
	-- You can load textures like this. The full path is automatically added.
	cockpitTex = rl.LoadTexture("lola87.png")
end

-- The 'cockpit' function. This is called every frame and should contain the drawing logic for the cockpit.
function cockpit()

end

	In the cockpit function, you can use the following functions:

DRAW FUNCTIONS:
IMPORTANT: Texture coordinates are used in the Nx480 virtual space regardless of the current window size.
The coordinate system starts at the bottom-center of the screen.
Y grows upwards.
X goes negative towards the left, positive towards the right.
CTRL+F1 turns on the helper that shows the coordinates of the mouse pointer in the virtual space. Don't resize the window when this is used.
The default origin of the textures is the center-bottom of the image.

rl.DrawTexture(texture, x, y)
rl.DrawTextureEx(texture, x, y, originX, originY, rotation)

COLOR FUNCTIONS:
rl.ResetColor() -- Resets the color to white (non-tinted).
rl.SetCockpitColor() -- Sets the color to the custom cockpit color defined in the user's config.
rl.SetMirrorColor() -- Sets the mirror color to the custom mirror color defined in the user's config.
rl.SetColor(R, G, B)
rl.SetAlpha(A)

IMPORTANT: The color is a state machine. Once set, it stays that way until set again.

MEMORY FUNCTIONS:
returnValue = ReadMem8(address)
returnValue = ReadMem16(address)
returnValue = ReadMem32(address)



