2 db "JSWROOM1" ; signature
3 dw roomCount ; number of rooms in this file
4 dd roomCount*(?) ; offset in file for each room
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
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)
28 db monsterCount ; number of monsters in this room
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
44 MasterBedroom = 1, // 0x21
46 RigorMortis = 3, // 0x4b
48 HellTribbles = 5, // 0x3b, 0x71: Highway to Hell, The Trubble with Tribbles
54 BellInvasion = 11, // 0x44, 0x79: Belfry, Galactic Invasion
55 TripSwitch = 12, // 0x47
60 note that switch in TripSwitch is reversed: it is initially right, but drawn as left