conveyor graphics fix
[jetset.git] / worldmap_fmt1.txt
blob3b348fc7d3852578b544d7482c5b29de7a651f67
1 room format:
2   db "JSWROOM1"     ; signature
3   dw roomCount      ; number of rooms in this file
4   dd roomCount*(?)  ; offset in file for each room
5   dw startRoom
6   db startX, startY ; Willy's starting coordinates (in pixels, unsigned)
7   db startDir       ; 0xff: left; 1: right
8   dw winItemCount   ; how many items we should collect to win the game
10 room data follows -- for each room:
11   db (?)*(?)        ; room tiles, rle-packed (see below), 32*16 bytes unpacked
12   ubyte flags       ; room flags
13   ubyte srtype      ; special room type (see below)
14   dw exitLeft       ; room index or -1
15   dw exitUp         ; room index or -1
16   dw exitRight      ; room index or -1
17   dw exitDown       ; room index or -1
18   db nameLen        ; chars in name
19   db nameLen*(?)    ; name
20   db len,len*(?)    ; willy's sprite lump
21   dw wspr           ; willy's sprite
22   db border         ; border color
23   db tileCount      ; number of non-empty tiles in this room (usually 8)
24   db len,len*(?)    ; tile sprite lump
25   tile graphics info, repeats tileCount times
26     dw spridx         ; index (unsigned)
27     db ink, paper
28   db monsterCount   ; number of monsters in this room
29   if monsterCount > 0:
30     db len,len*(?)    ; monsters sprite lump
31   monster info, repeats monsterCount times
32     dw spridx         ; index (unsigned)
33     db color          ; monster color
34     db flags          ; monster flags
35     db x, y           ; unsigned
36     db dx, dy         ; signed
37     db counter
38     db reload
39     db ofsmask
41 srtype:
42   enum {
43     Normal        = 0,
44     MasterBedroom = 1, // 0x21
45     Rocket        = 2, // 0x77
46     RigorMortis   = 3, // 0x4b
47     Crypt         = 4, // 0x4c
48     HellTribbles  = 5, // 0x3b, 0x71: Highway to Hell, The Trubble with Tribbles
49     Eggoids       = 6, // 0x7e
50     Foot          = 7, // 0x67
51     BeamDown      = 8, // 0x60
52     BeamUp        = 9, // 0x7f
53     Isle          = 10, // 0x50
54     BellInvasion  = 11, // 0x44, 0x79: Belfry, Galactic Invasion
55     TripSwitch    = 12, // 0x47
56     Yacht         = 13, // 0x38
57   }
60 note that switch in TripSwitch is reversed: it is initially right, but drawn as left
63 rle data:
64 for each byte:
65   count = (b>>4)+1;
66   value = b&0x0f;
67   put count values