// TODO: Write/read all untyped... data to/from ROM
int untypedGamestate[] = {
0, // Previous time, to keep track of game time/framerate.
0, // Player position x.
0, // Player position y.
0, // Player R color value.
0, // Player G color value.
255, // Player B color value.
};
int untypedValues[][3] = {
// ID, Type, Value
{0, 0, 0}, // Move up button value
{1, 0, 1}, // Move right button value
{2, 0, 2}, // Move down button value
{3, 0, 3}, // Move left button value
{4, 3, 1}, // True/1
{5, 3, 0}, // False/0
{6, 4, 0}, // Current millis since game start
{7, 2, 0}, // Gamestate previous time
{8, 2, 1}, // Gamestate player x
{9, 2, 2}, // Gamestate player y
{10, 2, 3}, // Gamestate player r color
{11, 2, 4}, // Gamestate player g color
{12, 2, 5}, // Gamestate player b color
{13, 3, 1}, // Move player up after button press boundary check
{14, 1, 0}, // System config screen width
{15, 1, 1}, // System config screen height
{16, 3, 3}, // Move player down after button press boundary check
{17, 3, 5}, // Move player left after button press boundary check
{18, 3, 7}, // Move player right after button press boundary check
}
int untypedCalculations[][5] = {
// ID, ending, valueLeftID, calculationRightID, calculationOperator
{0, 0, 9, 1, 1}, // Current player y position - 1
{1, 1, 4, 0, 0}, // True/1
{2, 1, 0, 0, 0}, // Up button
{3, 1, 2, 0, 0}, // Down button
{4, 1, 5, 0, 0}, // False/0
{5, 1, 9, 0, 0}, // Current player y position
{6, 0, 15, 1, 1} // screenheight - 1
{7, 0, 9, 1, 0}, // Current player y position + 1
{8, 1, 3, 0, 0}, // Left button
{9, 1, 1, 0, 0}, // Right button
{10, 1, 8, 0, 0}, // Current player x position
{11, 0, 8, 1, 0}, // Current player x position + 1
{12, 0, 8, 1, 1}, // Current player x position - 1
{13, 0, 14, 1, 1} // screenwidth - 1
}
int untypedInstructions[][10] = {
// ID, rootInstruction, conditionCalculationLeftID, conditionCalculationRightID, conditionOperator, conditionSuccesValueLeftID,
// conditionSuccessCalculationRightID, hasFailedCondition, conditionFailedValueLeftID, conditionFailedCalculationRightID
{0, 1, 2, 1, 0, 13, 0, 0, 0, 0}, // move player up when up button is pressed.
{1, 0, 5, 4, 1, 9, 0, 0, 0, 0}, // move the player up when the boundary is not reached.
{2, 1, 3, 1, 0, 16, 0, 0, 0, 0}, // move player down when down button is pressed.
{3, 0, 5, 6, 1, 9, 7, 0, 0, 0} // move the player down when the boundary is not reached.
{4, 1, 8, 1, 0, 17, 0, 0, 0, 0}, // move player left when left button is pressed.
{5, 0, 10, 4, 1, 8, 12, 0, 0, 0}, // move the player left when the boundary is not reached.
{6, 1, 9, 1, 0, 18, 0, 0, 0, 0}, // move player right when right button is pressed.
{7, 0, 10, 13, 1, 8, 11, 0, 0, 0}, // move the player right when the boundary is not reached.
};