30 #include "engines/icb/common/px_common.h" 31 #include "engines/icb/common/px_game_object.h" 32 #include "engines/icb/common/px_route_barriers.h" 33 #include "engines/icb/common/px_array.h" 34 #include "engines/icb/common/px_string.h" 35 #include "engines/icb/animation_mega_set.h" 36 #include "engines/icb/p4_generic.h" 37 #include "engines/icb/string_vest.h" 38 #include "engines/icb/route_manager.h" 39 #include "engines/icb/breath.h" 40 #include "engines/icb/gfx/rlp_api.h" 41 #include "engines/icb/common/px_bones.h" 50 enum __motion { __MOTION_WALK, __MOTION_RUN };
64 enum __object_type { __NO_TYPE_SET = 0, __BUTTON_OPERATED_DOOR, __RECHARGE_POINT, __ORGANIC_MEGA, __NON_ORGANIC_MEGA, __REMORA_CARRIER, __RECHARGE_POINT_WITH_EMP, __AUTO_DOOR };
66 #define MAX_WEAPON_NAME_LENGTH 16 68 extern char weapon_text[__TOTAL_WEAPONS][MAX_WEAPON_NAME_LENGTH];
69 extern bool8 armed_state_table[__TOTAL_WEAPONS];
70 extern bool8 crouch_state_table[__TOTAL_WEAPONS];
72 #define MAX_CHAR_NAME_LENGTH 32 73 #define MAX_OUTFIT_NAME_LENGTH 16 74 #define MAX_CUSTOM_NAME_LENGTH 16 76 #define IMAGE_PATH_STR_LEN 144 77 #define BASE_PATH_STR_LEN 144 78 #define ANIM_NAME_STR_LEN 144 79 #define PALETTE_STR_LEN ENGINE_STRING_LEN 86 int8 anim_table[__TOTAL_ANIMS];
89 void ___init(
const char *chr,
const char *
set, __weapon weapon);
93 char palette[PALETTE_STR_LEN];
97 char alternativeImagePath[128];
98 char alternativeBasePath[128];
101 bool8 Init_custom_animation(
const char *anim_name);
102 bool8 Find_anim_type(__mega_set_names *anim,
const char *name);
103 bool8 Set_texture(
const char *texture_name);
104 bool8 Set_palette(
const char *palette_name);
105 bool8 Set_mesh(
const char *mesh_name);
106 bool8 Set_override_pose(
const char *override_pose_name);
107 bool8 Cancel_override_pose();
108 void Promote_non_generic();
109 int8 IsAnimTable(int32 i);
110 void MakeAnimEntry(int32 i);
111 int Preload_file(
const char *file);
115 uint32 anim_name_hash[__TOTAL_ANIMS];
116 uint32 info_name_hash[__TOTAL_ANIMS];
119 uint32 shadow_mesh_hash;
123 uint32 override_pose_hash;
124 uint32 custom_pose_hash;
128 char base_path[BASE_PATH_STR_LEN];
129 uint32 base_path_hash;
133 char image_path[IMAGE_PATH_STR_LEN];
136 bool8 has_custom_path_built;
145 scriptedLookBoneTarget;
151 char anim_name[__TOTAL_ANIMS][ANIM_NAME_STR_LEN];
152 char info_name[__TOTAL_ANIMS][ANIM_NAME_STR_LEN];
153 char mesh_name[ANIM_NAME_STR_LEN];
154 char shadow_mesh_name[ANIM_NAME_STR_LEN];
155 char texture_name[PALETTE_STR_LEN];
156 char palette_name[PALETTE_STR_LEN];
157 char pose_name[ANIM_NAME_STR_LEN];
158 char custom_pose_name[ANIM_NAME_STR_LEN];
159 char override_pose_name[ANIM_NAME_STR_LEN];
164 char *get_anim_name(int32 i) {
return anim_name[i]; }
165 char *get_info_name(int32 i) {
return info_name[i]; }
166 char *get_mesh_name() {
return mesh_name; }
167 char *get_shadow_mesh_name() {
return shadow_mesh_name; }
168 char *get_texture_name() {
return texture_name; }
169 char *get_palette_name() {
return palette_name; }
170 char *get_pose_name() {
return pose_name; }
171 char *get_custom_pose_name() {
return custom_pose_name; }
172 char *get_override_pose_name() {
return override_pose_name; }
176 inline int8 _vox_image::IsAnimTable(int32 i) {
178 if (anim_table[i] == (int8)-1)
180 return anim_table[i];
189 enum CameraStateEnum { OFF_CAMERA = 0x0, ON_CAMERA = 0x1 };
191 #define THIS_CYCLE_SHIFT 1 192 #define LAST_CYCLE_SHIFT 0 193 #define LAST_CYCLE_MASK ((1 << THIS_CYCLE_SHIFT) - 1) 195 #define MAKE_VIEW_STATE(last, this) (last | (this << THIS_CYCLE_SHIFT)) 198 #define OFF_OFF_CAMERA MAKE_VIEW_STATE(OFF_CAMERA, OFF_CAMERA) 201 #define ON_OFF_CAMERA MAKE_VIEW_STATE(ON_CAMERA, OFF_CAMERA) 204 #define OFF_ON_CAMERA MAKE_VIEW_STATE(OFF_CAMERA, ON_CAMERA) 207 #define ON_ON_CAMERA MAKE_VIEW_STATE(ON_CAMERA, ON_CAMERA) 209 #define DEFAULT_HEIGHT 170 217 uint32 barrier_list[MAX_bars];
218 uint32 nudge_list[MAX_bars];
220 uint32 number_of_barriers;
221 uint32 number_of_nudge;
222 uint32 number_of_animating;
224 __mega_set_names next_anim_type;
228 PXfloat actual_target_pan;
230 PXfloat auto_target_pan;
241 char chr_name[MAX_CHAR_NAME_LENGTH];
242 char anim_set[MAX_OUTFIT_NAME_LENGTH];
243 char custom_set[MAX_CUSTOM_NAME_LENGTH];
260 int16 dynLightX, dynLightY, dynLightZ;
265 int16 bulletInitialHeight;
267 uint8 bulletBounced, bulletColour;
281 bool8 has_exclusive_coords;
284 bool8 make_remora_beep;
286 uint8 inShadePercentage;
288 bool8 use_strike_script;
289 bool8 use_fire_script;
291 bool8 on_players_floor;
303 uint8 async_list_pos;
304 __weapon async_weapon;
307 int8 footstep_status;
308 uint8 footstep_weight;
309 bool8 footstep_special;
316 PXreal bottom_x, bottom_z;
322 uint32 slice_hold_tolerance;
325 bool8 inventoryActive;
333 void InitCartridgeCase(
SVECTOR *initPos, int16 initialHeight);
335 bool8 Fetch_armed_status();
336 bool8 Fetch_custom();
337 __weapon Fetch_pose();
341 void ShiftViewState();
343 void SetThisViewState(
enum CameraStateEnum status);
345 void InitDynamicLight();
350 void SetDynamicLight(int32 in_cycles, int32 in_r, int32 in_g, int32 in_b, int32 in_x, int32 in_y, int32 in_z, int32 falloff);
352 void RemoveDynamicLight() { dynLightOn = 0; }
356 inline void _mega::ShiftViewState() { viewState = (uint8)((viewState >> THIS_CYCLE_SHIFT) & (LAST_CYCLE_MASK)); }
360 inline void _mega::SetThisViewState(
enum CameraStateEnum status) { viewState = (uint8)((viewState & LAST_CYCLE_MASK) | ((int)status << THIS_CYCLE_SHIFT)); }
362 enum _object_image_type { PROP, VOXEL };
364 enum _prop_interact_type { __THREE_SIXTY = 1, __ICB, __RADIAL };
367 prop_camera_hold = 1,
368 mega_player_floor_hold,
369 mega_initial_floor_hold,
378 __MEGA_PLAYER_FLOOR_HELD,
379 __MEGA_INITIAL_FLOOR_HELD,
380 __CUSTOM_SIMPLE_ANIMATE,
381 __CUSTOM_BUTTON_OPERATED_DOOR,
387 #define THREE_SIXTY_INTERACT 2 388 #define PROP_CROUCH_INTERACT 1 397 uint32 anim_direction;
398 _object_status ob_status;
400 uint32 owner_floor_rect;
402 uint32 list[MAX_list];
406 char *logic[TREE_SIZE];
407 char *logic_ref[TREE_SIZE];
408 _object_image_type image_type;
409 __object_type object_type;
410 uint32 conversation_uid;
412 __mega_set_names cur_anim_type;
418 PXfloat prop_interact_pan;
419 PXreal interact_dist;
420 _prop_interact_type prop_interact_method;
421 int32 radial_interact_distance;
428 PXfloat auto_display_pan;
431 uint32 slowest_cycle_time;
432 _hold_mode hold_mode;
438 bool8 player_can_interact;
439 bool8 context_request;
441 bool8 prop_coords_set;
442 uint8 three_sixty_interact;
444 bool8 do_not_disturb;
447 bool8 prop_on_this_screen;
452 char ob_name[ENGINE_STRING_LEN];
455 void ___init(
const char *name);
458 const char *GetName()
const {
return ob_name; }
460 void GetPosition(PXreal &x, PXreal &y, PXreal &z)
const {
461 bool8 isActor = (bool8)(image_type == VOXEL);
464 x = mega->actor_xyz.x;
465 y = mega->actor_xyz.y;
466 z = mega->actor_xyz.z;
Definition: px_route_barriers.h:190
Definition: px_common.h:166
Definition: rlp_api.h:118
Definition: px_capri_maths.h:53
Definition: object_structs.h:391
Definition: route_manager.h:74
Definition: object_structs.h:83
Definition: object_structs.h:211