spacetaxi/stHookTables.h
2026-10-13 13:56:35 -05:00

111 lines
4 KiB
C

// Space Taxi -- where each level's hook program keeps its tables.
//
// Every address is a byte in the level's shipped hook blob ($7D98..$80CA,
// StLevelT.hookData), so the same numbers serve the hook programs
// (stHooks.c, reading through the live simulation) and the cel manifest
// (stLevelCels.c, reading the level file alone -- the offline cel baker
// has no simulation). One list, two readers.
#ifndef ST_HOOK_TABLES_H
#define ST_HOOK_TABLES_H
// Level indices (0 = A).
#define ST_LEVEL_E 4u
#define ST_LEVEL_F 5u
#define ST_LEVEL_G 6u
#define ST_LEVEL_H 7u
#define ST_LEVEL_I 8u
#define ST_LEVEL_J 9u
#define ST_LEVEL_K 10u
#define ST_LEVEL_L 11u
#define ST_LEVEL_O 14u
#define ST_LEVEL_P 15u
#define ST_LEVEL_Q 16u
#define ST_LEVEL_R 17u
#define ST_LEVEL_S 18u
#define ST_LEVEL_T 19u
#define ST_LEVEL_U 20u
#define ST_LEVEL_V 21u
#define ST_LEVEL_W 22u
#define ST_LEVEL_X 23u
#define ST_LEVEL_Y 24u
// The level header's shared sprite multicolours ($7D05/$7D06 -> $D025/$D026).
#define ST_HDR_SPRITE_MC0 5u
#define ST_HDR_SPRITE_MC1 6u
// Hardware sprites 3..7 are the hook sprites on every level that has any.
#define ST_HOOK_FIRST_SPRITE 3u
// ---- level F "TAXI PONG" ----
#define ST_HK_F_SPRITE 3u // the ball
#define ST_HK_F_CEL 0x80u
#define ST_HK_F_COLOR 1u
// ---- level G "TELEPORTS" ----
#define ST_HK_G_CEL 0x7DD4u // 6 cels the orbs cycle through
#define ST_HK_G_CEL_PHASES 6u
#define ST_HK_G_ORB_COL 0x7DDAu // per sprite: start column, msb, row
#define ST_HK_G_ORB_MSB 0x7DE2u
#define ST_HK_G_ORB_ROW 0x7DEAu
#define ST_HK_G_SPOT_COL 0x7EF3u // 5 landing spots: column, msb, row
#define ST_HK_G_SPOT_MSB 0x7EF8u
#define ST_HK_G_SPOT_ROW 0x7EFDu
#define ST_HK_G_SFX_HOP 0x7F03u
#define ST_HK_G_ORB_COLOR 4u
// ---- level H "PUZZLER" ----
#define ST_HK_H_CEL 0x80u // the one sprite cel
#define ST_HK_H_COLOR_IDLE 0x01u
#define ST_HK_H_COLOR_LIT 0x0Au
#define ST_HK_H_COLOR_ACTIVE 0x05u
// ---- level I "CROSSFIRE" ----
#define ST_HK_I_CEL_RISE 0x7DD8u // 5 cels
#define ST_HK_I_RISE_PHASES 5u
#define ST_HK_I_CEL_BURST 0x7DE5u // 8 cels
#define ST_HK_I_BURST_PHASES 8u
#define ST_HK_I_COLOR 0x7E7Fu // 3 colours
#define ST_HK_I_COLORS 3u
#define ST_HK_I_COLOR_IDLE 0x02u
// ---- levels J "SHOOTING STARS" and P "BLIZZARD" (the falling hazards) ----
#define ST_HK_FALL_CEL 0x80u // falling: $80/$81
#define ST_HK_FALL_CEL_BURST 0x82u // then the burst run from the table
#define ST_HK_J_CEL_BURST 0x7EC9u // phases 1..9
#define ST_HK_J_BURST_PHASES 10u
#define ST_HK_J_COLOR 7u
#define ST_HK_P_CEL_BURST 0x7F09u // phases 1..4
#define ST_HK_P_BURST_PHASES 5u
#define ST_HK_P_COLOR 3u
// ---- level L "BLACK HOLE" ----
#define ST_HK_L_CEL_FIRST 0x80u // $80..$82 spin
#define ST_HK_L_CEL_END 0x83u
#define ST_HK_L_COLOR 0u
// ---- level Q "INTERFERENCE" ----
#define ST_HK_Q_CEL 0x7DF2u // 12 cels, multicolour
#define ST_HK_Q_CEL_PHASES 12u
#define ST_HK_Q_COLOR 6u
// ---- level U "REBOUND" ----
#define ST_HK_U_CEL 0x7F4Bu // 4-entry walk over $80..$82
#define ST_HK_U_CEL_PHASES 4u
#define ST_HK_U_COLOR 7u
// ---- level Y "MYSTERY SCREEN" ----
// Sprite 3 is a multicolour saucer, sprite 4 a hires walker, sprite 5
// the walker's shot ($83 rising, then $84/$85 bursting).
#define ST_HK_Y_SAUCER 3u
#define ST_HK_Y_WALKER 4u
#define ST_HK_Y_SHOT 5u
#define ST_HK_Y_CEL_SAUCER 0x80u
#define ST_HK_Y_CEL_WALK 0x81u
#define ST_HK_Y_CEL_WALK_ALT 0x82u
#define ST_HK_Y_CEL_SHOT 0x83u
#define ST_HK_Y_CEL_SHOT_END 0x86u // one past the last burst cel
#define ST_HK_Y_COLOR_SAUCER 1u
#define ST_HK_Y_COLOR_WALKER 0x0Fu
#define ST_HK_Y_MULTICOLOR 0x0Fu // $7E02: $D01C, sprites 0..3
#endif // ST_HOOK_TABLES_H