Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
gameflow.c File Reference

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

Detailed Description

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.

Function Documentation

◆ add_statistics()

void add_statistics ( short pilot,
short missions,
short kills )

◆ free_viewport()

◆ FullMissionScore()

◆ GameFlow()

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().

◆ MoveNewCampaign()

◆ PlayersMissionScore()

◆ PostMission()

◆ StartNewCampaign()

◆ UpdateSeries()

Variable Documentation

◆ apViewportAllocations

unsigned char* apViewportAllocations[128]

Definition at line 26 of file gameflow.c.

Referenced by AllocateViewport(), free_viewport(), and ValidateViewportBounds().

◆ bCampaignActive

int bCampaignActive = 0

◆ bCampaignStartupMode

int bCampaignStartupMode = 0

Definition at line 16 of file gameflow.c.

Referenced by GameFlow(), main(), RunTrainSim(), StartNewCampaign(), and UpdateTrainSimHighScores().

◆ bOfficeVisitPending

int bOfficeVisitPending = 0

Definition at line 11 of file gameflow.c.

Referenced by GameFlow(), ParseTests(), and UpdateSeries().

◆ bPlayerEjectedThisMission

int bPlayerEjectedThisMission = 0

Definition at line 13 of file gameflow.c.

Referenced by GameFlow(), and ParseTests().

◆ bPlayerShipTypeChanged

int bPlayerShipTypeChanged = 0

Definition at line 14 of file gameflow.c.

Referenced by GameFlow(), ParseTests(), and UpdateSeries().

◆ bPromotionPending

int bPromotionPending = 0

Definition at line 12 of file gameflow.c.

Referenced by GameFlow(), and ParseTests().

◆ bSeriesFailed

unsigned short bSeriesFailed = 1
static

Definition at line 21 of file gameflow.c.

Referenced by GameFlow(), and UpdateSeries().

◆ nCampaignDataSet

◆ nFreeViewCallsValue

int nFreeViewCallsValue

Definition at line 27 of file gameflow.c.

Referenced by free_viewport().

◆ nMissionMedalScoreValue

short nMissionMedalScoreValue

Definition at line 29 of file gameflow.c.

Referenced by affect_mission_score(), prepare_mission(), show_info_disp(), and UpdateSeries().

◆ nPendingMedalIndex

short nPendingMedalIndex = -1
static

Definition at line 18 of file gameflow.c.

Referenced by GameFlow(), and UpdateSeries().

◆ nPostSeriesSequence

short nPostSeriesSequence = -1
static

Definition at line 20 of file gameflow.c.

Referenced by GameFlow(), and UpdateSeries().

◆ nPreviousPlayerShipType

short nPreviousPlayerShipType = 0

Definition at line 15 of file gameflow.c.

Referenced by ParseTests(), and UpdateSeries().

◆ nQueuedCampaignIndex

short nQueuedCampaignIndex

Definition at line 28 of file gameflow.c.

Referenced by GameFlow(), LoadGameFromSlot(), and StartNewCampaign().

◆ nViewAllocTotal

int nViewAllocTotal

Definition at line 25 of file gameflow.c.

Referenced by AllocateViewport(), free_viewport(), and ValidateViewportBounds().