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

Campaign victory, retreat and ending scenes. More...

#include "wc1.h"
#include <sys/types.h>

Go to the source code of this file.

Functions

unsigned int init_3Space_objects (short)
void * AllocateTaggedMemory (int size, unsigned short flags)
void ReleasePacketHandle (void *handle)
unsigned int GetFixedOneMillionThunk (short memoryType)
unsigned int GetFixedOneMillionThunkAlt (short memoryType)
void CreateCannedSceneObject (short *object, short yaw, short unusedPitch, short distance, struct Shape *shape, short frame, short type, short scale)
unsigned int ShowCampaignVictorySequence (void)
unsigned int ShowTigerClawEscapeScene (void)
unsigned int ShowTheEndScreen (short enableFireworks)

Variables

static unsigned char abTaggedAllocationPrefix [8]
signed char acShipStressList [16]
short anRollGoal [16]
enum Side aeShipSide [12]
signed char acShipAiCooldowns [16]
FixedVector vCollisionDelta
signed char acLastCollisionObjects [SPACE_OBJECT_COUNT]
short aasShipMaximumShieldTable [10][2]
short asObjectCollisionRadius [64]
signed char acShipPointingModeList [16]
static const char * apszCampaignVictoryText [4]
static const char * pszTigerClawEscapeOpening
static const char * pszTigerClawEscapeJump
static const char * pszTigerClawEscapeClosing
static ShortVector aCampaignVictoryProjectileOrigins [4]
static const char * pszTheEnd = "The End"
static const char * pszForNow = "For Now..."

Detailed Description

Campaign victory, retreat and ending scenes.

Address range 42fa90-43070f. The tagged-allocation helpers at its start stay in this unit provisionally.

Definition in file ending.c.

Function Documentation

◆ AllocateTaggedMemory()

◆ CreateCannedSceneObject()

void CreateCannedSceneObject ( short * object,
short yaw,
short unusedPitch,
short distance,
struct Shape * shape,
short frame,
short type,
short scale )

◆ GetFixedOneMillionThunk()

unsigned int GetFixedOneMillionThunk ( short memoryType)

◆ GetFixedOneMillionThunkAlt()

◆ init_3Space_objects()

unsigned int init_3Space_objects ( short scene)

Definition at line 1904 of file logic.c.

◆ ReleasePacketHandle()

◆ ShowCampaignVictorySequence()

unsigned int ShowCampaignVictorySequence ( void )

Definition at line 132 of file ending.c.

References aCampaignVictoryProjectileOrigins, apszCampaignVictoryText, asCampaignVictoryViewScript, asObjectCollisionRadius, asObjScreenScalesArray, bEscapePressedFlag, bIntroSceneResourcesActive, bScriptedView, cBlackColour, CheckEscaped(), clear_view_buffer(), ClearViewport(), CreateCannedSceneObject(), CampaignVictoryProjectile::depth, DIBslam(), DIBslamReal(), Draw_3Space_Frame(), DrawSpriteDefault(), DrawSpriteScaled(), dump_buffer_to_screen(), FadeViewportPaletteToColour(), FetchDiskPacketRetrying(), CampaignVictoryProjectile::flip, FormatTextBufferFromStart(), free_3Space(), free_all_slots(), init_3Space_objects(), initialize_scripted_view(), InitializeConversationText(), IsFrameTickElapsed(), nCannedSceneMode, nCurrentViewCenterPosX, nCurrentViewCenterPosY, nFrameSkipCounter, nScriptedViewObject, PreloadMusicTrackHook(), RandomBelowOrEqual(), ReleaseMusicTrackHook(), ReleasePacketHandle(), ReleaseTextFont(), RestoreGamePalette(), CampaignVictoryProjectile::scale, CampaignVictoryProjectile::screenX, CampaignVictoryProjectile::screenY, set_up_action_sphere(), SetFrameTimerPeriodDirect(), SetTextContext(), ShowCampaignVictorySequence(), spacetrack(), stCurrentConvTextViewport, stCurrentConvTxtCtx, stModalSrcViewport, StopMusicUnlessSuppressed(), stScreenView, stSpaceBufferViewport, Update_3Space(), WaitForSceneAdvance(), WaitForVerticalBlankThunk(), CampaignVictoryProjectile::x, ShortVector::x, CampaignVictoryProjectile::y, ShortVector::y, and ShortVector::z.

Referenced by GameFlow(), PlaySfxWaveFileByNumber(), RunAnimationDemoLoop(), and ShowCampaignVictorySequence().

◆ ShowTheEndScreen()

◆ ShowTigerClawEscapeScene()

Variable Documentation

◆ aasShipMaximumShieldTable

short aasShipMaximumShieldTable[10][2]

◆ abTaggedAllocationPrefix

unsigned char abTaggedAllocationPrefix[8]
static
Initial value:
= {
'j', 'e', 'f', 'f', 0, 0, 0, 0
}

Definition at line 16 of file ending.c.

Referenced by AllocateTaggedMemory().

◆ aCampaignVictoryProjectileOrigins

ShortVector aCampaignVictoryProjectileOrigins[4]
static
Initial value:
= {
{ -55, 42, 0 }, { -68, 46, 0 },
{ 60, 42, 16 }, { 73, 46, 16 }
}

Definition at line 124 of file ending.c.

Referenced by ShowCampaignVictorySequence().

◆ acLastCollisionObjects

signed char acLastCollisionObjects[SPACE_OBJECT_COUNT]

Definition at line 25 of file ending.c.

Referenced by object_collision(), and set_objects_data().

◆ acShipAiCooldowns

signed char acShipAiCooldowns[16]

Definition at line 23 of file ending.c.

Referenced by intelligence_events(), object_collision(), and ship_intelligence().

◆ acShipPointingModeList

signed char acShipPointingModeList[16]

Definition at line 28 of file ending.c.

Referenced by point_ship(), and Set_up_ship_info().

◆ acShipStressList

signed char acShipStressList[16]

◆ aeShipSide

◆ anRollGoal

◆ apszCampaignVictoryText

const char* apszCampaignVictoryText[4]
static
Initial value:
= {
"Destroying the remains of the Kilrathi naval power in the sector...",
"The Tiger's Claw closes in for the kill...",
"And the last Kilrathi planet in the sector falls!",
0
}

Definition at line 108 of file ending.c.

Referenced by ShowCampaignVictorySequence().

◆ asObjectCollisionRadius

◆ pszForNow

const char* pszForNow = "For Now..."
static

Definition at line 129 of file ending.c.

Referenced by ShowTheEndScreen().

◆ pszTheEnd

const char* pszTheEnd = "The End"
static

Definition at line 128 of file ending.c.

Referenced by ShowTheEndScreen().

◆ pszTigerClawEscapeClosing

const char* pszTigerClawEscapeClosing
static
Initial value:
=
"There'll be other sectors, other battles..."

Definition at line 121 of file ending.c.

Referenced by ShowTigerClawEscapeScene().

◆ pszTigerClawEscapeJump

const char* pszTigerClawEscapeJump
static
Initial value:
=
"The Tiger's Claw manages to jump out. Barely."

Definition at line 118 of file ending.c.

Referenced by ShowTigerClawEscapeScene().

◆ pszTigerClawEscapeOpening

const char* pszTigerClawEscapeOpening
static
Initial value:
=
"Fleeing from the overwelming Kilrathi forces in the sector..."

Definition at line 115 of file ending.c.

Referenced by ShowTigerClawEscapeScene().

◆ vCollisionDelta

FixedVector vCollisionDelta

Definition at line 24 of file ending.c.

Referenced by check_for_collision(), hit_asteroid(), and object_collision().