|
Wing Commander
Reconstructed Win32 source (1996)
|
Mission requests, viewport setup and packet-memory management. More...
Go to the source code of this file.
Functions | |
| void | cleanup_objectives (void) |
| int | too_busy (short ship) |
| void | reply (short ship, short accepted) |
| int | disobey_formation (short ship) |
| int | bad_target (short ship, short target) |
| short | can_land (void) |
| unsigned int | triumph (short obj) |
| void | engage (short obj, short target, enum ShipObjective objective) |
| short | i_wanna_rout (short ship, int pilot) |
| void | request (short requester, short ship, short command) |
| unsigned short __stdcall | ShouldSuspendCursorForRect (const ShortRect *bounds) |
| unsigned short __stdcall | InitializeDIBScreenViewport (Viewport *viewport, unsigned short colour) |
| void __stdcall | InitFullScreenViewport (Viewport *record, short arg) |
| unsigned int __stdcall | GetPacketSize (const char *filename, short section) |
| int | GetFreeNearHeapBytes (void) |
| int | GetLargestFreeNearHeapBlock (void) |
| void | FrameStartHook (int mode) |
| unsigned short | IsSoundHardwarePresent (short device) |
| void | MessagePumpHook (int mode) |
| void * | PushMemoryStackFrame (void *memory, int offset) |
| int | IsPushedPacketHandle (void *handle) |
| void * | MapPacketHandleToBlock (void *handle) |
Variables | |
| short | anPitchGoal [16] |
| signed char | abShipNavPtIdx [16] |
| signed char | acTurnIntervalArray [16] |
| short | anObjectRollRotationList [SPACE_OBJECT_COUNT] |
| signed char | abShipTurnList [16] |
| HazardField | aHazardFields [8] |
| short | nFacingToTargetValue |
| short | asObjectScreenYArray [SPACE_OBJECT_COUNT] |
| short | asObjectScreenXList [SPACE_OBJECT_COUNT] |
| short | asObjectAnimIndexes [SPACE_OBJECT_COUNT] |
| signed char | cCurrentCockpitView |
| MissionObjective | aMissionObjectivesArray [MISSION_OBJECTIVE_COUNT] |
| enum ShipManeuver | aeShipManeuversTable [12] |
| const short * | apCannedSequenceList [12] |
| FixedVector | aShipMissionSpotArray [10] |
| short | asCapitalShipViewFramesTable [16] |
| signed char | acObjCollisionGraceTicks [SPACE_OBJECT_COUNT] |
| ObjectResourceSlot | aObjectResourceSlotsArray [4] |
| signed char | acShipDestroyedWeaponCountArray [16] |
Mission requests, viewport setup and packet-memory management.
Address range 42efc0-42fa8f.
Definition in file screen.c.
| int bad_target | ( | short | ship, |
| short | target ) |
Definition at line 145 of file screen.c.
References aeShipSide, bad_target(), and too_busy().
Referenced by bad_target(), PlaySfxWaveFileByNumber(), and request().
| short can_land | ( | void | ) |
Definition at line 155 of file screen.c.
References achieved(), aMissionObjectivesArray, anShipFuelsTable, any_enemy(), can_land(), cMissionObjectiveCountValue, evaluate_damage(), nPlayerKillTotal, and visited().
Referenced by can_land(), PlaySfxWaveFileByNumber(), and request().
Definition at line 34 of file screen.c.
References achieved(), affect_mission_score(), aMissionNavPoints, aMissionObjectivesArray, aMissionShips, cleanup_objectives(), distance_from_object(), MissionHeaderDisk::entryNavPoint, find_ship_index(), flag_objective(), MissionHeaderDisk::homeMissionShip, MISSION_TYPE_COME_HOME, MISSION_TYPE_GOTO_WARP, MISSION_TYPE_WARP_ARRIVE, OBJECT_TYPE_DRAYMAN, OBJECT_TYPE_HORNET, MissionNavPoint::proximityRadius, sighted(), MissionShipRecord::state, stCurrentMissionHeader, MissionObjective::type, and visited().
Referenced by cleanup_objectives(), PlaySfxWaveFileByNumber(), and request().
| int disobey_formation | ( | short | ship | ) |
Definition at line 133 of file screen.c.
References aiPilotLevel, any_enemy_tail(), disobey_formation(), and report_kilrathi_rout().
Referenced by disobey_formation(), PlaySfxWaveFileByNumber(), and request().
| void engage | ( | short | obj, |
| short | target, | ||
| enum ShipObjective | objective ) |
| void FrameStartHook | ( | int | mode | ) |
Definition at line 444 of file screen.c.
References FrameStartHook(), and TimerResetHook().
Referenced by FrameStartHook(), GameFlow(), main(), and PlaySfxWaveFileByNumber().
| int GetFreeNearHeapBytes | ( | void | ) |
Definition at line 394 of file screen.c.
References DosNearPtrToFar(), GetFreeNearHeapBytes(), nCurrentNearHeapFirstDescriptor, nNearHeapBase, nNearHeapSize, and NearHeapBlock::sizeAndFlags.
Referenced by GetFreeNearHeapBytes(), and PlaySfxWaveFileByNumber().
| int GetLargestFreeNearHeapBlock | ( | void | ) |
Definition at line 415 of file screen.c.
References DosNearPtrToFar(), GetLargestFreeNearHeapBlock(), nCurrentNearHeapFirstDescriptor, nNearHeapBase, nNearHeapSize, and NearHeapBlock::sizeAndFlags.
Referenced by GetLargestFreeNearHeapBlock().
| unsigned int __stdcall GetPacketSize | ( | const char * | filename, |
| short | section ) |
Definition at line 368 of file screen.c.
References CloseDataFileByHandle(), PacketSectionHandle::compression, PacketSectionHandle::dataSize, GetPacketSize(), nPacketError, OpenPacketSection(), and ReadPacketSectionData().
Referenced by ejection_sequence(), FetchDiskPacketRetrying(), GetPacketSize(), LoadPacketAllocated(), LoadPacketResourceList(), PlaySfxWaveFileByNumber(), and ReportPacketLoadError().
| short i_wanna_rout | ( | short | ship, |
| int | pilot ) |
Definition at line 182 of file screen.c.
References aeShipMissionType, any_enemy(), i_wanna_rout(), MISSION_TYPE_CANNED_SEQUENCE, and triumph().
Referenced by i_wanna_rout(), PlaySfxWaveFileByNumber(), and request().
Definition at line 355 of file screen.c.
References AllocateViewport(), Viewport::bottom, InitFullScreenViewport(), Viewport::left, pFullScreenRecord, Viewport::right, and Viewport::top.
Referenced by InitFullScreenViewport(), and PlaySfxWaveFileByNumber().
| unsigned short __stdcall InitializeDIBScreenViewport | ( | Viewport * | viewport, |
| unsigned short | colour ) |
Definition at line 327 of file screen.c.
References awScreenRowOffsets, Viewport::bottom, GetDIBPixelBuffer(), InitializeDIBScreenViewport(), Viewport::left, nVideoMode, pAllocatedScreenViewport, Viewport::pixels, pScreenAllocPtr, Viewport::right, Viewport::rowOffsets, ScreenAllocation::state, stCurrentScreenAlloc, SystemDebugPrintf(), Viewport::top, ScreenAllocation::viewport, and void().
Referenced by InitializeDIBScreenViewport(), InitializeGameTextContexts(), and PlaySfxWaveFileByNumber().
| int IsPushedPacketHandle | ( | void * | handle | ) |
Definition at line 481 of file screen.c.
References aiPktHandleDeltas, apPacketHandlesList, IsPushedPacketHandle(), and nPacketHandleTotal.
Referenced by IsPushedPacketHandle(), PacketLoad(), and PlaySfxWaveFileByNumber().
| unsigned short IsSoundHardwarePresent | ( | short | device | ) |
Definition at line 450 of file screen.c.
References GetSoundHardwareFlag(), and IsSoundHardwarePresent().
Referenced by IsSoundHardwarePresent(), LoadOriginFxDrivers(), and PlaySfxWaveFileByNumber().
Definition at line 499 of file screen.c.
References aiPktHandleDeltas, apPacketHandlesList, MapPacketHandleToBlock(), and nPacketHandleTotal.
Referenced by MapPacketHandleToBlock(), PlaySfxWaveFileByNumber(), and ReleasePacketHandle().
| void MessagePumpHook | ( | int | mode | ) |
Definition at line 457 of file screen.c.
References MessagePumpHook(), and TimerStopHook().
Referenced by LogMemoryUsage(), MessagePumpHook(), and PlaySfxWaveFileByNumber().
Definition at line 463 of file screen.c.
References aiPktHandleDeltas, apPacketHandlesList, exit_squadron(), nPacketHandleTotal, and PushMemoryStackFrame().
Referenced by AllocateTaggedMemory(), PlaySfxWaveFileByNumber(), and PushMemoryStackFrame().
| void reply | ( | short | ship, |
| short | accepted ) |
Definition at line 123 of file screen.c.
References reply(), and send_message().
Referenced by PlaySfxWaveFileByNumber(), reply(), and request().
| void request | ( | short | requester, |
| short | ship, | ||
| short | command ) |
Definition at line 204 of file screen.c.
References acShipRating, acShipTargetTable, aeObjectClass, aeShipObjectiveList, aeShipSide, aeSpecialManeuvers, aiPilotLevel, allow_engage(), alter_objective(), bad_target(), bEngageAllowed, bLandingAuthorized, bRadioSilence, can_land(), cleanup_objectives(), disallow_engage(), disobey_formation(), engage(), i_wanna_rout(), nAutoEngageTimer, OBJECT_CLASS_SHIP, OBJECTIVE_BREAK_FORMATION, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOLD_FORMATION, RandomBelow(), reply(), request(), reset_objective(), send_message(), SPECIAL_MANEUVER_UNKNOWN_9, too_busy(), and try2rout().
Referenced by Chosen_communicate_option(), HandleSpaceFlightControls(), PlaySfxWaveFileByNumber(), and request().
| unsigned short __stdcall ShouldSuspendCursorForRect | ( | const ShortRect * | bounds | ) |
Definition at line 320 of file screen.c.
References ShouldSuspendCursorForRect(), and void().
Referenced by PlaySfxWaveFileByNumber(), RecRoom(), and ShouldSuspendCursorForRect().
| int too_busy | ( | short | ship | ) |
Definition at line 117 of file screen.c.
References aeShipMissionType, MISSION_TYPE_ROUT, and too_busy().
Referenced by bad_target(), PlaySfxWaveFileByNumber(), request(), and too_busy().
| signed char abShipNavPtIdx[16] |
Definition at line 14 of file screen.c.
Referenced by cruise_home(), cruise_to_destination(), get_first_follow_point(), get_follow_point(), house_keep_objects(), someone_coming(), and unwarp().
| signed char abShipTurnList[16] |
Definition at line 17 of file screen.c.
Referenced by abandoned(), cruise_home(), cruise_to_destination(), defend_mission(), escort_mission(), FireOnAlternateTurns(), init_intelligence_data(), and regulate_turn().
| signed char acObjCollisionGraceTicks[SPACE_OBJECT_COUNT] |
Definition at line 29 of file screen.c.
Referenced by drop_mine(), fire_weapon(), house_keep_objects(), init_hazard(), and object_collision().
| signed char acShipDestroyedWeaponCountArray[16] |
Definition at line 31 of file screen.c.
Referenced by internal_damage(), Set_up_ship_info(), and your_internal_damage().
| signed char acTurnIntervalArray[16] |
Definition at line 15 of file screen.c.
Referenced by find_next_ship_turn_slot(), and regulate_turn().
| enum ShipManeuver aeShipManeuversTable[12] |
Definition at line 25 of file screen.c.
Referenced by advance(), fire_weapon(), house_keep_objects(), init_intelligence_data(), perform_maneuver(), pick_from_list(), pick_regular_maneuver(), process_maneuver_node(), remove_object(), reset_maneuver(), try2reset_maneuver(), unactive(), unwarp(), and warp().
| HazardField aHazardFields[8] |
Definition at line 18 of file screen.c.
Referenced by add_hazard_field(), check_hazards(), and start_hazard_field().
| MissionObjective aMissionObjectivesArray[MISSION_OBJECTIVE_COUNT] |
Definition at line 24 of file screen.c.
Referenced by achieved(), AddUniqueObjectiveNavLabel(), arrive_from_warp(), auto_pilot_sequence(), auto_pilot_valid(), Build_objective_list(), BuildMap(), can_land(), CentreMouseOnCurrentNavObjective(), changetrack(), check_visit(), cleanup_objectives(), coming_home(), cruise_home(), draw_nav_pointer(), find_objective(), flag_objective(), flag_reached(), get_follow_point(), HandleBarracksBunkSelection(), hidden_objective(), LocateMobileObjective(), mobile_objective(), nav_note(), objective_lost(), objective_name(), SelectNavObjectiveAtPoint(), set_new_objective(), set_objective_range(), SetScale(), sighted(), update_objective_location(), and visited().
| short anObjectRollRotationList[SPACE_OBJECT_COUNT] |
Definition at line 16 of file screen.c.
Referenced by apply_force_to_object(), auto_pilot_sequence(), check_for_lost_control(), draw_target_box(), init_ijk(), players_flight_dynamics(), rotate_eye_to_goal(), rotate_object(), rotate_object_to_goal(), rotational_acceleration(), and Title_Sequence().
| short anPitchGoal[16] |
Definition at line 13 of file screen.c.
Referenced by advance_canned_sequence(), auto_pilot_sequence(), formation_break(), general_zig(), Mgloat(), Mstrafe_enemy(), Mtight_loop(), Mwabble(), no_goal(), point_ship(), rotate_object_to_goal(), steady_object(), steer_away_from_object(), steer_away_from_predicted_object(), trim_goals(), update_canned_sequence(), and veer_random().
| ObjectResourceSlot aObjectResourceSlotsArray[4] |
Definition at line 30 of file screen.c.
Referenced by free_all_slots(), free_ship(), get_right_shape(), get_shape_slot(), init_3Space_objects(), load_all_slots(), load_ship(), new_sphere_shapes(), and shape_loaded().
| const short* apCannedSequenceList[12] |
Definition at line 26 of file screen.c.
Referenced by advance_canned_sequence(), init_intelligence_data(), and Set_up_ship_info().
| short asCapitalShipViewFramesTable[16] |
Definition at line 28 of file screen.c.
Referenced by get_right_shape(), load_ship(), release_all_capital_ship_shapes(), release_capital_ship_shapes(), remove_object(), Set_up_ship_info(), and ShipExplosion().
| FixedVector aShipMissionSpotArray[10] |
Definition at line 27 of file screen.c.
Referenced by cruise_home(), cruise_to_destination(), dist_from_home(), inherit_leader_mission(), init_intelligence_data(), and patrol_area().
| short asObjectAnimIndexes[SPACE_OBJECT_COUNT] |
Definition at line 22 of file screen.c.
Referenced by animate_shape(), and set_objects_data().
| short asObjectScreenXList[SPACE_OBJECT_COUNT] |
Definition at line 21 of file screen.c.
Referenced by animate_object(), animate_shape(), build_your_target_list(), check_sighting(), check_target(), crash_time(), draw_nav_pointer(), draw_sorted_objects_to_buffer(), draw_target_box(), DrawTargetRangeReadout(), easy2see(), Explosion(), find_vacant_3d_object(), house_keep_objects(), inflict_damage(), manage_hazard(), object_collision(), ok_hazard_spot(), place_exhaust_on_ships(), remove_object(), reposition_fixed_child_objects(), servicetrack(), set_up_action_sphere(), show_target_disp(), ShowCarrierLaunchSequence(), sort_object_depth(), target_locking(), transform_objects_to_your_view(), and update_star_field().
| short asObjectScreenYArray[SPACE_OBJECT_COUNT] |
Definition at line 20 of file screen.c.
Referenced by draw_nav_pointer(), draw_sorted_objects_to_buffer(), draw_target_box(), easy2see(), place_exhaust_on_ships(), reposition_fixed_child_objects(), ShowCarrierLaunchSequence(), target_locking(), and transform_objects_to_your_view().
| signed char cCurrentCockpitView |
Definition at line 23 of file screen.c.
Referenced by draw_3d_scanner(), draw_cockpit_lights(), DrawPilotHandFrame(), explosion_draw(), fire_weapon(), free_cockpit(), init_hazard(), initialize_cockpit(), InitializeCockpitResources(), overlay_head_up_display(), place_damage_on_cockpit(), player_input(), print_message_text(), rotational_pos_to_scanner_pos(), RunTrainSim(), set_up_screen_viewport(), show_damage_disp(), show_weapon_disp(), try_far_spot(), update_VDUs(), and vdu_polygon().
| short nFacingToTargetValue |
Definition at line 19 of file screen.c.
Referenced by being_tailed(), chase_location(), cruise_to_destination(), facing_to_object(), fire(), fire_when_ready(), futurion_intelligence(), get_facing_range_from_point(), goto_formation(), goto_location(), heat_seeking_missile_intelligence(), house_keep_objects(), intelligence_events(), Mbuzz_debris(), Mget_distance(), Mkill_missile(), Mram_missile(), Msit_n_spin(), Mtarget_missile(), Mveer_away(), prepare_for_jump(), prevent_collision(), and ShipAiState35().