-
Notifications
You must be signed in to change notification settings - Fork 3
Original Level File Format
This is an ongoing collection of information attempting to understand the old file format. Since there are many addon levels available, and possibly many more, it becomes unfeasible to re-create manually each world. The idea is to build some kind of importer to recreate the levels automatically from the raw level data (preferably as it is stored in the .msh windows format files (which is the resource fork bundled together so it could exist on systems without such a fork) and the .rsrc created when dragging a file to a windows machine from Sheep Shaver (very similiar concept although different method and format). The plan is twofold:
- Understand and interpret the binary format of the .Plvl and .WrLd resource forks.
- Be able to find the .WrLd resource and the .Plvl resources (associated with the proper levels) within the .msh file and/or the file generated automatically by SheepShaver for preserving resource forks.
All short values are 2 bytes, signed, and little-endian.
All bool types are 1 byte.
This test examination will look at Spaced Out. All data will be in Hex form.
001D0020005A03840451000100010002000100010001000200000000000000000000000000000000000001010000000000000000000000000000000F000F001000140014001400100000000000000000000000000000000000000012001200000000000000000000000000000000000000000000000000000000
First 5 values are shorts:
001D = 29 Red Keys
0020 = 32 Blue Keys
005A = 90 Fruit in total (includes keys???) 0384 = 900 Exit Door Level (not required in port) 0451 = 1105 Bonus Door Level
This is an array of size 16. Death Animations for each hazard: 1 is burn, 2 is electrocute. Assuming 0 is normal death and 3 is bee sting. One of these has to mean Non-Lethal, since non-lethal hazards exist in some addon worlds (Corys Storm Keep rain, for instance)
[0] = 0001 = 1 - Bomb (Burns bonzo) [1] = 0001 = 1 - Bomb (Burns bonzo) [2] = 0002 = 2 - Lightbulb (Electrifies bonzo) [3] = 0001 = 1 - Lava (Red) (Burns Bonzo) [4] = 0001 = 1 - Lava (Blue) (Burns Bonzo) [5] = 0001 = 1 - Lava (Yellow) (Burns Bonzo) [6] = 0002 = 2 - Zappy Electric Thing (Electrifies bonzo) [7] = 0000 [8] = 0000 [9] = 0000 [10] = 0000 [11] = 0000 [12] = 0000 [13] = 0000 [14] = 0000 [15] = 0000
Parallel array to the hazards list of bool. False means does not explode, true means explodes.
[0] = 01 = 1 - Bomb Explodes [1] = 01 = 1 - Dynamite Explodes [2] = 00 = 0 - Lightbulb does not explode [3] = 00 = 0 - Red lava does not explode [4] = 00 = 0 - Same with Blue lava [5] = 00 = 0 - Same with Yellow lava [6] = 00 = 0 - Little green zappy thing does not explode.
--- No more actual hazards past here anyway (at least for Spaced Out)
[7] = 00 [8] = 00 [9] = 00 [10] = 00 [11] = 00 [12] = 00 [13] = 00 [14] = 00 [15] = 00
Parallel array to hazards list of shorts; death sounds. In the port, each death animation is hardcoded to a death sound, so this becomes irrelevant.
[0] = 000F Bomb Death sound [1] = 000F [2] = 0010 Electrocution Sound [3] = 0014 Lava Death (bit different from bomb death) [4] = 0014 [5] = 0014 [6] = 0010 Electrocution Sound [7] = 0000 [8] = 0000 [9] = 0000 [10] = 0000 [11] = 0000 [12] = 0000 [13] = 0000 [14] = 0000 [15] = 0000
Parallel array to hazards list of shorts; explosion sounds. In the port, all explosions sound the same.
[0] = 0012 [1] = 0012 [2] = 0000 [3] = 0000 [4] = 0000 [5] = 0000 [6] = 0000 [7] = 0000 [8] = 0000 [9] = 0000 [10] = 0000 [11] = 0000 [12] = 0000 [13] = 0000 [14] = 0000 [15] = 0000