I would like to know if anyone has figured out any commands yet. B-$hep ? anything ?
If you are going to figure out something, please tell which commands you are going to figure out, and once you have finished, tell here about it as soon as possible.
Here is the list of commands i have done so far:
Code:
PLAYER_PED = 5 = 0500
CHAR_DEC = 6 = 0600
CHAR_DECSET_2D = 7 = 0700
CHAR_DECSET_3D = 8 = 0800
CAR_DEC = 9 = 0900
CAR_DECSET_2D = 10 = 0A00
CAR_DECSET_3D = 11 = 0B00
OBJ_DEC = 14 = 0E00
OBJ_DECSET_2D = 15 = 0F00
OBJ_DECSET_3D = 16 = 1000
OBJ_DECSET_2D_INT = 17 = 1100
OBJ_DECSET_3D_INT = 18 = 1200
OBJ_DECSET_2D_STR = 19 = 1300
OBJ_DECSET_3D_STR = 20 = 1400
COUNTER = 21 = 1500
ARROW_DEC = 23 = 1700
CONVEYOR_DECSET1 = 26 = 1A00
CONVEYOR_DECSET2 = 27 = 1B00
GENERATOR_DECSET1 = 29 = 1D00
GENERATOR_DECSET2 = 30 = 1E00
GENERATOR_DECSET3 = 31 = 1F00
GENERATOR_DECSET4 = 32 = 2000
DESTRUCTOR_DECSET1 = 34 = 2200
DESTRUCTOR_DECSET2 = 35 = 2300
CRANE_BASIC_DEC = 37 = 2500
CRANE_TARGET_DEC = 38 = 2600
CRUSHER_BASIC = 40 = 2800
CREATE_CHAR_2D = 41 = 2900
CREATE_CHAR_3D = 42 = 2A00
CREATE_CAR_2D = 43 = 2B00
CREATE_CAR_3D = 44 = 2C00
CREATE_CAR_2D_STR = 45 = 2D00
CREATE_CAR_3D_STR = 46 = 2E00
CREATE_OBJ_3D_INT = 49 = 3100
CREATE_OBJ_2D_STR = 52 = 3400
LEVELSTART = 59 = 3B00
LEVELEND = 60 = 3C00
MAP_ZONE_SET = 102 = 6600
EXPLODE = 142 = 8E00
EXPLODE_BUILDING = 143 = 8F00
LOWER_LEVEL = 184 = B800
CHANGE_BLOCK_SIDE = 185 = B900
CHANGE_BLOCK_LID = 186 = BA00
ADD_PATROL_POINT = 205 = CD00
SET_GANG_INFO1 = 223 = DF00
TIMER_DECLARE = 233 = E900
SWITCH_GENERATOR1 = 268 = 0C01
SET_STATION = 285 = 1D01
RADIOSTATION_DEC = 287 = 1F01
CREATE_LIGHT2 = 302 = 2E01
SET_CAR_GRAPHIC = 303 = 2F01
PUT_CAR_ON_TRAILER = 316 = 3C01
SOUND = 326 = 4601
SOUND_DECSET = 327 = 4701
SET_COUNTER_INT = 340 = 5401
PED_GRAPHIC = 364 = 6C01
DOOR_DECLARE_S1 = 375 = 7701
DOOR_DECLARE_S2 = 376 = 7801
DOOR_DECLARE_S3 = 377 = 7901
DOOR_DECLARE_D1 = 378 = 7A01
DOOR_DECLARE_D2 = 379 = 7B01
DOOR_DECLARE_D3 = 380 = 7C01
CREATE_GANG_CAR1 = 394 = 8A01
CREATE_GANG_CAR2 = 395 = 8B01
EXPLODE_LARGE2 = 399 = 8F01
BONUS_DECLARE = 401 = 9101
EXPLODE_SMALL2 = 404 = 9401
EXPLODE_MEDIUM_NO_RING2 = 406 = 9601
ONSCREEN_COUNTER_DEC = 413 = 9D01
PARKED_CAR_DECSET_2D = 425 = A901
PARKED_CAR_DECSET_3D = 426 = AA01
PARKED_CAR_DECSET_2D_ST = 427 = AB01
PARKED_CAR_DECSET_3D_ST = 428 = AC01
DO_CRANE_POWERUP = 439 = B701
Total 74 commands that my decompiler can decompile.
There arent that many functions/structs since many commands can use same function/struct.
I just finished CHANGE_BLOCK, damn that was a bitch to do!
All the settings were bit-packed in nasty way:
Code:
// one of the 16 bit blocks were bit-packed in two different formats:
union SCR_BLOCK_SETTINGS {
struct {
Uint16 tile_id:10;
Uint16 lighting:2;
Uint16 flat:1;
Uint16 flip:1;
Uint16 rot:2;
} lid;
struct {
Uint16 tile_id:10;
Uint16 wall_type:1;
Uint16 bullet_type:1;
Uint16 flat:1;
Uint16 flip:1;
Uint16 rot:2;
} side;
Uint16 DATA; // in case we need to copy all settings at once.
};
struct SCR_CHANGE_BLOCK {
SCR_CMD_SHORT_FORMAT(
Uint16 padding;
SCR_XYZ_uc pos;
Uint8 side_or_flat;
SCR_BLOCK_SETTINGS block;
Uint16 padding2;
);
};
string read_CHANGE_BLOCK(FPStruct ¶ms){
get_data(SCR_CHANGE_BLOCK, data);
if(params.type == SCRCMD_CHANGE_BLOCK_LID){
return sprintf_str("CHANGE_BLOCK LID (%s) %s %s %d %s %d",
scr_coord(data.pos).c_str(), SCR_BLOCK_FLATTYPES[data.block.lid.flat].c_str(), SCR_BLOCK_FLIPTYPES[data.block.lid.flip].c_str(),
data.block.lid.lighting, SCR_ROT_LIST[data.block.lid.rot].c_str(), data.block.lid.tile_id
);
}else{
return sprintf_str("CHANGE_BLOCK SIDE (%s) %s %s %s %s %s %s %d",
scr_coord(data.pos).c_str(), SCR_BLOCK_FACES[data.side_or_flat].c_str(), SCR_WALL_TYPES[data.block.side.wall_type].c_str(),
SCR_BULLETWALL_TYPES[data.block.side.bullet_type].c_str(), SCR_BLOCK_FLATTYPES[data.block.side.flat].c_str(),
SCR_BLOCK_FLIPTYPES[data.block.side.flip].c_str(), SCR_ROT_LIST[data.block.side.rot].c_str(), data.block.side.tile_id
);
}
}
LinkToFunc(SCRCMD_CHANGE_BLOCK_LID, read_CHANGE_BLOCK);
LinkToFunc(SCRCMD_CHANGE_BLOCK_SIDE, read_CHANGE_BLOCK);