Both sides previous revisionPrevious revisionNext revision | Previous revision |
trs:scripting_tr4_tr5 [2017/06/16 16:39] – [Global Header] zdimension | trs:scripting_tr4_tr5 [2021/04/29 21:45] (current) – [Script Opcodes] zdimension |
---|
| {{indexmenu_n>11}} |
| |
====== Scripting in TR4 and TR5 ====== | ====== Scripting in TR4 and TR5 ====== |
| |
^ ''0x0004'' ^ 2 | ''TitleEnabled'' -- Specifies if title screen should be displayed or not. If not set, game will start right away after user has launched an application. | | ^ ''0x0004'' ^ 2 | ''TitleEnabled'' -- Specifies if title screen should be displayed or not. If not set, game will start right away after user has launched an application. | |
^ ''0x0008'' ^ 3 | ''PlayAnyLevel'' -- Gives an access to any level from the title screen. | | ^ ''0x0008'' ^ 3 | ''PlayAnyLevel'' -- Gives an access to any level from the title screen. | |
^ ''0x0070'' ^ 4 | ''Language'' | | ^ ''0x0070'' ^ 4 | ''Language'' -- Chooses which loading picture (US, GR, FR or UK) is showed | |
^ ::: ^ 5 | ::: | | ^ ::: ^ 5 | ::: | |
^ ::: ^ 6 | ::: | | ^ ::: ^ 6 | ::: | |
struct tr4_script_levelheader | struct tr4_script_levelheader |
{ | { |
uint8_t NumTotalLevels; | uint8_t NumTotalLevels; |
uint16_t NumUniqueLevelPaths; | uint8_t NumFilenames; |
| |
| uint8_t Filler; |
| |
uint16_t LevelpathStringLen; | uint16_t LevelpathStringLen; |
uint16_t LevelBlockLen; | uint16_t LevelBlockLen; |
| |
uint8_t PSXLevelString [5]; // typically ".PSX" | uint8_t PSXLevelString [5]; // typically ".PSX" |
uint8_t PSXFMVString [5]; // typically ".FMV" | uint8_t PSXFMVString [5]; // typically ".FMV" |
uint8_t PSXCutString [5]; // typically ".CUT" | uint8_t PSXCutString [5]; // typically ".CUT" |
uint8_t Filler [5]; // Possibly for some additional extension type? | uint8_t Filler [5]; // Possibly for some additional extension type? |
| |
uint8_t PCLevelString [5]; // typically ".TR4" | uint8_t PCLevelString [5]; // typically ".TR4" |
uint8_t PCFMVString [5]; // typically ".BIK" | uint8_t PCFMVString [5]; // typically ".BIK" |
uint8_t PCCutString [5]; // typically ".TR4" | uint8_t PCCutString [5]; // typically ".TR4" |
uint8_t Filler [5]; | uint8_t Filler [5]; |
} | } |
</code> | </code> |
Here is a list of all available TR4 opcodes, their meaning and their corresponding arguments (order of arguments matters!): | Here is a list of all available TR4 opcodes, their meaning and their corresponding arguments (order of arguments matters!): |
| |
<code> | It is important to note that the ''LoadCamera'' opcode has been removed in TR5, which means that all the other opcodes (>= 0x92) are shifted by 1). |
0x81 Level bitu8 stringIndex, uint16_t levelOptions, bitu8 pathIndex, bitu8 audio | |
0x82 [Title] Level bitu8 pathIndex, uint16_t titleOptions, bitu8 audio | |
0x8C Legend bitu8 stringIndex | |
0x91 LoadCamera bit32 srcX, bit32 srcY, bit32 srcZ, bit32 targX, bit32 targY, bit32 targZ, bitu8 room | |
0x89 Layer1 bitu8 red, bitu8 green, bitu8 blue, bit8 speed | |
0x8A Layer2 bitu8 red, bitu8 green, bitu8 blue, bit8 speed | |
0x8E Mirror bitu8 room, bit32 xAxis | |
0x8F Fog bitu8 red, bitu8 green, bitu8 blue | |
0x84 Cut bitu8 cutIndex | |
0x8B UVrotate bit8 speed | |
0x85 ResidentCut1 bitu8 cutIndex | |
0x86 ResidentCut2 bitu8 cutIndex | |
0x87 ResidentCut3 bitu8 cutIndex | |
0x88 ResidentCut4 bitu8 cutIndex | |
0x80 FMV bitu8: 4 least significant bits represent the FMV index; 4 most significant bits (y) represent the FMV trigger bitfield as in y=1<->bit 8 set | |
0x92 ResetHUB bitu8 levelIndex | |
0x90 AnimatingMIP bitu8: 4 least significant bits represent animatingObjectIndex - 1; 4 most significant bits represent the distance | |
0x8D LensFlare uint16_t yClicks, bit16 zClicks, uint16_t xClicks, bitu8 red, bitu8 green, bitu8 blue | |
0x93 KEY_ITEM1 uint16_t stringIndex, uint16_t height, uint16_t size, uint16_t yAngle, uint16_t zAngle, uint16_t xAngle, uint16_t unknown | |
0x94 KEY_ITEM2 -=- (All the same) | |
0x95 KEY_ITEM3 -=- | |
0x96 KEY_ITEM4 -=- | |
0x97 KEY_ITEM5 -=- | |
0x98 KEY_ITEM6 -=- | |
0x99 KEY_ITEM7 -=- | |
0x9A KEY_ITEM8 -=- | |
0x9B KEY_ITEM9 -=- | |
0x9C KEY_ITEM10 -=- | |
0x9D KEY_ITEM11 -=- | |
0x9E KEY_ITEM12 -=- | |
0x9F PUZZLE_ITEM1 -=- | |
0xA0 PUZZLE_ITEM2 -=- | |
0xA1 PUZZLE_ITEM3 -=- | |
0xA2 PUZZLE_ITEM4 -=- | |
0xA3 PUZZLE_ITEM5 -=- | |
0xA4 PUZZLE_ITEM6 -=- | |
0xA5 PUZZLE_ITEM7 -=- | |
0xA6 PUZZLE_ITEM8 -=- | |
0xA7 PUZZLE_ITEM9 -=- | |
0xA8 PUZZLE_ITEM10 -=- | |
0xA9 PUZZLE_ITEM11 -=- | |
0xAA PUZZLE_ITEM12 -=- | |
| |
0xAB PICKUP_ITEM1 -=- | ^ TR4 ^ TR5 ^ Opcode ^ Arguments ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
0xAC PICKUP_ITEM2 -=- | | ''0x80''|| ''FMV'' | ''uint8_t: 4 least significant bits represent the FMV index; 4 most significant bits (y) represent the FMV trigger bitfield as in y=1<->bit 8 set'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
0xAD PICKUP_ITEM3 -=- | | ''0x81''|| ''Level'' | ''uint8_t stringIndex'' ||||||||||||||||||||| ''uint16_t levelOptions'' ||||||||||||||||||||| ''uint8_t pathIndex'' ||||||||||||||||||||| ''uint8_t audio'' ||||||||||||||||||||| |
0xAE PICKUP_ITEM4 -=- | | ''0x82''|| ''[Title] Level'' | ''uint8_t pathIndex'' |||||||||||||||||||||||||||| ''uint16_t titleOptions'' |||||||||||||||||||||||||||| ''uint8_t audio'' |||||||||||||||||||||||||||| |
| | ''0x83''|| ''LEVEL_DATA_END'' | None -- this opcode appears at the end of every level (incl. title) block |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x84''|| ''Cut'' | ''uint8_t cutIndex'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x85''|| ''ResidentCut1'' | ''uint8_t cutIndex'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x86''|| ''ResidentCut2'' |:::|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x87''|| ''ResidentCut3'' |:::|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x88''|| ''ResidentCut4'' |:::|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x89''|| ''Layer1'' | ''uint8_t red'' ||||||||||||||||||||| ''uint8_t green'' ||||||||||||||||||||| ''uint8_t blue'' ||||||||||||||||||||| ''int8_t speed'' ||||||||||||||||||||| |
| | ''0x8A''|| ''Layer2'' |:::|||||||||||||||||||||:::|||||||||||||||||||||:::|||||||||||||||||||||:::||||||||||||||||||||| |
| | ''0x8B''|| ''UVrotate'' | ''int8_t speed'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x8C''|| ''Legend'' | ''uint8_t stringIndex'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x8D''|| ''LensFlare'' | ''uint16_t yClicks'' |||||||||||||| ''bit16 zClicks'' |||||||||||||| ''uint16_t xClicks'' |||||||||||||| ''uint8_t red'' |||||||||||||| ''uint8_t green'' |||||||||||||| ''uint8_t blue'' |||||||||||||| |
| | ''0x8E''|| ''Mirror'' | ''uint8_t room'' |||||||||||||||||||||||||||||||||||||||||| ''int32_t xAxis'' |||||||||||||||||||||||||||||||||||||||||| |
| | ''0x8F''|| ''Fog'' | ''uint8_t red'' |||||||||||||||||||||||||||| ''uint8_t green'' |||||||||||||||||||||||||||| ''uint8_t blue'' |||||||||||||||||||||||||||| |
| | ''0x90''|| ''AnimatingMIP'' | ''uint8_t: 4 least significant bits represent animatingObjectIndex - 1; 4 most significant bits represent the distance'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x91''| **XXX** | ''LoadCamera'' | ''int32_t srcX'' |||||||||||| ''int32_t srcY'' |||||||||||| ''int32_t srcZ'' |||||||||||| ''int32_t targX'' |||||||||||| ''int32_t targY'' |||||||||||| ''int32_t targZ'' |||||||||||| ''uint8_t room'' |||||||||||| |
| | ''0x92''| ''0x91''| ''ResetHUB'' | ''uint8_t levelIndex'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| | ''0x93''| ''0x92''| ''KEY_ITEM1'' | ''uint16_t stringIndex'' |||||||||||| ''uint16_t height'' |||||||||||| ''uint16_t size'' |||||||||||| ''uint16_t yAngle'' |||||||||||| ''uint16_t zAngle'' |||||||||||| ''uint16_t xAngle'' |||||||||||| ''uint16_t flags'' |||||||||||| |
| | ''0x94''| ''0x93''| ''KEY_ITEM2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x95''| ''0x94''| ''KEY_ITEM3'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x96''| ''0x95''| ''KEY_ITEM4'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x97''| ''0x96''| ''KEY_ITEM5'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x98''| ''0x97''| ''KEY_ITEM6'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x99''| ''0x98''| ''KEY_ITEM7'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x9A''| ''0x99''| ''KEY_ITEM8'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x9B''| ''0x9A''| ''KEY_ITEM9'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x9C''| ''0x9B''| ''KEY_ITEM10'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x9D''| ''0x9C''| ''KEY_ITEM11'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x9E''| ''0x9D''| ''KEY_ITEM12'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0x9F''| ''0x9E''| ''PUZZLE_ITEM1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA0''| ''0x9F''| ''PUZZLE_ITEM2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA1''| ''0xA0''| ''PUZZLE_ITEM3'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA2''| ''0xA1''| ''PUZZLE_ITEM4'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA3''| ''0xA2''| ''PUZZLE_ITEM5'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA4''| ''0xA3''| ''PUZZLE_ITEM6'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA5''| ''0xA4''| ''PUZZLE_ITEM7'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA6''| ''0xA5''| ''PUZZLE_ITEM8'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA7''| ''0xA6''| ''PUZZLE_ITEM9'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA8''| ''0xA7''| ''PUZZLE_ITEM10'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xA9''| ''0xA8''| ''PUZZLE_ITEM11'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xAA''| ''0xA9''| ''PUZZLE_ITEM12'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xAB''| ''0xAA''| ''PICKUP_ITEM1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xAC''| ''0xAB''| ''PICKUP_ITEM2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xAD''| ''0xAC''| ''PICKUP_ITEM3'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xAE''| ''0xAD''| ''PICKUP_ITEM4'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xAF''| ''0xAE''| ''EXAMINE1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB0''| ''0xAF''| ''EXAMINE2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB1''| ''0xB0''| ''EXAMINE3'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB2''| ''0xB1''| ''KEY_ITEM1_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB3''| ''0xB2''| ''KEY_ITEM1_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB4''| ''0xB3''| ''KEY_ITEM2_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB5''| ''0xB4''| ''KEY_ITEM2_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB6''| ''0xB5''| ''KEY_ITEM3_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB7''| ''0xB6''| ''KEY_ITEM3_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB8''| ''0xB7''| ''KEY_ITEM4_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xB9''| ''0xB8''| ''KEY_ITEM4_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xBA''| ''0xB9''| ''KEY_ITEM5_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xBB''| ''0xBA''| ''KEY_ITEM5_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xBC''| ''0xBB''| ''KEY_ITEM6_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xBD''| ''0xBC''| ''KEY_ITEM6_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xBE''| ''0xBD''| ''KEY_ITEM7_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xBF''| ''0xBE''| ''KEY_ITEM7_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC0''| ''0xBF''| ''KEY_ITEM8_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC1''| ''0xC0''| ''KEY_ITEM8_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC2''| ''0xC1''| ''PUZZLE_ITEM1_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC3''| ''0xC2''| ''PUZZLE_ITEM1_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC4''| ''0xC3''| ''PUZZLE_ITEM2_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC5''| ''0xC4''| ''PUZZLE_ITEM2_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC6''| ''0xC5''| ''PUZZLE_ITEM3_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC7''| ''0xC6''| ''PUZZLE_ITEM3_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC8''| ''0xC7''| ''PUZZLE_ITEM4_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xC9''| ''0xC8''| ''PUZZLE_ITEM4_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xCA''| ''0xC9''| ''PUZZLE_ITEM5_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xCB''| ''0xCA''| ''PUZZLE_ITEM5_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xCC''| ''0xCB''| ''PUZZLE_ITEM6_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xCD''| ''0xCC''| ''PUZZLE_ITEM6_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xCE''| ''0xCD''| ''PUZZLE_ITEM7_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xCF''| ''0xCE''| ''PUZZLE_ITEM7_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD0''| ''0xCF''| ''PUZZLE_ITEM8_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD1''| ''0xD0''| ''PUZZLE_ITEM8_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD2''| ''0xD1''| ''PICKUP_ITEM1_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD3''| ''0xD2''| ''PICKUP_ITEM1_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD4''| ''0xD3''| ''PICKUP_ITEM2_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD5''| ''0xD4''| ''PICKUP_ITEM2_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD6''| ''0xD5''| ''PICKUP_ITEM3_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD7''| ''0xD6''| ''PICKUP_ITEM3_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD8''| ''0xD7''| ''PICKUP_ITEM4_COMBO1'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | ''0xD9''| ''0xD8''| ''PICKUP_ITEM4_COMBO2'' |:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::||||||||||||:::|||||||||||| |
| | **XXX** | ''0xD9''| ''GiveItemAtStartup'' | ''uint16_t itemNumber'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| |:::| ''0xDA''| ''LoseItemAtStartup'' | ''uint16_t itemNumber'' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| |
0xAF EXAMINE1 -=- | |
0xB0 EXAMINE2 -=- | |
0xB1 EXAMINE3 -=- | |
| |
0xB2 KEY_ITEM1_COMBO1 -=- | |
0xB3 KEY_ITEM1_COMBO2 -=- | |
0xB4 KEY_ITEM2_COMBO1 -=- | |
0xB5 KEY_ITEM2_COMBO2 -=- | |
0xB6 KEY_ITEM3_COMBO1 -=- | |
0xB7 KEY_ITEM3_COMBO2 -=- | |
0xB8 KEY_ITEM4_COMBO1 -=- | |
0xB9 KEY_ITEM4_COMBO2 -=- | |
0xBA KEY_ITEM5_COMBO1 -=- | |
0xBB KEY_ITEM5_COMBO2 -=- | |
0xBC KEY_ITEM6_COMBO1 -=- | |
0xBD KEY_ITEM6_COMBO2 -=- | |
0xBE KEY_ITEM7_COMBO1 -=- | |
0xBF KEY_ITEM7_COMBO2 -=- | |
0xC0 KEY_ITEM8_COMBO1 -=- | |
0xC1 KEY_ITEM8_COMBO2 -=- | |
| |
0xC2 PUZZLE_ITEM1_COMBO1 -=- | |
0xC3 PUZZLE_ITEM1_COMBO2 -=- | |
0xC4 PUZZLE_ITEM2_COMBO1 -=- | |
0xC5 PUZZLE_ITEM2_COMBO2 -=- | |
0xC6 PUZZLE_ITEM3_COMBO1 -=- | |
0xC7 PUZZLE_ITEM3_COMBO2 -=- | |
0xC8 PUZZLE_ITEM4_COMBO1 -=- | |
0xC9 PUZZLE_ITEM4_COMBO2 -=- | |
0xCA PUZZLE_ITEM5_COMBO1 -=- | |
0xCB PUZZLE_ITEM5_COMBO2 -=- | |
0xCC PUZZLE_ITEM6_COMBO1 -=- | |
0xCD PUZZLE_ITEM6_COMBO2 -=- | |
0xCE PUZZLE_ITEM7_COMBO1 -=- | |
0xCF PUZZLE_ITEM7_COMBO2 -=- | |
0xD0 PUZZLE_ITEM8_COMBO1 -=- | |
0xD1 PUZZLE_ITEM8_COMBO2 -=- | |
| |
0xD2 PICKUP_ITEM1_COMBO1 -=- | |
0xD3 PICKUP_ITEM1_COMBO2 -=- | |
0xD4 PICKUP_ITEM2_COMBO1 -=- | |
0xD5 PICKUP_ITEM2_COMBO2 -=- | |
0xD6 PICKUP_ITEM3_COMBO1 -=- | |
0xD7 PICKUP_ITEM3_COMBO2 -=- | |
0xD8 PICKUP_ITEM4_COMBO1 -=- | |
0xD9 PICKUP_ITEM4_COMBO2 -=- | |
| |
0x83 level-data-end no arguments - this opcode appears at the end of every level (incl. title) block | |
</code> | |
The ''%%uint16_t%%'' values ''%%levelOptions%%'' and ''%%titleOptions%%'' are actually //bit fields// containing several boolean options, and are laid out as follows (per-bit description): | The ''%%uint16_t%%'' values ''%%levelOptions%%'' and ''%%titleOptions%%'' are actually //bit fields// containing several boolean options, and are laid out as follows (per-bit description): |
| |
* //Bit 1// (''%%0x0002%%'') — Weather | * //Bit 1// (''%%0x0002%%'') — Weather |
* //Bit 2// (''%%0x0004%%'') — Horizon | * //Bit 2// (''%%0x0004%%'') — Horizon |
* //Bit 4// (''%%0x0010%%'') — Layer2 used (?) | * //Bit 3// (''%%0x0008%%'') — Layer1 used |
* //Bit 3// (''%%0x0008%%'') — Horizon (has to be paired with 3) | * //Bit 4// (''%%0x0010%%'') — Layer2 used |
* //Bit 5// (''%%0x0020%%'') — Starfield | * //Bit 5// (''%%0x0020%%'') — Starfield |
* //Bit 6// (''%%0x0040%%'') — Lightning | * //Bit 6// (''%%0x0040%%'') — Lightning |
* //Bit 9// (''%%0x0200%%'') — ColAddHorizon | * //Bit 9// (''%%0x0200%%'') — ColAddHorizon |
* //Bit 10// (''%%0x0400%%'') — ResetHUB used | * //Bit 10// (''%%0x0400%%'') — ResetHUB used |
* //Bit 11// (''%%0x0800%%'') — ColAddHorizon (has to be paired with 10) | * //Bit 11// (''%%0x0800%%'') — LensFlare used |
* //Bit 12// (''%%0x1000%%'') — Timer | * //Bit 12// (''%%0x1000%%'') — Timer |
* //Bit 13// (''%%0x2000%%'') — Mirror used | * //Bit 13// (''%%0x2000%%'') — Mirror used |
* //Bit 14// (''%%0x4000%%'') — RemoveAmulet | * //Bit 14// (''%%0x4000%%'') — Remove Horus amulet from inventory |
* //Bit 15// (''%%0x8000%%'') — NoLevel | * //Bit 15// (''%%0x8000%%'') — NoLevel |
| |