LUNY.CO.UK

Mikro-Gen:Pyjamarama

The Rooms

Each room is made up of several tables.

8D2ETABLE OF POINTERS: ADDRESS OF EACH ROOM
 

Each two bytes make up the start address of each room.

 
ROOM DATA

A room is made up of furniture, this info is describe using a data string. The string is made up of commands or furniture values. The commands do various jobs. Furniture values reflect which graphic draw. It works like this: the program takes the first byte if it finds it's a command it will take the next few bytes require to complete the command. If it is a furniture value then it will draw that piece of furniture at the given cursor postion.

 
1ST BYTEPARAMETERSMEANING
0xFF,End of data, stop drawing the room
0xF5,Draw ceiling and walls.
Appears once as the first byte.
0xF4,Set vertical-flip ON, tiles are drawn upside down
0xF3,Set vertical-flip OFF
0xDE,nn(w)Check for action flag at address nn(w)*
<0xDE(x), n(y), fDraw a furniture graphic of the given index 'f'

*If the action flag is NOT set then stop drawing any more furniture
This allows some furniture to only be drawn at certain times.

EXAMPLE

Using room 12's data as an example:

 
DATAMEANING
F5Draw ceiling, walls & floor
00,0D,03LEFT HAND DOOR
1E,0D,05RIGHT HAND DOOR
16,0F,34CHANGE MACHINE
05,06,00CHANDELIER
12,11,08CHAIR
16,06,00CHANDELIER
05,12,07TABLE
08,0E,28FLOWERS
0E,0B,3CHELP SWITCH (OFF)
DE,64,F1ACTION TEST FLAG F164
IF == 0 STOP DRAWING ROOM (includes drawing object)
0F,0C,3B HELP SWITCH (ON)
FF STOP DRAWING
 VIEW ROOMS
rooms