![]() |
Game status buffer |
| Address | Length | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 24576 | 2034 |
Two bytes per room, laid out in the same way as the World_Map world map. The first byte of a room's entry is zero until the room has been visited; Print_Completion_Percentage counts the non-zero entries to work out how much of the map has been explored. The table is cleared by Reset_Room_Table when a new game starts.
In a cave room that has no floor the two bytes of the entry also describe the two stalactites of the room (see Set_Up_Stalactites). Read_Room_State reads an entry.
|
||||||||||||||||
| 36565 | 1 |
The options that were chosen on the game selection screen (see Select_Game_Options). Only the low two bits are used, as there is only one player. They are the controls that ReadControls reads:
|
||||||||||||||||
| 36566 | 2 |
The game timer. It is incremented by Finish_Object_Pass each time every object record has been handled. The low bits of the counter time many of the game's events, for example the gem timer, the animation of the creatures and the release of new creatures.
|
||||||||||||||||
| 36570 | 1 |
The number of lives that Sabreman has left, held as a BCD value. It is set to 6 on the game selection screen, goes up by one when Sabreman collects an extra life (type 127) and goes down by one when he dies.
|
||||||||||||||||
| 36571 | 4 |
Holds Sabreman's x position and room x (the two bytes of Saved_Position), and his y position and room y (the two bytes of Saved_Position_Y), while Handle_Death resets his object record after he has lost a life. The values are then put back, so he restarts where he died.
|
||||||||||||||||
| 36575 | 2 |
The last value of the system variable FRAMES (23672) that Finish_Object_Pass saw. When FRAMES has changed, the priority objects are handled.
|
||||||||||||||||
| 36577 | 1 |
The sprite id of the object that StoreEntity last saved. PrepDraw23 uses it, with the saved position, to find the sprite that has to be erased.
|
||||||||||||||||
| 36578 | 1 |
The number of rows of the old sprite that the sprite routines have still to draw (see XORSpriteLoop). It is set up by PrepDraw23.
|
||||||||||||||||
| 36579 | 1 |
The number of rows of the new sprite that the sprite routines have still to draw (see XORSpriteLoop). It is set up by PrepDraw2.
|
||||||||||||||||
| 36580 | 1 |
The x position of the object that StoreEntity last saved.
|
||||||||||||||||
| 36581 | 1 |
The y position of the object that StoreEntity last saved.
|
||||||||||||||||
| 36582 | 1 |
The number of character cells that each row of the new sprite covers. It is one more than the width of the sprite in bytes when the sprite is not aligned to a character boundary. It is set up by PrepDraw2 and used by ColourEntity.
|
||||||||||||||||
| 36583 | 1 |
The height in pixel lines of the new sprite. It is set up by PrepDraw2 and used by ColourEntity.
|
||||||||||||||||
| 36584 | 1 |
The attribute that MenuWriteText gives to the characters that it prints.
|
||||||||||||||||
| 36585 | 1 |
Set to 255 while one of the action keys (SPACE, SYMBOL SHIFT, M, N and B) is held down and set to 0 when none is. Finish_Object_Pass maintains it.
|
||||||||||||||||
| 36586 | 1 |
Set to 255 for one pass of the main loop when one of the action keys is first pressed, and to 0 otherwise. The handlers of the weapons (Handle_Weapon_Pickup) use it to pick up a weapon, move it along the weapon slots or drop it, and set it to 254 once they have used it.
|
||||||||||||||||
| 36587 | 3 |
The type of the weapon (104 to 107) that Sabreman carries in each of three slots, or 0 for an empty slot. Finish_Object_Pass empties the slots when an action key is first pressed and the handlers of the carried weapons (Handle_Weapon_Pickup) fill them in again. Throw_Weapon throws the first weapon that it finds.
|
||||||||||||||||
| 36590 | 1 |
A BCD value that is printed next to the word GEMS. It is set to 80 when Sabreman collects a gem (see Handle_Collectable), which also turns him cyan, and Finish_Object_Pass reduces it by one every fourth tick. While it is not zero Sabreman survives landing after a long fall (see Land_Sabreman) and a falling stalactite does not hurt him (see 59451). When it reaches zero he turns white again.
|
||||||||||||||||
| 36591 | 1 |
The depth of the room that Sabreman is in, held as a BCD value and printed by Print_Depth.
|
||||||||||||||||
| 36592 | 1 |
Set to a non-zero value by Draw_Room when a room has been drawn and cleared at the end of the next pass of the main loop (see Finish_Object_Pass).
|
||||||||||||||||
| 36593 | 1 |
Set to 1 by the handler for the object types 92 to 95 (Handle_Carrying_Eagle) each time it runs. Finish_Object_Pass copies it to Previous_Type_5C_Active_Flag and clears it at the end of every pass.
|
||||||||||||||||
| 36594 | 1 |
Holds the value of Type_5C_Active_Flag from the last complete pass of the main loop. It is also set by Handle_Flying_Creature when an object changes into type 92. Handle_Carried_Sabreman reads it.
|
||||||||||||||||
| 36595 | 3 |
The score, held as six BCD digits in three bytes. AddPointsToScore adds to it and prints it.
|
||||||||||||||||
| 36598 | 1 |
Incremented by Play_Alternating_Tone each time it is called, to alternate the pitch of the tones that it plays.
|
||||||||||||||||
| 36599 | 1 |
Set to 1 once Draw_Menu_Icons has drawn the icons on the game selection screen.
|
||||||||||||||||
| 36600 | 1 |
The percentage of the Underwurlde that has been explored, held as a BCD value. Print_Completion_Percentage works it out and prints it.
|
||||||||||||||||
| 36601 | 1 |
Set to 1 by 60688. Spawn_Flying_Creature tests it when it decides how a new flying creature enters the room.
|
||||||||||||||||
| 36602 | 304 |
Nineteen records of 16 bytes each. Run_Game works through them one by one, using byte 0 of each record (the type of the object, which is also its sprite id) as an index into the handler table at Object_Handler_Table. A type of 0 marks a record that is not in use.
The first two records are the weapons that Sabreman throws. They are handled only as priority records (see Finish_Object_Pass). The third record is Sabreman. Reset_Sabreman fills it in using the template at Sabreman_Template.
Some of the other records have fixed uses: the fourth is the rope (type 23 which Set_Up_Rope sets up when the room has a rope) and the fifth is a falling stalactite (see Spawn_Falling_Stalactite).
|
||||||||||||||||
| 36906 | 40 |
Five records of 8 bytes each. They are handled in the same way as the larger records, after all of those have been handled (see Finish_Object_Pass).
The first four are the weapons that Sabreman can pick up. Place_Weapon_Pickups copies their starting positions from Weapon_Placement_Table at the start of the game.
|
||||||||||||||||
| 43580 | 16 |
The object record that Reset_Sabreman copies into the record of Sabreman. It sets his type to 9 his position to 64159 in the room with x=9 and y=14 and his attribute to 71 (white).
|
||||||||||||||||
| 43667 | 1 |
The difference between the y positions of the two end points of the line that Set_Up_Line sets up. It is the number of steps of the line, which has one step for each pixel row.
|
||||||||||||||||
| 43668 | 1 |
The direction of the line that Set_Up_Line sets up. Bit 0 is set when the y position in H is less than the y position in D, and bit 1 is set when the x position in L is less than the x position in E.
|
||||||||||||||||
| 43669 | 2 |
The position of the end of the rope, that Position_Rope_End works out. The low byte is the x position and the high byte is the y position. The x position is the displacement of the rope (Rope_Displacement_Pixels) plus 128.
|
||||||||||||||||
| 43671 | 2 |
The position of the end of the rope when it was last drawn by Draw_Rope, which erases the rope there. The low byte is the x position and the high byte is the y position. It is set to zero when a rope is set up (see Set_Up_Rope).
|
||||||||||||||||
| 43673 | 7 |
Not used by the game.
|
||||||||||||||||
| 43680 | 1 |
The fraction that is carried from step to step by the line that Draw_Line draws with the main register set.
|
||||||||||||||||
| 43681 | 1 |
The fraction that is carried from step to step by the line that Draw_Line draws with the shadow register set.
|
||||||||||||||||
| 43682 | 1 |
The horizontal velocity of the end of the rope. The left and right controls change it by 2 (see Update_Rope) and Move_Rope moves it towards zero. Set_Position_From_Rope gives it to Sabreman as his x velocity.
|
||||||||||||||||
| 43683 | 2 |
The displacement of the end of the rope from the vertical, as a word. The low byte is a fraction. The high byte, at 43684 is the displacement in pixels (it is negative when the rope swings to the left). It is zero when the rope hangs straight down.
|
||||||||||||||||
| 43685 | 2 |
The length of the rope, as a word. Handle_Rope makes the low byte grow to 56 when a rope is first drawn, and Lower_Rope and Raise_Rope change it when Sabreman climbs down or up. Each time the length passes a multiple of 128 the rope reaches the next room down.
|
||||||||||||||||
| 43687 | 2 |
The position of the point where the rope hangs from, which Position_Rope_End works out. The low byte is the x position (it is always 128) and the high byte is the y position.
|
||||||||||||||||
| 43689 | 2 |
The position of the point where the rope hung from when Draw_Rope last drew it.
|
||||||||||||||||
| 43691 | 1 |
The handlers of Sabreman set this to 255 while the fire key is not pressed. Throw_Weapon counts it up while a weapon is in flight and throws a new weapon only when its low three bits are zero.
|
||||||||||||||||
| 43692 | 1 |
The flags of the room that Sabreman is in, which are the first byte of its world map entry (see World_Map). The handlers of Sabreman keep it up to date. The main loop tests bit 4 (the floor) at 37375 and Spawn_Falling_Stalactite tests bit 0 (the ceiling).
|