30 #include "engines/icb/p4_generic.h" 31 #include "engines/icb/object_structs.h" 32 #include "engines/icb/common/px_linkeddatafile.h" 33 #include "engines/icb/common/px_game_object.h" 34 #include "engines/icb/common/px_walkarea_integer.h" 35 #include "engines/icb/barriers.h" 36 #include "engines/icb/player.h" 37 #include "engines/icb/map_marker.h" 38 #include "engines/icb/prim_route_builder.h" 39 #include "engines/icb/speech.h" 40 #include "engines/icb/text_sprites.h" 41 #include "engines/icb/string_vest.h" 42 #include "engines/icb/set.h" 46 enum __chi_think_mode { __FOLLOWING = 1, __LOST = 2, __NOTHING = 3 };
53 __ANIMATE_TO_FIGHT_HELP,
65 enum __barrier_result {
73 enum __alert { __ASTOOD, __ARUNNING, __AWALKING, __APUNCHING };
82 #define DEFAULT_interact_distance (500*500*REAL_ONE) 84 #define MAX_extra_floors 12 88 uint32 num_extra_floors;
89 uint32 extra_floors[MAX_extra_floors];
92 #define MAX_player_history 10 104 #define HISTORY_RUBBER (30 * REAL_ONE) 105 #define MAX_local_history 3 106 #define TIME_to_next_local_history (1 * 12) 112 #define NO_CAMERA_CHOSEN 0xfffffffe 114 #define MAX_session_objects MAX_props // number of game objects allowed per session (and their structs) 119 #define MAX_voxel_list 24 124 #define MAX_missing_objects 16 125 #define MAX_missing_object_name_length 32 127 #define MAX_auto_interact 20 130 #define ALWAYS_HIT_DIST (300 * REAL_ONE) 132 #define MAX_conveyors 10 134 #define MAX_footstepFloors 32 146 #define MAX_lift_platforms 10 154 #define MAX_stairs 32 158 PXfloat pan, pan_ref, x, z;
166 uint8 opposite_number;
177 void ___init(
const char *mission,
const char *new_session_name);
180 void Pre_initialise_objects();
183 void One_logic_cycle();
185 void Pre_logic_event_check();
186 const char *Fetch_session_name();
187 const char *Fetch_h_session_name();
188 const char *Fetch_session_h_name();
189 const char *Fetch_session_cluster();
190 uint32 Fetch_session_cluster_hash();
191 void Initialise_set(
const char *name,
const char *cluster_name);
194 void UpdateOnOffCamera();
197 inline int32 SetOK();
198 inline void SetReset();
201 void Stage_draw_poly();
202 void Display_mega_times();
206 void Rebuild_working_buffers();
207 void Render_3d_nicos();
208 void Show_lit_unlit_diagnostics();
210 int32 GetSelectedPropId();
211 void GetSelectedPropRGB(uint8 &r, uint8 &g, uint8 &b);
212 bool8 IsPropSelected(
const char *propName);
214 int32 GetSelectedMegaId();
215 void GetSelectedMegaRGB(uint8 &r, uint8 &g, uint8 &b);
217 uint32 Fetch_number_of_props();
218 uint32 Fetch_number_of_objects();
219 _logic *Fetch_object_struct(uint32
id);
220 uint32 Fetch_cur_id();
221 uint32 Fetch_script_var();
222 _object_status Fetch_object_status(uint32
id);
223 void Set_object_status(uint32
id, _object_status val);
224 const char *Fetch_object_name(uint32
id);
225 void Force_context_check(uint32
id);
226 uint32 Fetch_named_objects_id(
const char *name)
const;
227 inline uint32 Fetch_object_integer_variable(
const char *pcName,
const char *pcVar)
const;
229 uint32 Validate_prop_anim(
const char *anim_name);
231 uint32 Fetch_prop_state(
char *prop_name);
232 void Set_prop_state(
char *name, uint32 value);
234 void Script_version_check();
236 bool8 Rig_test_mode();
238 void Custom_simple_animator();
239 void Custom_button_operated_door();
240 void Custom_auto_door();
242 void Reset_all_objects();
244 void Process_player_floor_status();
246 void Restart_player();
248 bool8 Engine_start_interaction(
const char *script, uint32
id);
250 void Setup_prop_sleep_states();
255 bool8 can_save, prev_save_state;
256 void Set_can_save(bool8 stat) {
263 mcodeFunctionReturnCodes fn_test(int32 &, int32 *);
264 mcodeFunctionReturnCodes fn_create_mega(int32 &, int32 *);
265 mcodeFunctionReturnCodes fn_prop_animate(int32 &, int32 *);
266 mcodeFunctionReturnCodes fn_set_voxel_image_path(int32 &, int32 *);
267 mcodeFunctionReturnCodes fn_set_xyz(int32 &, int32 *);
268 mcodeFunctionReturnCodes fn_set_pan(int32 &, int32 *);
269 mcodeFunctionReturnCodes fn_set_to_floor(int32 &, int32 *);
270 mcodeFunctionReturnCodes fn_init_from_nico_file(int32 &, int32 *);
271 mcodeFunctionReturnCodes fn_init_from_marker_file(int32 &, int32 *);
272 mcodeFunctionReturnCodes fn_shut_down_object(int32 &, int32 *);
273 mcodeFunctionReturnCodes fn_context_chosen_logic(int32 &, int32 *);
274 mcodeFunctionReturnCodes fn_pause(int32 &, int32 *);
275 mcodeFunctionReturnCodes fn_face_coord(int32 &, int32 *);
276 mcodeFunctionReturnCodes fn_face_object(int32 &, int32 *);
277 mcodeFunctionReturnCodes fn_play_generic_anim(int32 &, int32 *);
278 mcodeFunctionReturnCodes fn_play_custom_anim(int32 &, int32 *);
279 mcodeFunctionReturnCodes fn_start_player_interaction(int32 &, int32 *);
280 mcodeFunctionReturnCodes fn_custom_prop_interact(int32 &, int32 *);
281 mcodeFunctionReturnCodes fn_generic_prop_interact(int32 &, int32 *);
282 mcodeFunctionReturnCodes fn_set_player_can_interact(int32 &, int32 *);
283 mcodeFunctionReturnCodes fn_set_player_cannot_interact(int32 &, int32 *);
284 mcodeFunctionReturnCodes fn_register_for_event(int32 &, int32 *);
285 mcodeFunctionReturnCodes fn_unregister_for_event(int32 &, int32 *);
286 mcodeFunctionReturnCodes fn_post_event(int32 &, int32 *);
287 mcodeFunctionReturnCodes fn_call_socket(int32 &, int32 *);
288 mcodeFunctionReturnCodes fn_register_object_for_event(int32 &, int32 *);
289 mcodeFunctionReturnCodes fn_unregister_object_for_event(int32 &, int32 *);
290 mcodeFunctionReturnCodes fn_register_for_line_of_sight(int32 &, int32 *);
291 mcodeFunctionReturnCodes fn_unregister_for_line_of_sight(int32 &, int32 *);
292 mcodeFunctionReturnCodes fn_register_object_for_line_of_sight(int32 &, int32 *);
293 mcodeFunctionReturnCodes fn_unregister_object_for_line_of_sight(int32 &, int32 *);
294 mcodeFunctionReturnCodes fn_post_future_event(int32 &, int32 *);
295 mcodeFunctionReturnCodes fn_post_repeating_event(int32 &, int32 *);
296 mcodeFunctionReturnCodes fn_prop_set_to_first_frame(int32 &, int32 *);
297 mcodeFunctionReturnCodes fn_prop_set_to_last_frame(int32 &, int32 *);
298 mcodeFunctionReturnCodes fn_can_see(int32 &, int32 *);
299 mcodeFunctionReturnCodes fn_can_object_see(int32 &, int32 *);
300 mcodeFunctionReturnCodes fn_prop_near_a_mega(int32 &, int32 *);
301 mcodeFunctionReturnCodes socket_force_new_logic(int32 &, int32 *);
302 mcodeFunctionReturnCodes fn_set_weapon(int32 &, int32 *);
303 mcodeFunctionReturnCodes fn_request_speech(int32 &, int32 *);
304 mcodeFunctionReturnCodes fn_add_talker(int32 &, int32 *);
305 mcodeFunctionReturnCodes fn_issue_speech_request(int32 &, int32 *);
306 mcodeFunctionReturnCodes fn_confirm_requests(int32 &, int32 *);
307 mcodeFunctionReturnCodes fn_converse(int32 &, int32 *);
308 mcodeFunctionReturnCodes fn_anon_speech_invite(int32 &, int32 *);
309 mcodeFunctionReturnCodes fn_set_mega_field_of_view(int32 &, int32 *);
310 mcodeFunctionReturnCodes fn_apply_bullet(int32 &, int32 *);
311 mcodeFunctionReturnCodes fn_add_inventory_item(int32 &, int32 *);
312 mcodeFunctionReturnCodes fn_remove_inventory_item(int32 &, int32 *);
313 mcodeFunctionReturnCodes fn_initialise_inventory(int32 &, int32 *);
314 mcodeFunctionReturnCodes fn_is_carrying(int32 &, int32 *);
315 mcodeFunctionReturnCodes fn_reset_player(int32 &, int32 *);
316 mcodeFunctionReturnCodes fn_speak(int32 &, int32 *);
317 mcodeFunctionReturnCodes speak_object_face_object(int32 &, int32 *);
318 mcodeFunctionReturnCodes speak_play_generic_anim(int32 &, int32 *);
319 mcodeFunctionReturnCodes speak_wait_for_everyone(int32 &, int32 *);
320 mcodeFunctionReturnCodes fn_get_weapon(int32 &, int32 *);
321 mcodeFunctionReturnCodes fn_rig_test(int32 &, int32 *);
322 mcodeFunctionReturnCodes fn_item_held(int32 &, int32 *);
323 mcodeFunctionReturnCodes fn_is_holding(int32 &, int32 *);
324 mcodeFunctionReturnCodes fn_drop(int32 &, int32 *);
325 mcodeFunctionReturnCodes fn_set_to_last_frame_generic_anim(int32 &, int32 *);
326 mcodeFunctionReturnCodes fn_play_common_xa_music(int32 &, int32 *);
327 mcodeFunctionReturnCodes fn_pass_flag_to_engine(int32 &, int32 *);
328 mcodeFunctionReturnCodes fn_init_mega_from_nico(int32 &, int32 *);
329 mcodeFunctionReturnCodes fn_remora_is_active(int32 &, int32 *);
330 mcodeFunctionReturnCodes fn_easy_play_generic_anim(int32 &, int32 *);
331 mcodeFunctionReturnCodes fn_teleport(int32 &, int32 *);
332 mcodeFunctionReturnCodes fn_get_pan_from_nico(int32 &, int32 *);
333 mcodeFunctionReturnCodes fn_teleport_to_nico(int32 &, int32 *);
334 mcodeFunctionReturnCodes fn_are_we_on_this_floor(int32 &, int32 *);
335 mcodeFunctionReturnCodes fn_is_object_on_our_floor(int32 &, int32 *);
336 mcodeFunctionReturnCodes fn_is_object_on_screen(int32 &, int32 *);
337 mcodeFunctionReturnCodes fn_is_object_dead(int32 &, int32 *);
338 mcodeFunctionReturnCodes fn_set_custom(int32 &, int32 *);
339 mcodeFunctionReturnCodes fn_message(int32 &, int32 *);
340 mcodeFunctionReturnCodes fn_message_var(int32 &, int32 *);
341 mcodeFunctionReturnCodes fn_get_state_flag(int32 &, int32 *);
342 mcodeFunctionReturnCodes fn_clear_all_events(int32 &, int32 *);
343 mcodeFunctionReturnCodes fn_check_event_waiting(int32 &, int32 *);
344 mcodeFunctionReturnCodes fn_get_last_event_sender_id(int32 &, int32 *);
345 mcodeFunctionReturnCodes fn_near(int32 &, int32 *);
346 mcodeFunctionReturnCodes fn_easy_play_custom_anim(int32 &, int32 *);
347 mcodeFunctionReturnCodes fn_snap_face_object(int32 &, int32 *);
348 mcodeFunctionReturnCodes fn_teleport_z(int32 &, int32 *);
349 mcodeFunctionReturnCodes fn_on_screen(int32 &, int32 *);
350 mcodeFunctionReturnCodes fn_hold_if_off_screen(int32 &, int32 *);
351 mcodeFunctionReturnCodes fn_mega_interacts(int32 &, int32 *);
352 mcodeFunctionReturnCodes fn_restart_object(int32 &, int32 *);
353 mcodeFunctionReturnCodes fn_object_near_nico(int32 &, int32 *);
354 mcodeFunctionReturnCodes fn_remora_get_mode(int32 &, int32 *);
355 mcodeFunctionReturnCodes fn_remora_set_mode(int32 &, int32 *);
356 mcodeFunctionReturnCodes fn_teleport_y_to_id(int32 &, int32 *);
357 mcodeFunctionReturnCodes fn_call_socket_id(int32 &, int32 *);
358 mcodeFunctionReturnCodes fn_lift_process_list(int32 &, int32 *);
359 mcodeFunctionReturnCodes fn_add_object_name_to_list(int32 &, int32 *);
360 mcodeFunctionReturnCodes fn_add_object_id_to_list(int32 &, int32 *);
361 mcodeFunctionReturnCodes fn_post_named_event_to_object(int32 &, int32 *);
362 mcodeFunctionReturnCodes fn_route_to_nico(int32 &, int32 *);
363 mcodeFunctionReturnCodes fn_hold_while_list_near_nico(int32 &, int32 *);
364 mcodeFunctionReturnCodes fn_set_watch(int32 &, int32 *);
365 mcodeFunctionReturnCodes fn_get_persons_weapon(int32 &, int32 *);
366 mcodeFunctionReturnCodes fn_kill_me(int32 &, int32 *);
367 mcodeFunctionReturnCodes fn_kill_object(int32 &, int32 *);
368 mcodeFunctionReturnCodes fn_set_to_first_frame_custom_anim(int32 &, int32 *);
369 mcodeFunctionReturnCodes fn_set_to_last_frame_custom_anim(int32 &, int32 *);
370 mcodeFunctionReturnCodes fn_shut_down_event_processing(int32 &, int32 *);
371 mcodeFunctionReturnCodes fn_player(int32 &, int32 *);
372 mcodeFunctionReturnCodes fn_three_sixty_interact(int32 &, int32 *);
373 mcodeFunctionReturnCodes fn_route_to_marker(int32 &, int32 *);
374 mcodeFunctionReturnCodes fn_play_mission_xa_music(int32 &, int32 *);
375 mcodeFunctionReturnCodes fn_play_common_vag_music(int32 &, int32 *);
376 mcodeFunctionReturnCodes fn_play_mission_vag_music(int32 &, int32 *);
377 mcodeFunctionReturnCodes fn_near_list(int32 &, int32 *);
378 mcodeFunctionReturnCodes fn_get_list_result(int32 &, int32 *);
379 mcodeFunctionReturnCodes fn_event_check_last_sender(int32 &, int32 *);
380 mcodeFunctionReturnCodes fn_add_icon_to_icon_list(int32 &, int32 *);
381 mcodeFunctionReturnCodes fn_remove_icon_from_icon_list(int32 &, int32 *);
382 mcodeFunctionReturnCodes fn_remora_is_email_waiting(int32 &, int32 *);
383 mcodeFunctionReturnCodes fn_destroy_icon_list(int32 &, int32 *);
384 mcodeFunctionReturnCodes fn_remora_send_email(int32 &, int32 *);
385 mcodeFunctionReturnCodes fn_remora_menu_return(int32 &, int32 *);
386 mcodeFunctionReturnCodes fn_remora_picture(int32 &, int32 *);
387 mcodeFunctionReturnCodes fn_remora_clear_screen(int32 &, int32 *);
388 mcodeFunctionReturnCodes fn_new_apply_bullet(int32 &, int32 *);
389 mcodeFunctionReturnCodes fn_new_script(int32 &, int32 *);
390 mcodeFunctionReturnCodes fn_random(int32 &, int32 *);
391 mcodeFunctionReturnCodes fn_change_session(int32 &, int32 *);
392 mcodeFunctionReturnCodes fn_changed_sessions(int32 &, int32 *);
393 mcodeFunctionReturnCodes fn_remora_set_current_zoom(int32 &, int32 *);
394 mcodeFunctionReturnCodes speak_add_chooser_icon(int32 &, int32 *);
395 mcodeFunctionReturnCodes speak_user_chooser(int32 &, int32 *);
396 mcodeFunctionReturnCodes fn_is_there_interact_object(int32 &, int32 *);
397 mcodeFunctionReturnCodes fn_get_interact_object_id(int32 &, int32 *);
398 mcodeFunctionReturnCodes fn_is_object_interact_object(int32 &, int32 *);
399 mcodeFunctionReturnCodes speak_chosen(int32 &, int32 *);
400 mcodeFunctionReturnCodes fn_remora_add_icon(int32 &, int32 *);
401 mcodeFunctionReturnCodes fn_remora_remove_icon(int32 &, int32 *);
402 mcodeFunctionReturnCodes fn_remora_reset_icon_list(int32 &, int32 *);
403 mcodeFunctionReturnCodes fn_remora_choose(int32 &, int32 *);
404 mcodeFunctionReturnCodes fn_simple_chi(int32 &, int32 *);
405 mcodeFunctionReturnCodes fn_chi(int32 &, int32 *);
406 mcodeFunctionReturnCodes speak_menu_still_active(int32 &, int32 *);
407 mcodeFunctionReturnCodes speak_menu_choices_remain(int32 &, int32 *);
408 mcodeFunctionReturnCodes speak_close_menu(int32 &, int32 *);
409 mcodeFunctionReturnCodes speak_new_menu(int32 &, int32 *);
410 mcodeFunctionReturnCodes speak_end_conversation(int32 &, int32 *);
411 mcodeFunctionReturnCodes speak_end_menu(int32 &, int32 *);
412 mcodeFunctionReturnCodes speak_add_special_chooser_icon(int32 &, int32 *);
413 mcodeFunctionReturnCodes fn_floor_and_floor_camera_linked(int32 &, int32 *);
414 mcodeFunctionReturnCodes fn_is_object_adjacent(int32 &, int32 *);
415 mcodeFunctionReturnCodes fn_is_object_on_this_floor(int32 &, int32 *);
416 mcodeFunctionReturnCodes fn_get_objects_lvar_value(int32 &, int32 *);
417 mcodeFunctionReturnCodes fn_mega_generic_interact(int32 &, int32 *);
418 mcodeFunctionReturnCodes fn_set_objects_lvar_value(int32 &, int32 *);
419 mcodeFunctionReturnCodes fn_is_registered_for_event(int32 &, int32 *);
420 mcodeFunctionReturnCodes fn_is_object_registered_for_event(int32 &, int32 *);
421 mcodeFunctionReturnCodes fn_set_object_sight_range(int32 &, int32 *);
422 mcodeFunctionReturnCodes fn_set_object_sight_height(int32 &, int32 *);
423 mcodeFunctionReturnCodes fn_switch_on_the_really_neat_and_special_script_debugging_facility(int32 &, int32 *);
424 mcodeFunctionReturnCodes fn_switch_off_the_really_neat_and_special_script_debugging_facility(int32 &, int32 *);
425 mcodeFunctionReturnCodes fn_sound_heard_this(int32 &, int32 *);
426 mcodeFunctionReturnCodes fn_can_see_in_dark(int32 &, int32 *);
427 mcodeFunctionReturnCodes fn_mega_never_in_shadow(int32 &, int32 *);
428 mcodeFunctionReturnCodes fn_remora_new_menu_on_icon(int32 &, int32 *);
429 mcodeFunctionReturnCodes fn_remora_new_menu(int32 &, int32 *);
430 mcodeFunctionReturnCodes fn_no_logic(int32 &, int32 *);
431 mcodeFunctionReturnCodes fn_gosub(int32 &, int32 *);
432 mcodeFunctionReturnCodes fn_set_custom_simple_animator(int32 &, int32 *);
433 mcodeFunctionReturnCodes fn_tiny_route(int32 &, int32 *);
434 mcodeFunctionReturnCodes fn_sharp_route(int32 &, int32 *);
435 mcodeFunctionReturnCodes fn_set_custom_button_operated_door(int32 &, int32 *);
436 mcodeFunctionReturnCodes fn_test_prop_anim(int32 &, int32 *);
437 mcodeFunctionReturnCodes fn_lift2_process(int32 &, int32 *);
438 mcodeFunctionReturnCodes fn_post_named_event_to_object_id(int32 &, int32 *);
439 mcodeFunctionReturnCodes fn_set_custom_auto_door(int32 &, int32 *);
440 mcodeFunctionReturnCodes fn_switch_to_manual_camera(int32 &, int32 *);
441 mcodeFunctionReturnCodes fn_cancel_manual_camera(int32 &, int32 *);
442 mcodeFunctionReturnCodes fn_carrying_how_many(int32 &, int32 *);
443 mcodeFunctionReturnCodes fn_preload_custom_mega_anim(int32 &, int32 *);
444 mcodeFunctionReturnCodes fn_remora_wait_on_icon(int32 &, int32 *);
445 mcodeFunctionReturnCodes fn_reverse_generic_anim(int32 &, int32 *);
446 mcodeFunctionReturnCodes fn_register_for_auto_interaction(int32 &, int32 *);
447 mcodeFunctionReturnCodes fn_sound_set_hearing_sensitivity(int32 &, int32 *);
448 mcodeFunctionReturnCodes fn_suspend_events(int32 &, int32 *);
449 mcodeFunctionReturnCodes fn_unsuspend_events(int32 &, int32 *);
450 mcodeFunctionReturnCodes fn_sound_heard_something(int32 &, int32 *);
451 mcodeFunctionReturnCodes fn_prime_player_history(int32 &, int32 *);
452 mcodeFunctionReturnCodes fn_start_chi_following(int32 &, int32 *);
453 mcodeFunctionReturnCodes fn_inherit_prop_anim_height(int32 &, int32 *);
454 mcodeFunctionReturnCodes fn_record_player_interaction(int32 &, int32 *);
455 mcodeFunctionReturnCodes fn_mega_use_lift(int32 &, int32 *);
456 mcodeFunctionReturnCodes fn_snap_to_nico_y(int32 &, int32 *);
457 mcodeFunctionReturnCodes fn_inherit_prop_anim_height_id(int32 &, int32 *);
458 mcodeFunctionReturnCodes fn_route_to_custom_prop_interact(int32 &, int32 *);
459 mcodeFunctionReturnCodes fn_route_to_generic_prop_interact(int32 &, int32 *);
460 mcodeFunctionReturnCodes fn_fetch_chi_mode(int32 &, int32 *);
461 mcodeFunctionReturnCodes fn_lib_lift_chord_and_chi(int32 &, int32 *);
462 mcodeFunctionReturnCodes fn_set_interacting(int32 &, int32 *);
463 mcodeFunctionReturnCodes fn_clear_interacting(int32 &, int32 *);
464 mcodeFunctionReturnCodes fn_remora_emp_flash(int32 &, int32 *);
465 mcodeFunctionReturnCodes fn_remora_mark_email_read(int32 &, int32 *);
466 mcodeFunctionReturnCodes fn_do_not_disturb(int32 &, int32 *);
467 mcodeFunctionReturnCodes fn_remora_check_email_id(int32 &, int32 *);
468 mcodeFunctionReturnCodes fn_remora_set_map_knowledge_level(int32 &, int32 *);
469 mcodeFunctionReturnCodes fn_remora_fix_motion_scan_xz(int32 &, int32 *);
470 mcodeFunctionReturnCodes fn_remora_update_player(int32 &, int32 *);
471 mcodeFunctionReturnCodes fn_remora_script_activate(int32 &, int32 *);
472 mcodeFunctionReturnCodes fn_remora_script_deactivate(int32 &, int32 *);
473 mcodeFunctionReturnCodes fn_line_of_sight_suspend(int32 &, int32 *);
474 mcodeFunctionReturnCodes fn_line_of_sight_unsuspend(int32 &, int32 *);
475 mcodeFunctionReturnCodes fn_check_for_nico(int32 &, int32 *);
476 mcodeFunctionReturnCodes fn_sony_door_interact(int32 &, int32 *);
477 mcodeFunctionReturnCodes fn_apply_anim_y(int32 &, int32 *);
478 mcodeFunctionReturnCodes fn_remora_default_logic(int32 &, int32 *);
479 mcodeFunctionReturnCodes fn_line_of_sight_now(int32 &, int32 *);
480 mcodeFunctionReturnCodes fn_play_sfx(int32 &, int32 *);
481 mcodeFunctionReturnCodes fn_stop_sfx(int32 &, int32 *);
482 mcodeFunctionReturnCodes fn_set_to_first_frame_generic_anim(int32 &, int32 *);
483 mcodeFunctionReturnCodes fn_easy_play_generic_anim_with_pan(int32 &, int32 *);
484 mcodeFunctionReturnCodes speak_play_custom_anim(int32 &, int32 *);
485 mcodeFunctionReturnCodes speak_set_custom(int32 &, int32 *);
486 mcodeFunctionReturnCodes fn_check_for_chi(int32 &, int32 *);
487 mcodeFunctionReturnCodes fn_wait_for_chi(int32 &, int32 *);
488 mcodeFunctionReturnCodes fn_send_chi_to_this_object(int32 &, int32 *);
489 mcodeFunctionReturnCodes fn_set_ids_lvar_value(int32 &, int32 *);
490 mcodeFunctionReturnCodes fn_teleport_to_nico_y(int32 &, int32 *);
491 mcodeFunctionReturnCodes fn_is_id_the_player(int32 &, int32 *);
492 mcodeFunctionReturnCodes fn_set_to_exlusive_coords(int32 &, int32 *);
493 mcodeFunctionReturnCodes fn_chi_wait_for_player_to_move(int32 &, int32 *);
494 mcodeFunctionReturnCodes fn_set_evil(int32 &, int32 *);
495 mcodeFunctionReturnCodes fn_remora_menu_return_on_icon(int32 &, int32 *);
496 mcodeFunctionReturnCodes fn_remora_mega_says(int32 &, int32 *);
497 mcodeFunctionReturnCodes fn_changed_via_this_shaft(int32 &, int32 *);
498 mcodeFunctionReturnCodes fn_get_objects_x(int32 &, int32 *);
499 mcodeFunctionReturnCodes fn_get_objects_y(int32 &, int32 *);
500 mcodeFunctionReturnCodes fn_get_objects_z(int32 &, int32 *);
501 mcodeFunctionReturnCodes fn_set_cad_lock_status(int32 &, int32 *);
502 mcodeFunctionReturnCodes fn_are_we_on_screen(int32 &, int32 *);
503 mcodeFunctionReturnCodes fn_reset_icon_list(int32 &, int32 *);
504 mcodeFunctionReturnCodes fn_get_speech_status(int32 &, int32 *);
505 mcodeFunctionReturnCodes fn_interact_choose(int32 &, int32 *);
506 mcodeFunctionReturnCodes fn_is_mega_within_area(int32 &, int32 *);
507 mcodeFunctionReturnCodes fn_get_cad_state_flag(int32 &, int32 *);
508 mcodeFunctionReturnCodes fn_end_mission(int32 &, int32 *);
509 mcodeFunctionReturnCodes fn_remora_set_max_zoom(int32 &, int32 *);
510 mcodeFunctionReturnCodes fn_remora_set_min_zoom(int32 &, int32 *);
511 mcodeFunctionReturnCodes fn_route_to_near_mega(int32 &, int32 *);
512 mcodeFunctionReturnCodes fn_stop_chi_following(int32 &, int32 *);
513 mcodeFunctionReturnCodes fn_set_pose(int32 &, int32 *);
514 mcodeFunctionReturnCodes fn_is_crouching(int32 &, int32 *);
515 mcodeFunctionReturnCodes fn_is_armed(int32 &, int32 *);
516 mcodeFunctionReturnCodes fn_push_player_status(int32 &, int32 *);
517 mcodeFunctionReturnCodes fn_pop_player_status(int32 &, int32 *);
518 mcodeFunctionReturnCodes fn_post_third_party_speech(int32 &, int32 *);
519 mcodeFunctionReturnCodes fn_fast_face_object(int32 &, int32 *);
520 mcodeFunctionReturnCodes fn_remora_paragraph_text(int32 &, int32 *);
521 mcodeFunctionReturnCodes fn_remora_main_heading(int32 &, int32 *);
522 mcodeFunctionReturnCodes fn_remora_sub_heading(int32 &, int32 *);
523 mcodeFunctionReturnCodes fn_remora_option_text(int32 &, int32 *);
524 mcodeFunctionReturnCodes fn_remora_warning_text(int32 &, int32 *);
525 mcodeFunctionReturnCodes fn_object_rerun_logic_context(int32 &, int32 *);
526 mcodeFunctionReturnCodes fn_interact_near_mega(int32 &, int32 *);
527 mcodeFunctionReturnCodes fn_am_i_player(int32 &, int32 *);
528 mcodeFunctionReturnCodes fn_set_shoot_overide(int32 &, int32 *);
529 mcodeFunctionReturnCodes fn_set_strike_overide(int32 &, int32 *);
530 mcodeFunctionReturnCodes fn_start_conveyor(int32 &, int32 *);
531 mcodeFunctionReturnCodes fn_stop_conveyor(int32 &, int32 *);
532 mcodeFunctionReturnCodes fn_interact_with_id(int32 &, int32 *);
533 mcodeFunctionReturnCodes fn_face_nicos_pan(int32 &, int32 *);
534 mcodeFunctionReturnCodes fn_unregister_for_auto_interaction(int32 &, int32 *);
535 mcodeFunctionReturnCodes fn_register_chi(int32 &, int32 *);
536 mcodeFunctionReturnCodes fn_add_y(int32 &, int32 *);
537 mcodeFunctionReturnCodes fn_register_stairway(int32 &, int32 *);
538 mcodeFunctionReturnCodes fn_play_sfx_xyz(int32 &, int32 *);
539 mcodeFunctionReturnCodes fn_reverse_custom_anim(int32 &, int32 *);
540 mcodeFunctionReturnCodes fn_trace(int32 &, int32 *);
541 mcodeFunctionReturnCodes fn_PLEASE_REUSE_THIS_SLOT_2(int32 &, int32 *);
542 mcodeFunctionReturnCodes fn_PLEASE_REUSE_THIS_SLOT_3(int32 &, int32 *);
543 mcodeFunctionReturnCodes fn_set_player_has_weapon(int32 &, int32 *);
544 mcodeFunctionReturnCodes fn_align_with_floor(int32 &, int32 *);
545 mcodeFunctionReturnCodes fn_sound_new_entry(int32 &, int32 *);
546 mcodeFunctionReturnCodes fn_sound_remove_entry(int32 &, int32 *);
547 mcodeFunctionReturnCodes fn_sound_simulate(int32 &, int32 *);
548 mcodeFunctionReturnCodes fn_set_object_type(int32 &, int32 *);
549 mcodeFunctionReturnCodes fn_register_ladder(int32 &, int32 *);
550 mcodeFunctionReturnCodes fn_play_movie(int32 &, int32 *);
551 mcodeFunctionReturnCodes fn_is_an_object_crouching(int32 &, int32 *);
552 mcodeFunctionReturnCodes fn_play_sfx_offset(int32 &, int32 *);
553 mcodeFunctionReturnCodes fn_play_sfx_time(int32 &, int32 *);
554 mcodeFunctionReturnCodes fn_add_medipacks(int32 &, int32 *);
555 mcodeFunctionReturnCodes fn_use_medipacks(int32 &, int32 *);
556 mcodeFunctionReturnCodes fn_add_ammo_clips(int32 &, int32 *);
557 mcodeFunctionReturnCodes fn_use_ammo_clips(int32 &, int32 *);
558 mcodeFunctionReturnCodes fn_load_players_gun(int32 &, int32 *);
559 mcodeFunctionReturnCodes fn_flash_health(int32 &, int32 *);
560 mcodeFunctionReturnCodes fn_sound_get_x(int32 &, int32 *);
561 mcodeFunctionReturnCodes fn_sound_get_z(int32 &, int32 *);
562 mcodeFunctionReturnCodes fn_set_player_pose(int32 &, int32 *);
563 mcodeFunctionReturnCodes fn_kill_conversations(int32 &, int32 *);
564 mcodeFunctionReturnCodes fn_is_player_running(int32 &, int32 *);
565 mcodeFunctionReturnCodes fn_is_player_walking(int32 &, int32 *);
566 mcodeFunctionReturnCodes fn_set_anim_speed(int32 &, int32 *);
567 mcodeFunctionReturnCodes fn_push_coords(int32 &, int32 *);
568 mcodeFunctionReturnCodes fn_pop_coords(int32 &, int32 *);
569 mcodeFunctionReturnCodes fn_fast_face_coord(int32 &, int32 *);
570 mcodeFunctionReturnCodes fn_sound_fast_face(int32 &, int32 *);
571 mcodeFunctionReturnCodes fn_remora_add_floor_range(int32 &, int32 *);
572 mcodeFunctionReturnCodes fn_remora_reset_floor_ranges(int32 &, int32 *);
573 mcodeFunctionReturnCodes fn_send_chi_to_named_object(int32 &, int32 *);
574 mcodeFunctionReturnCodes fx_narrow_screen(int32 &, int32 *);
575 mcodeFunctionReturnCodes fn_sound_route_to_near(int32 &, int32 *);
576 mcodeFunctionReturnCodes fn_sound_suspend(int32 &, int32 *);
577 mcodeFunctionReturnCodes fn_sound_unsuspend(int32 &, int32 *);
578 mcodeFunctionReturnCodes fn_wandering_custom_prop_interact(int32 &, int32 *);
579 mcodeFunctionReturnCodes fn_wandering_generic_prop_interact(int32 &, int32 *);
580 mcodeFunctionReturnCodes fn_set_texture(int32 &, int32 *);
581 mcodeFunctionReturnCodes fn_set_palette(int32 &, int32 *);
582 mcodeFunctionReturnCodes fn_restart_gamescript(int32 &, int32 *);
583 mcodeFunctionReturnCodes fn_quick_restart(int32 &, int32 *);
584 mcodeFunctionReturnCodes fx_generic_fade(int32 &, int32 *);
585 mcodeFunctionReturnCodes fn_speech_colour(int32 &, int32 *);
586 mcodeFunctionReturnCodes fn_is_current_camera(int32 &, int32 *);
587 mcodeFunctionReturnCodes fn_is_mega_near_mega(int32 &, int32 *);
588 mcodeFunctionReturnCodes fn_easy_play_custom_anim_with_pan(int32 &, int32 *);
589 mcodeFunctionReturnCodes fn_make_remora_beep(int32 &, int32 *);
590 mcodeFunctionReturnCodes fn_shadows_on(int32 &, int32 *);
591 mcodeFunctionReturnCodes fn_shadows_off(int32 &, int32 *);
592 mcodeFunctionReturnCodes fn_set_neck_bone(int32 &, int32 *);
593 mcodeFunctionReturnCodes fn_set_neck_vector(int32 &, int32 *);
594 mcodeFunctionReturnCodes speak_set_neck_vector(int32 &, int32 *);
595 mcodeFunctionReturnCodes fn_simple_look(int32 &, int32 *);
596 mcodeFunctionReturnCodes speak_simple_look(int32 &, int32 *);
597 mcodeFunctionReturnCodes fn_panless_teleport_to_nico(int32 &, int32 *);
598 mcodeFunctionReturnCodes fn_can_mega_see_dead_megas(int32 &, int32 *);
599 mcodeFunctionReturnCodes fn_breath(int32 &, int32 *);
600 mcodeFunctionReturnCodes fn_set_dynamic_light(int32 &, int32 *);
601 mcodeFunctionReturnCodes speak_set_dynamic_light(int32 &, int32 *);
602 mcodeFunctionReturnCodes fn_sharp_route_to_near_mega(int32 &, int32 *);
603 mcodeFunctionReturnCodes fn_spectre_route_to_mega(int32 &, int32 *);
604 mcodeFunctionReturnCodes fn_set_shade_percentage(int32 &, int32 *);
605 mcodeFunctionReturnCodes fn_can_hear_players_feet(int32 &, int32 *);
606 mcodeFunctionReturnCodes fn_is_player_striking(int32 &, int32 *);
607 mcodeFunctionReturnCodes fn_has_mega_our_height(int32 &, int32 *);
608 mcodeFunctionReturnCodes fn_chi_heard_gunshot(int32 &, int32 *);
609 mcodeFunctionReturnCodes fn_prime_custom_anim(int32 &, int32 *);
610 mcodeFunctionReturnCodes fn_preload_basics(int32 &, int32 *);
611 mcodeFunctionReturnCodes fn_play_sfx_special(int32 &, int32 *);
612 mcodeFunctionReturnCodes fn_set_default_footstep_sfx(int32 &, int32 *);
613 mcodeFunctionReturnCodes fn_set_floor_footstep_sfx(int32 &, int32 *);
614 mcodeFunctionReturnCodes fn_set_footstep_weight(int32 &, int32 *);
615 mcodeFunctionReturnCodes fn_set_special_footstep(int32 &, int32 *);
616 mcodeFunctionReturnCodes speak_reverse_custom_anim(int32 &, int32 *);
617 mcodeFunctionReturnCodes speak_preload_custom_anim(int32 &, int32 *);
618 mcodeFunctionReturnCodes fn_register_platform_coords(int32 &, int32 *);
619 mcodeFunctionReturnCodes fn_remora_progress_bar(int32 &, int32 *);
620 mcodeFunctionReturnCodes fn_play_sfx_offset_time(int32 &, int32 *);
621 mcodeFunctionReturnCodes fn_activate_stair_or_ladder(int32 &, int32 *);
622 mcodeFunctionReturnCodes fn_deactivate_stair_or_ladder(int32 &, int32 *);
623 mcodeFunctionReturnCodes fn_set_half_character_width(int32 &, int32 *);
624 mcodeFunctionReturnCodes fn_set_interact_look_height(int32 &, int32 *);
625 mcodeFunctionReturnCodes fn_swordfight(int32 &, int32 *);
626 mcodeFunctionReturnCodes fn_set_visible(int32 &, int32 *);
627 mcodeFunctionReturnCodes fn_set_object_visible(int32 &, int32 *);
628 mcodeFunctionReturnCodes fn_calibrate_chi(int32 &, int32 *);
629 mcodeFunctionReturnCodes fn_set_to_dead(int32 &, int32 *);
630 mcodeFunctionReturnCodes fn_sound_link_floors(int32 &, int32 *);
631 mcodeFunctionReturnCodes fn_remora_blank_line(int32 &, int32 *);
632 mcodeFunctionReturnCodes fn_set_voice_over_colour(int32 &, int32 *);
633 mcodeFunctionReturnCodes fn_default_voice_over_colour(int32 &, int32 *);
634 mcodeFunctionReturnCodes fn_set_camera_hold(int32 &, int32 *);
635 mcodeFunctionReturnCodes fn_set_mega_wait_for_player(int32 &, int32 *);
636 mcodeFunctionReturnCodes fn_set_mega_off_camera_hold(int32 &, int32 *);
637 mcodeFunctionReturnCodes fn_set_mega_slice_hold(int32 &, int32 *);
638 mcodeFunctionReturnCodes fn_set_mesh(int32 &, int32 *);
639 mcodeFunctionReturnCodes fn_sync_with_mega(int32 &, int32 *);
640 mcodeFunctionReturnCodes fn_laser_route(int32 &, int32 *);
641 mcodeFunctionReturnCodes fn_prop_crouch_interact(int32 &, int32 *);
642 mcodeFunctionReturnCodes fn_preload_sting(int32 &, int32 *);
643 mcodeFunctionReturnCodes fn_play_sting(int32 &, int32 *);
644 mcodeFunctionReturnCodes fn_stop_sting(int32 &, int32 *);
645 mcodeFunctionReturnCodes fn_set_sleep(int32 &, int32 *);
647 mcodeFunctionReturnCodes speak_allocate_music(int32 &, int32 *);
648 mcodeFunctionReturnCodes speak_preload_music(int32 &, int32 *);
649 mcodeFunctionReturnCodes speak_play_music(int32 &, int32 *);
650 mcodeFunctionReturnCodes speak_stop_music(int32 &, int32 *);
651 mcodeFunctionReturnCodes speak_end_music(int32 &, int32 *);
653 mcodeFunctionReturnCodes fn_set_sfx(int32 &, int32 *);
654 mcodeFunctionReturnCodes fn_wait_for_button(int32 &, int32 *);
655 mcodeFunctionReturnCodes fn_set_as_player(int32 &, int32 *);
657 mcodeFunctionReturnCodes fn_lock_y(int32 &, int32 *);
658 mcodeFunctionReturnCodes fn_unlock_y(int32 &, int32 *);
659 mcodeFunctionReturnCodes fn_is_current_location(int32 &, int32 *);
660 mcodeFunctionReturnCodes fn_flip_pan(int32 &, int32 *);
661 mcodeFunctionReturnCodes fn_snap_to_ladder_bottom(int32 &, int32 *);
662 mcodeFunctionReturnCodes fn_snap_to_ladder_top(int32 &, int32 *);
664 mcodeFunctionReturnCodes fn_set_manual_interact_object(int32 &, int32 *);
665 mcodeFunctionReturnCodes fn_cancel_manual_interact_object(int32 &, int32 *);
667 mcodeFunctionReturnCodes fn_set_feet_to_pan(int32 &, int32 *);
668 mcodeFunctionReturnCodes fn_room_route(int32 &, int32 *);
669 mcodeFunctionReturnCodes fn_hard_load_generic_anim(int32 &, int32 *);
670 mcodeFunctionReturnCodes fn_hard_load_custom_anim(int32 &, int32 *);
672 mcodeFunctionReturnCodes fn_face_camera(int32 &, int32 *);
673 mcodeFunctionReturnCodes fn_set_interact_distance(int32 &, int32 *);
674 mcodeFunctionReturnCodes fn_display_objects_lvar(int32 &, int32 *);
676 mcodeFunctionReturnCodes fn_activate_sparkle(int32 &, int32 *);
677 mcodeFunctionReturnCodes fn_deactivate_sparkle(int32 &, int32 *);
679 mcodeFunctionReturnCodes fn_is_player_standing_still(int32 &, int32 *);
680 mcodeFunctionReturnCodes fn_set_override_pose(int32 &, int32 *);
681 mcodeFunctionReturnCodes fn_cancel_override_pose(int32 &, int32 *);
683 mcodeFunctionReturnCodes fn_preload_actor_file(int32 &, int32 *);
684 mcodeFunctionReturnCodes fn_preload_mesh(int32 &, int32 *);
685 mcodeFunctionReturnCodes fn_preload_texture(int32 &, int32 *);
686 mcodeFunctionReturnCodes fn_preload_palette(int32 &, int32 *);
687 mcodeFunctionReturnCodes fn_preload_animation(int32 &, int32 *);
688 mcodeFunctionReturnCodes fn_inventory_active(int32 &, int32 *);
689 mcodeFunctionReturnCodes fn_radial_interact(int32 &, int32 *);
690 mcodeFunctionReturnCodes fn_shutdown_inventory(int32 &, int32 *);
691 mcodeFunctionReturnCodes fn_hard_load_mesh(int32 &, int32 *);
692 mcodeFunctionReturnCodes fn_set_mega_height(int32 &, int32 *);
693 mcodeFunctionReturnCodes fn_shadow(int32 &, int32 *);
695 mcodeFunctionReturnCodes fn_is_actor_relative(int32 &, int32 *);
696 mcodeFunctionReturnCodes fn_can_save(int32 &, int32 *);
698 void Set_script(
const char *script_name);
699 void Context_check(uint32 script_name);
700 void Shut_down_object();
701 void Shut_down_object(
const char *ascii);
702 bool8 Console_shut_down_object(
const char *name);
703 void Console_shut_down_all_objects();
704 void Console_shut_down_all_mega_objects();
705 bool8 Free_object(
const char *name);
706 void Shut_down_id(uint32
id);
707 void Set_objects_conversation_uid(uint32
id, uint32 uid);
708 uint32 Return_objects_conversation_uid(uint32
id);
709 void List_session_mega_objects();
711 bool8 Call_socket(uint32
id,
const char *script, int32 *retval);
713 CGame *socket_object;
715 void Create_initial_route(__rtype type);
717 bool8 Process_route();
718 void Reset_route_manager();
723 bool8 Calc_target_pan(PXreal x, PXreal z, PXreal x2, PXreal z2);
724 bool8 Calc_target_pan_no_bones(PXreal x, PXreal z, PXreal x2, PXreal z2);
726 void Animate_turn_to_pan(__mega_set_names anim_type, uint32 speedup);
728 void Advance_auto_pan();
730 bool8 Is_route_required(PXreal startx, PXreal startz, PXreal destx, PXreal destz);
732 bool8 Setup_route(int32 &result, int32 corex, int32 corez, int32 runs, __rtype type, int32 end_on_stand);
738 mcodeFunctionReturnCodes Route_to_near_mega_core(
const char *name, int32 run, int32 initial_turn, uint32 dist, int32 walk_to_run, int32 &result);
740 void Start_new_router_game_cycle();
741 void Set_router_busy();
742 bool8 Is_router_busy();
745 char speech_conv_name[ENGINE_STRING_LEN];
758 #define S speech_info[0] 762 uint32 no_click_zone;
765 int32 selected_prop_id;
767 int32 selected_mega_id;
769 void Service_speech();
770 void End_conversation(uint32 uid);
771 void Exit_speech(uint32
id);
774 void Format_remora_text(
const char *pcText, int32 nLineSpacing, int32 nCharSpacing, uint32 nMaxWidth);
775 void Create_remora_text(uint32 x, uint32 y,
const char *ascii,
776 int32 margin, _pin_position pin_pos, int32 lineSpacing, int32 charSpacing,
778 bool8 analysisAlreadyDone = FALSE8,
779 int32 stopAtLine = -1);
780 void Kill_remora_text();
782 uint32 Fetch_no_barriers();
784 uint32 Fetch_no_megas_barriers();
785 uint32 Fetch_no_megas_nudge_barriers();
787 uint32 Fetch_megas_barrier_number(uint32 barrier);
788 uint32 Fetch_megas_nudge_barrier_number(uint32 barrier);
790 uint32 External_fetch_no_megas_barriers(uint32
id);
791 uint32 External_fetch_no_megas_nudge_barriers(uint32
id);
792 uint32 External_fetch_no_megas_anim_barriers(uint32
id);
793 uint32 External_fetch_megas_barrier(uint32
id, uint32 barrier);
794 uint32 External_fetch_megas_nudge_barrier(uint32
id, uint32 barrier);
796 PXfloat adjusted_pan;
799 __barrier_result Check_barrier_bump_and_bounce(PXreal newx, PXreal newy, PXreal newz, PXreal oldx, PXreal oldy, PXreal oldz, bool8 player);
801 __barrier_result Check_this_barrier(
RouteBarrier *bar, PXreal newx, PXreal newz, PXreal oldx, PXreal oldz, PXreal bar_close, int32 *ignore);
803 void Prepare_megas_route_barriers(bool8 player);
804 void Prepare_megas_abarriers(uint32 slice_number, uint32 parent_number);
805 void Fetch_mega_barriers_for_player();
808 bool8 Advance_frame_and_motion(__mega_set_names anim_type, bool8 player, uint8 nFrames);
809 __barrier_result Core_advance(__mega_set_names anim_type, bool8 player, uint8 nFrames);
810 bool8 Easy_frame_and_motion(__mega_set_names anim_type, bool8 player, uint8 nFrames);
811 bool8 Easy_frame_motion_and_pan(__mega_set_names anim_type, bool8 player);
812 bool8 Reverse_frame_and_motion(__mega_set_names anim_type, bool8 player, uint8 nFrames);
813 __barrier_result Core_reverse(__mega_set_names anim_type, bool8 player, uint8 nFrames);
815 void Normalise_anim_pc();
817 void Soft_start_with_single_link(__mega_set_names link_anim, __mega_set_names next_anim);
818 void Soft_start_with_double_link(__mega_set_names link_one, __mega_set_names link_two, __mega_set_names next_anim);
819 void Soft_start_single_anim(__mega_set_names next_anim);
820 int32 Soften_up_anim_file(__mega_set_names link, int32 diff);
822 void Hard_start_single_anim(__mega_set_names next_anim);
824 bool8 Play_reverse_anim();
825 bool8 Play_anim_with_no_movement();
826 bool8 fast_face_object(uint32
id, uint32 speed);
827 bool8 Need_to_turn_to_face_object(uint32
id);
828 bool8 fast_face_rnd(uint32 speed);
830 bool8 Find_interact_marker_in_anim(__mega_set_names anim, PXreal *xoff, PXreal *zoff);
831 bool8 Compute_target_interaction_coordinate(__mega_set_names anim, PXreal *destx, PXreal *destz);
833 void Set_pose(__weapon weapon);
834 void Set_motion(__motion motion);
835 __motion Get_motion();
836 void Change_pose_in_current_anim_set();
838 bool8 Start_generic_ascii_anim(
const char *ascii_name);
839 __mega_set_names Fetch_generic_anim_from_ascii(
const char *ascii_name);
841 bool8 Fetch_cur_megas_armed_status();
842 __weapon Fetch_cur_megas_pose();
843 bool8 Fetch_custom();
844 void Reset_cur_megas_custom_type();
845 const char *Fetch_cur_megas_custom_text();
846 uint32 Fetch_last_frame(__mega_set_names anim);
848 bool8 speech_face_object(uint32 tar_id);
850 mcodeFunctionReturnCodes Core_prop_interact(int32 &result, int32 *params, bool8 custom, bool8 coord_correction);
852 uint32 Fetch_number_of_megas()
const {
853 return (number_of_voxel_ids);
855 uint32 Fetch_voxel_object_id(uint32 i)
const {
856 return (voxel_id_list[i]);
859 void Snap_to_ladder(
_stair *lad, uint32 dist);
860 void Set_init_voxel_floors();
863 uint32 cur_camera_number;
871 char manual_camera_name[ENGINE_STRING_LEN];
874 char *camera_name_list[64];
875 char *camera_cluster_list[64];
877 uint32 floor_to_camera_index[MAX_floors];
880 void Build_camera_table();
881 void Camera_director();
882 void Reset_camera_director();
883 bool8 Object_visible_to_camera(uint32
id);
884 bool8 Process_wa_list();
885 void Prepare_camera_floors();
887 bool8 chi_interacts(int32
id,
const char *script_name);
888 __chi_think_mode fn_fetch_chi_mode();
889 bool8 Make_floor_coordinate(PXreal *x, PXreal *z);
890 bool8 Find_a_chi_target();
891 void Chi_leaves_fight_mode();
892 void Set_chi_permission();
896 _history history[MAX_player_history];
899 uint32 pre_interact_floor;
900 __chi_think_mode chi_think_mode;
901 __chi_do_mode chi_do_mode;
903 uint32 chi_next_move;
905 uint32 local_history_count;
907 uint32 local_count_down;
912 uint32 chi_target_id;
913 bool8 chi_has_target;
915 bool8 permission_to_fire;
916 PXreal chi_catch_up_dist;
917 PXreal chi_lost_dist;
921 void Process_conveyors();
927 void Draw_health_bar();
930 bool8 alert_list[MAX_voxel_list];
931 void Process_guard_alert(__alert alert_type);
932 void Reset_guard_alert();
933 void Signal_to_guards();
934 void Signal_to_other_guards();
936 _player_stat player_stat_was;
937 _player_stat player_stat_use;
938 void Service_generic_async();
939 bool8 Route_async_ready(bool8 run, bool8 turn);
951 _stair stairs[MAX_stairs];
952 uint32 Register_stair_or_ladder(
const char *target, bool8 top, uint32 length, bool8 stair, uint32 stepcms);
954 void Set_state_of_stair_or_ladder(uint32 nIndex, bool8 bState);
956 uint32 prop_state_table[MAX_session_objects];
968 uint32 total_objects;
969 _logic *logic_structs[MAX_session_objects];
971 uint32 num_vox_images;
978 PXreal prop_interact_dist;
990 uint8 auto_interact_list[MAX_auto_interact];
993 char speech_font_one[ENGINE_STRING_LEN];
994 char remora_font[ENGINE_STRING_LEN];
995 uint32 speech_font_one_hash;
996 uint32 remora_font_hash;
1008 bool8 manual_camera;
1011 bool8 wa_tied_to_pin;
1012 bool8 wa_tied_to_exit_pin;
1013 bool8 is_there_a_chi;
1014 bool8 first_session_cycle;
1017 char session_name[ENGINE_STRING_LEN];
1018 char h_session_name[ENGINE_STRING_LEN];
1019 char session_cluster[ENGINE_STRING_LEN];
1021 uint32 session_cluster_hash;
1022 char session_h_name[8];
1035 uint32 script_var_value;
1038 uint8 voxel_id_list[MAX_voxel_list];
1039 uint32 number_of_voxel_ids;
1042 uint32 number_of_missing_objects;
1043 char missing_obs[MAX_missing_objects][MAX_missing_object_name_length];
1044 uint8 missing_ob_prop_states[MAX_missing_objects];
1047 void UpdateFootstep();
1050 void UpdateCartridgeCase();
1052 uint32 defaultFootSfx;
1053 uint32 specialFootSfx;
1054 uint32 ladderFootSfx;
1055 uint32 floorFootSfx[MAX_footstepFloors][2];
1056 int32 numFloorFootSfx;
1063 inline uint32 _game_session::Fetch_script_var() {
1064 return (script_var_value);
1067 inline uint32 _game_session::Fetch_number_of_props() {
1068 return (total_props);
1071 inline uint32 _game_session::Fetch_number_of_objects() {
1072 return (total_objects);
1075 inline _logic *_game_session::Fetch_object_struct(uint32
id) {
1076 assert(
id < total_objects);
1078 return (logic_structs[
id]);
1081 inline void _game_session::Force_context_check(uint32
id) {
1082 assert(
id < total_objects);
1084 logic_structs[id]->context_request = TRUE8;
1087 inline _object_status _game_session::Fetch_object_status(uint32
id) {
1088 assert(
id < total_objects);
1090 return (logic_structs[
id]->ob_status);
1093 inline void _game_session::Set_object_status(uint32
id, _object_status val) {
1094 assert(
id < total_objects);
1096 logic_structs[id]->ob_status = val;
1099 inline const char *_game_session::Fetch_object_name(uint32
id) {
1100 assert(
id < total_objects);
1102 return ((
const char *)(logic_structs[
id]->GetName()));
1105 inline uint32 _game_session::Fetch_cur_id() {
1109 inline uint32 _game_session::Fetch_no_barriers() {
1111 return (L->mega->number_of_barriers);
1114 inline uint32 _game_session::Fetch_no_megas_barriers() {
1116 return (M->number_of_barriers);
1119 inline uint32 _game_session::Fetch_no_megas_nudge_barriers() {
1121 return (M->number_of_nudge);
1124 inline uint32 _game_session::External_fetch_no_megas_barriers(uint32
id) {
1128 return (logic_structs[
id]->mega->number_of_barriers);
1131 inline uint32 _game_session::External_fetch_no_megas_anim_barriers(uint32
id) {
1135 return (logic_structs[
id]->mega->number_of_animating);
1138 inline uint32 _game_session::External_fetch_no_megas_nudge_barriers(uint32
id) {
1142 return (logic_structs[
id]->mega->number_of_nudge);
1145 inline uint32 _game_session::Fetch_megas_barrier_number(uint32 barrier) {
1148 assert(barrier < M->number_of_barriers + M->number_of_animating);
1150 return M->barrier_list[barrier];
1153 inline uint32 _game_session::Fetch_megas_nudge_barrier_number(uint32 barrier) {
1156 assert(barrier < M->number_of_nudge);
1158 return M->nudge_list[barrier];
1161 inline uint32 _game_session::External_fetch_megas_barrier(uint32
id, uint32 barrier) {
1163 assert(barrier < (logic_structs[
id]->mega->number_of_barriers) + (logic_structs[
id]->mega->number_of_animating));
1165 return logic_structs[id]->mega->barrier_list[barrier];
1168 inline uint32 _game_session::External_fetch_megas_nudge_barrier(uint32
id, uint32 barrier) {
1170 assert(barrier < logic_structs[
id]->mega->number_of_nudge);
1172 return logic_structs[id]->mega->nudge_list[barrier];
1175 inline void _game_session::Set_objects_conversation_uid(uint32
id, uint32 uid) {
1176 if (
id >= total_objects)
1177 Fatal_error(
"Object id %d out-of-range (total_objects=%d)",
id, total_objects);
1179 logic_structs[id]->conversation_uid = uid;
1182 inline uint32 _game_session::Return_objects_conversation_uid(uint32
id) {
1183 assert(
id < total_objects);
1185 return (logic_structs[
id]->conversation_uid);
1188 inline const char *_game_session::Fetch_session_name() {
1189 return ((
const char *)session_name);
1192 inline const char *_game_session::Fetch_session_cluster() {
1193 return ((
const char *)session_cluster);
1196 inline const char *_game_session::Fetch_session_h_name() {
1197 return ((
const char *)session_h_name);
1200 inline const char *_game_session::Fetch_h_session_name() {
1201 return ((
const char *)h_session_name);
1204 inline uint32 _game_session::Fetch_session_cluster_hash() {
1205 return (session_cluster_hash);
1208 inline uint32 _game_session::Fetch_object_integer_variable(
const char *pcName,
const char *pcVar)
const {
1209 int32 nVariableNumber;
1213 pGameObject = (
CGame *)LinkedDataObject::Fetch_item_by_name(objects, pcName);
1216 Fatal_error(
"_game_session::Fetch_object_integer_variable( %s, %s ) couldn't find object", pcName, pcVar);
1219 nVariableNumber = CGameObject::GetVariable(pGameObject, pcVar);
1221 if (nVariableNumber == -1)
1222 Fatal_error(
"_game_session::Fetch_object_integer_variable( %s, %s ) couldn't find variable", pcName, pcVar);
1225 return (CGameObject::GetIntegerVariable(pGameObject, nVariableNumber));
1228 inline PXcamera &_game_session::GetCamera() {
return set.GetCamera(); }
1230 inline int32 _game_session::SetOK() {
return set.OK(); }
1232 inline void _game_session::SetReset() {
set.Reset(); }
Definition: barriers.h:82
Definition: object_structs.h:391
Definition: session.h:173
Definition: map_marker.h:57
Definition: text_sprites.h:111
Definition: prim_route_builder.h:46
Definition: route_manager.h:74
Definition: px_linkeddatafile.h:53
Definition: object_structs.h:83
Definition: px_walkarea_integer.h:45
Definition: px_game_object.h:44
Definition: session.h:107
Definition: session.h:156
Definition: px_route_barriers.h:146
Definition: session.h:136
Definition: object_structs.h:211
Definition: px_camera.h:39