|
Wing Commander
Reconstructed Win32 source (1996)
|
Campaign flow and mission scoring. More...
#include "wc1.h"Go to the source code of this file.
Functions | |
| void | add_statistics (short pilot, short missions, short kills) |
| void | PostMission (void) |
| int | FullMissionScore (void) |
| int | PlayersMissionScore (void) |
| unsigned int | UpdateSeries (void) |
| unsigned int | MoveNewCampaign (void) |
| unsigned int | StartNewCampaign (short campaign) |
| short | GameFlow (void) |
| void __stdcall | free_viewport (Viewport *viewport) |
Variables | |
| int | bOfficeVisitPending = 0 |
| int | bPromotionPending = 0 |
| int | bPlayerEjectedThisMission = 0 |
| int | bPlayerShipTypeChanged = 0 |
| short | nPreviousPlayerShipType = 0 |
| int | bCampaignStartupMode = 0 |
| static short | nPendingMedalIndex = -1 |
| static short | nPostSeriesSequence = -1 |
| static unsigned short | bSeriesFailed = 1 |
| int | bCampaignActive = 0 |
| int | nViewAllocTotal |
| unsigned char * | apViewportAllocations [128] |
| int | nFreeViewCallsValue |
| short | nQueuedCampaignIndex |
| short | nMissionMedalScoreValue |
| short | nCampaignDataSet |
Campaign flow and mission scoring.
Address range 40efe0-40fa2f. The viewport-disposal helper at its end, free_viewport, stays here provisionally.
Definition in file gameflow.c.
| void add_statistics | ( | short | pilot, |
| short | missions, | ||
| short | kills ) |
Definition at line 33 of file gameflow.c.
References add_statistics(), apWingmanPilotsList, PilotRecord::kills, and PilotRecord::missions.
Referenced by add_statistics(), and PostMission().
Definition at line 420 of file gameflow.c.
References Viewport::allocation, apViewportAllocations, free_viewport(), nFreeViewCallsValue, nVideoMode, nViewAllocTotal, Viewport::pixels, ReleasePacketHandle(), Viewport::rowOffsets, stSceneBuffer, and stScreenView.
Referenced by BarracksScreen(), BriefingMap_DisplayMap(), FetchDiskPacketRetrying(), free_cockpit(), free_viewport(), GetScreenUpdateFlag(), InflightComputer(), PromptInsertNumberedDisk(), RecRoom(), ResetScreenClipToFullHeight(), RestoreModalTextPanel(), and ShowTrainSimHighScores().
| int FullMissionScore | ( | void | ) |
Definition at line 105 of file gameflow.c.
References CampaignState::currentMission, CampaignState::currentSeries, FullMissionScore(), pMissionCampaignInfo, and stCampaignState.
Referenced by DeBriefing(), FullMissionScore(), ParseTests(), and UpdateSeries().
| short GameFlow | ( | void | ) |
Definition at line 244 of file gameflow.c.
References AddRandomTrainSimHighScores(), aMissionShips, AwardCampaignMedal(), BarracksScreen(), bCampaignActive, bCampaignStartupMode, bKeyEventQueueEnabled, bOfficeVisitPending, bPanRoomTransition, bPlayerEjectedThisMission, bPlayerShipTypeChanged, bPromotionPending, Briefing(), bSeriesFailed, calculate_damage_level(), CampaignState::campaignIndex, check_stranded(), CampaignState::currentMission, CampaignState::currentPilot, CampaignState::currentSeries, death_sequence(), DeBriefing(), ejection_sequence(), CampaignState::elapsedDate, FrameStartHook(), free_3Space(), free_all_slots(), free_cockpit(), funeral_sequence(), GameFlow(), init_mission(), landing(), LaunchPlayerShip(), MaxShort(), MoveNewCampaign(), nArcadeState, nCampaignDataSet, nCurrentWingmanKilledThisMission, nDebriefingPersonality, nPendingMedalIndex, nPlayerCollisionObject, nPostSeriesSequence, nQueuedCampaignIndex, Office(), MissionHeaderDisk::playerMissionShip, CampaignState::playerShipType, PlayScrambleHangarScene(), pMissionCampaignInfo, PostMission(), CampaignState::promotionScore, PumpWindowMessages(), RandomInRange(), PilotRecord::rank, RecRoom(), RunSpaceFlight(), RunTrainSim(), scramble(), ShowCampaignVictorySequence(), ShowCarrierLaunchSequence(), ShowMeanwhileTransition(), ShowTheEndScreen(), ShowTigerClawEscapeScene(), stCampaignState, stCurrentMissionHeader, stranded_sequence(), MissionShipRecord::type, UpdateSeries(), and CampaignDate::year.
Referenced by GameFlow(), and main().
| unsigned int MoveNewCampaign | ( | void | ) |
Definition at line 213 of file gameflow.c.
References CampaignState::currentMission, CampaignDate::day, MoveNewCampaign(), pCurrentCampaignDate, RandomInRange(), stCampaignState, and CampaignDate::year.
Referenced by GameFlow(), and MoveNewCampaign().
| int PlayersMissionScore | ( | void | ) |
Definition at line 122 of file gameflow.c.
References achieved(), CampaignState::currentMission, CampaignState::currentSeries, PlayersMissionScore(), pMissionCampaignInfo, and stCampaignState.
Referenced by DeBriefing(), ParseTests(), PlayersMissionScore(), and UpdateSeries().
Definition at line 40 of file gameflow.c.
References acShipRating, add_statistics(), CampaignState::badges, CAMPAIGN_BADGE_FIFTEEN_MISSIONS, CAMPAIGN_BADGE_FIRST_MISSION, CAMPAIGN_BADGE_FIVE_KILLS, CAMPAIGN_BADGE_FIVE_MISSIONS, CAMPAIGN_BADGE_SHIP_TYPE_BASE, CAMPAIGN_BADGE_TEN_MISSIONS, CAMPAIGN_BADGE_TWENTY_FIVE_KILLS, CampaignState::currentPilot, PilotRecord::kills, PilotRecord::missions, nPlayerKillTotal, nWingmanKillCount, nYourWingman, CampaignState::personalityDeathMission, CampaignState::playerShipType, PostMission(), CampaignState::promotionScore, RandomInRange(), and stCampaignState.
Referenced by GameFlow(), and PostMission().
| unsigned int StartNewCampaign | ( | short | campaign | ) |
Definition at line 227 of file gameflow.c.
References asCampaignPilotFiles, bCampaignActive, bCampaignStartupMode, bPanRoomTransition, CampaignState::campaignIndex, LoadPacketIntoBuffer(), nCampaignDataSet, nQueuedCampaignIndex, pMissionCampaignInfo, ResetCampaignData(), RunTrainSim(), StartNewCampaign(), and stCampaignState.
Referenced by main(), and StartNewCampaign().
| unsigned int UpdateSeries | ( | void | ) |
Definition at line 140 of file gameflow.c.
References bOfficeVisitPending, bPlayerShipTypeChanged, bSeriesFailed, CampaignState::currentMission, CampaignState::currentSeries, FullMissionScore(), MaxShort(), CampaignState::missionScore, nCurrentWingmanKilledThisMission, nMissionMedalScoreValue, nPendingMedalIndex, nPostSeriesSequence, nPreviousPlayerShipType, pCurrentCampaignDate, CampaignState::playerShipType, PlayersMissionScore(), pMissionCampaignInfo, CampaignState::promotionScore, CampaignState::seriesHistory, CampaignState::seriesHistoryCount, CampaignState::seriesScore, stCampaignState, stSavedCampaignDate, and UpdateSeries().
Referenced by GameFlow(), and UpdateSeries().
| unsigned char* apViewportAllocations[128] |
Definition at line 26 of file gameflow.c.
Referenced by AllocateViewport(), free_viewport(), and ValidateViewportBounds().
| int bCampaignActive = 0 |
Definition at line 22 of file gameflow.c.
Referenced by BarracksScreen(), ConfirmReplaceFaultyData(), GameFlow(), LoadGameFromSlot(), main(), SaveGameWithNamePrompt(), and StartNewCampaign().
| int bCampaignStartupMode = 0 |
Definition at line 16 of file gameflow.c.
Referenced by GameFlow(), main(), RunTrainSim(), StartNewCampaign(), and UpdateTrainSimHighScores().
| int bOfficeVisitPending = 0 |
Definition at line 11 of file gameflow.c.
Referenced by GameFlow(), ParseTests(), and UpdateSeries().
| int bPlayerEjectedThisMission = 0 |
Definition at line 13 of file gameflow.c.
Referenced by GameFlow(), and ParseTests().
| int bPlayerShipTypeChanged = 0 |
Definition at line 14 of file gameflow.c.
Referenced by GameFlow(), ParseTests(), and UpdateSeries().
| int bPromotionPending = 0 |
Definition at line 12 of file gameflow.c.
Referenced by GameFlow(), and ParseTests().
|
static |
Definition at line 21 of file gameflow.c.
Referenced by GameFlow(), and UpdateSeries().
| short nCampaignDataSet |
Definition at line 30 of file gameflow.c.
Referenced by AwardCampaignMedal(), funeral_sequence(), GameFlow(), LoadBriefingData(), LoadGameFromSlot(), LoadMissionData(), Office(), RecRoom(), RunTrainSim(), and StartNewCampaign().
| int nFreeViewCallsValue |
Definition at line 27 of file gameflow.c.
Referenced by free_viewport().
| short nMissionMedalScoreValue |
Definition at line 29 of file gameflow.c.
Referenced by affect_mission_score(), prepare_mission(), show_info_disp(), and UpdateSeries().
|
static |
Definition at line 18 of file gameflow.c.
Referenced by GameFlow(), and UpdateSeries().
|
static |
Definition at line 20 of file gameflow.c.
Referenced by GameFlow(), and UpdateSeries().
| short nPreviousPlayerShipType = 0 |
Definition at line 15 of file gameflow.c.
Referenced by ParseTests(), and UpdateSeries().
| short nQueuedCampaignIndex |
Definition at line 28 of file gameflow.c.
Referenced by GameFlow(), LoadGameFromSlot(), and StartNewCampaign().
| int nViewAllocTotal |
Definition at line 25 of file gameflow.c.
Referenced by AllocateViewport(), free_viewport(), and ValidateViewportBounds().