Prev: 30720 Up: Map Next: 31369
31232: Per-screen RAM state
First 35 bytes of the runtime RAM map. The remaining per-game-state scratchpad variables live further down in the code segment near 33682 — see that block for the rest of the RAM map.
Input
#R31232 GameStateBase 9-byte status block (crew alive flags?)
#R31241 DrawSlotIndex actor slot (0-7) currently drawn/processed
#R31242 CurrentRoom room of that actor; "the viewed room"
#R31243 RoomTypeByte current room type id
#R31244 RoomAttrStep word: attr-cursor stride for door drawing
#R31246 RoomCellStep word: cell-grid stride for door drawing
#R31248 HeldItemFront item id in the actor's front hand (255 = none)
#R31249 HeldItemBack item id in the actor's back hand (255 = none)
#R31250 RoomMateA first other actor in the room (255 = none)
#R31251 RoomMateB second other actor in the room (255 = none)
#R31252 RoomModeByte current room mode (drives RoomDispatchTable)
#R31253 ShipSystemFlags bit 0 destruct armed; bits 3-5 engine state
#R31255 RoomAttrCursor word: attribute-file cursor (room drawing)
#R31257 DrawScreenPtr word: THE display-file draw pointer (~120 refs)
#R31259 RoomCellCursor word: 20-wide room-cell-grid cursor
#R31261 CorridorTilePtr pointer into corridor tile source
#R31263 CrewAnimFlags XOR-blit toggle for crew sprite set A
#R31264 AnimFramePhase XOR-blit toggle for set B / cursor
#R31265 ScriptPointer ROM-traversal AI script pointer
The bytes from 31267 onwards in the original tape image hold executable code (the corridor-drawing routine called from 31459). That code is preserved here as DEFB data only because the section was originally classified as RAM; it is invoked via CALL 31267.
31232 DEFB 9,9,9,9,9,9,9,45
31240 DEFB 45
31241 DEFB 5
31242 DEFB 6 room of the actor being processed (record byte +1, cached by SelectSlotByDrawIdx 31721); doubles as "the viewed room" in encounter checks
31243 DEFB 1
31244 DEFB 0,0 word: attribute-cursor stride for door drawing
31246 DEFB 0,0 word: room-cell-grid stride for door drawing
31248 DEFB 255 corridor-strip cell (0-21) of the actor's id+160 marker; 12 = the alien's lair cell (see 31823)
31249 DEFB 255 corridor-strip cell of the actor's id+128 marker
31250 DEFB 255 slots of up to two OTHER actors in the current
31251 DEFB 255 room (255 = none) - printed as "Also here" / "Also Bodies of"; found by 36187
31252 DEFB 0
31253 DEFB 0 bit 0 = self-destruct armed; bits 3-5 = Engine #1/#2/#3 state (ship-systems tick at 39041)
31254 DEFB 0
31255 DEFB 0,88 word: attribute-file cursor for room/door drawing (initially the attr-file base)
31257 DEFB 0,64 word: THE main display-file draw pointer used by every blit routine (initially the display file)
31259 DEFB 0,96 word: cursor into the 20-cell-wide room grid, walked in step with RoomAttrCursor
31261 DEFB 0,0
31263 DEFB 128
31264 DEFB 128
31265 DEFB 0,0
31267 DEFB 17,12,0,33,0,88,14,19
31275 DEFB 6,20,54,4,35,16,251,25
31283 DEFB 13,32,245,17,124,1,33,0
31291 DEFB 96,58,11,122,254,3,202,108
31299 DEFB 131,254,4,202,7,155,167,40
31307 DEFB 4,25,61,32,252
31312 DEFB 34,27,122,33,0,64,34,25
31320 DEFB 122,14,19,6,20,197,237,91
31328 DEFB 27,122,205,137,122,33,25,122
31336 DEFB 52,42,27,122,35,34,27,122
31344 DEFB 193,16,234,17,12,0,42,25
31352 DEFB 122,125,254,224,56,3,17,12
31360 DEFB 7,25,34,25,122,13,32,211
31368 DEFB 201
Prev: 30720 Up: Map Next: 31369