92 return x > 0 && y > 0 && x + width < 150 && y + height < 135;
97 short width,
short height)
105 if (available == 1) {
110 while (checkX < x + width && available != 0) {
112 while (checkY < y + height && available != 0) {
113 available = (short)((
unsigned short)
173 width = (short)(strlen(text) * 4 + 2);
183 (
short)(y + offset + 5),
184 width, offset == 12) != 0)
187 width, offset == 12) != 0)
190 width, offset == 12) != 0)
193 (
short)(y - offset - 9),
194 width, offset == 12) != 0)
196 }
while (offset != 12);
206 unsigned short colour,
const char *text,
207 short objective,
short missionShip)
211 if (missionShip == -1) {
215 for (previous = 0; previous < objective; previous++) {
219 if (previous < objective)
229 short verticalRadius,
short horizontalRadius,
232 short verticalRadius,
233 short horizontalRadius,
236 short right,
short bottom,
239 short x2,
short y2,
short colour);
245 const char *format, ...);
267 unsigned short top,
unsigned short right,
268 unsigned short bottom);
278 (
unsigned int)(left +
280 labelIndex].text) * 4) &&
295 while (--label > -1) {
318 unsigned short colour,
short reserve)
322 x, y, size, (
short)((size * 7) / 8),
327 x, y, size, (
short)((size * 7) / 8), (
short)colour);
328 if (reserve != 0 && size < 5)
330 (
short)(size * 2 + 1),
331 (
short)(size * 2 + 1));
336 unsigned short top,
unsigned short right,
337 unsigned short bottom);
341 unsigned short size,
signed char colour)
344 (
short)(x + size), (
short)(y + size),
354 short colour,
short reserve)
360 (
short)(x + 1), y, colour);
362 x, (
short)(y + 1), colour);
365 (
short)(y + 1), colour);
369 (
signed char)colour);
371 if (reserve != 0 && size < 5)
373 (
short)(size * 2 + 1),
374 (
short)(size * 2 + 1));
380 short size,
signed char colour)
383 (
short)(x + size), (
short)(y + size), colour);
385 (
short)(x - size), (
short)(y + size), colour);
387 x, (
short)(y - size), colour);
392 unsigned short colour,
short reserve)
396 (
signed char)colour);
397 if (reserve != 0 && size < 5)
399 (
short)(size * 2 + 1),
400 (
short)(size * 2 + 1));
408 short mapX,
short mapY);
410void nav_getxy(
short *x,
short *y,
int worldX,
int worldZ);
412 struct Shape *shape,
short frame);
415 unsigned char colour,
416 signed char background);
422 unsigned short colour,
short reserve)
425 (
short)(x - size), (
short)(y - size),
426 (
short)(x + size), (
short)(y + size),
429 (
short)(x - size), (
short)(y + size),
430 (
short)(x + size), (
short)(y - size),
432 if (reserve != 0 && size < 5)
434 (
short)(size * 2 + 1),
435 (
short)(size * 2 + 1));
441 unsigned short c,
unsigned short d)
448 short size,
unsigned short markerColour,
449 unsigned short textColour,
const char *text)
482 unsigned short labelColour;
483 short missionShipIndex;
484 short objectiveIndex;
503 for (; navPoint->
type != 0;
505 for (slot = 0; slot < 10; slot++) {
507 if (missionShipIndex != -1) {
509 switch (missionShip->
type) {
529 for (objectiveIndex = 0;
543 if (
visited(objectiveIndex) == 0)
577 if (showPlayer != 0) {
596 sprintf(time,
"%02d",
599 "%X%YStandard time %s",
604 colonVisible = showColon;
606 if (colonVisible == 0) {
612 sprintf(time,
"%02d ",
616 if (colonVisible != 0)
623 unsigned char tmp[4];
707 if (showFlightData != 0)
710 if (showFlightData != 0) {
714 "%X%Y Location: %d.%d.%d",
779 if ((
short)(abs(mouseX - mapX) + abs(mouseY - mapY)) < 6 ||
784 if (pathIndex == oldNavPoint)
796 signed char objective;
826 short savedInputMode;
828 short displayedNavPoint;
833 struct Shape *background;
841 displayedNavPoint = *(
short *)&savedNavPoint;
862 if (hasObjectives == 0) {
880 if (displayedNavPoint !=
907 if ((
short)event.
value == 0x1c ||
908 (
short)event.
value == 0x39) {
910 }
else if ((
short)event.
value == 0x31) {
927 *(
signed char *)&savedNavPoint;
void(__cdecl *pIxFree)(void *)
unsigned char bEscapePressedFlag
InputDeviceSample aInputDevSamples[2]
unsigned char cYellowColour
unsigned char cLightGreyColour
MissionHeaderDisk stCurrentMissionHeader
short nNavMapCoordinateScaling
TextContext stDefaultTxtContext
unsigned char cBlackColour
CampaignDate * pElapsedCampaignDatePtr
signed char cMissionObjectiveCountValue
int nCurrentJoystickFailureValue
unsigned char abSeriesAuxData[0x28]
unsigned char cViewportClearColour
int bInflightComputerActive
signed char abFlightPathList[MISSION_OBJECTIVE_COUNT]
int nJoystickDownScaleValue
int nStickMinimumPositionX
unsigned char bInputModeState
TextContext stCurrentNavMapTxtCtx
MissionNavPoint aMissionNavPoints[MISSION_NAV_POINT_COUNT]
int nCurrentJoystickLeftScale
TextContext stMapNavigationLabelTextContext
MouseCursorState stMouseCursorState
int nJoystickHorizontalRangeValue
int nJoystickHorizontalDeadZone
unsigned short awMapNavObjectiveLabelIndex[16]
unsigned char cMagentaColour
int nStickMinimumPositionY
unsigned char cAsteroidColour
char szDefaultTxtBuf[0xc8]
unsigned char cDefaultTextColour
int nCurrentJoystickRawCoordX
Viewport stSpaceBufferViewport
unsigned char cPrimaryTextColour
signed char cCurrentObjective
CampaignState stCampaignState
MissionObjective aMissionObjectivesArray[MISSION_OBJECTIVE_COUNT]
short nCurrentActiveInputDevice
signed char cScreenViewMode
int nJoystickVertDeadZoneValue
short nMenuInputRepeatDelay
int nCurrentJoystickRawCoordY
short nNavMapCenterPositionY
MissionShipRecord aMissionShips[MISSION_SHIP_STORAGE_COUNT]
FixedVector aShipPositionsArray[SPACE_OBJECT_COUNT]
signed char cCurrentNavPtIdx
unsigned char cDarkGreyColour
int nJoystickVerticalRange
unsigned char abMissionAuxData[0x28]
static char szCampaignSector[16]
static ShortRect aNavMapExclusionRects[21]
static char * apszShipMissionTypeNames[11]
static NavMapLabel aNavMapLabels[20]
static NavMapObjectiveStyle aNavMapObjectiveStyles[10]
static short nNavMapReservedAreaCount
static struct Shape * pNavMapShape
short FindNavMapLabelAtPoint(short x, short y)
static short nNavMapLabelCount
PilotRecord * currentPilot
enum ShipMissionType missionType
unsigned char * labelColour
unsigned char * unvisitedColour
unsigned char * markerColour
Umbrella header for the game core.
void LeaveAllocationScope(void)
void DrawViewportLine(Viewport *viewport, short x1, short y1, short x2, short y2, short colour)
void DrawViewportEllipseShadow(Viewport *viewport, short x, short y, short verticalRadius, short horizontalRadius, short colour)
void SetRectBounds(Viewport *viewport, unsigned short left, unsigned short top, unsigned short right, unsigned short bottom)
void PollJoystickButtonEvents(void)
void MoveMenuPointerFromKeyboard(InputEventState *event)
unsigned int InitializeTextContextFromFont(TextContext *context, short fontIndex, unsigned char colour, signed char background)
short __stdcall PollInputEvent(InputEventState *event, short filter)
short LocateMobileObjective(short objective)
unsigned short __stdcall AllocateViewport(Viewport *viewport, short clearColour, short flags)
void DrawNavHazardMarker(FixedVector navPosition, FixedVector offset, short size, unsigned short markerColour, unsigned short textColour, const char *text)
unsigned int force_view(int view, short obj)
short NavMapPointInsideReservedArea(short area, short x, short y)
void DrawNavTextLine(unsigned char alignment, unsigned short colour, const char *format,...)
short NavMapLabelPositionAvailable(short x, short y, short width, short height)
void * FetchDiskPacketRetrying(short logicalFile, short section, short flags)
void AddFixedVectors(const FixedVector *left, const FixedVector *right, FixedVector *sum)
void __stdcall SetTextCursor(unsigned short a, unsigned short b)
void __stdcall SetFrameTimerAndWait(short period)
void DrawViewportPixel(Viewport *viewport, short x, short y, short colour)
void DrawNavMapLegend(void)
short IsPointInNavMapLabel(short label, short x, short y)
void get_player_input(void)
void DrawNavSquareOutline(Viewport *viewport, short x, short y, unsigned short size, signed char colour)
void DrawNavTriangleOutline(Viewport *viewport, short x, short y, short size, signed char colour)
void DrawSpriteDefault(Viewport *viewport, short x, short y, struct Shape *shape, short frame)
short WaitForInputKey(void)
unsigned int GetScreenUpdateFlag(void)
void __stdcall SetEventManagerPump(void(*pump)(void))
void __stdcall SetTextContext(TextContext *context)
const char * objective_name(short objective)
void EnterAllocationScope(void)
void ReserveNavMapArea(short x, short y, short width, short height)
void BuildMap(short showPlayer)
void DrawNavMapLabels(void)
void ResetMouseCursorFrame(void)
unsigned int initialize_view_buffer(void)
void DrawNavTriangleMarker(short x, short y, short size, short shadow, unsigned short colour, short reserve)
short NavMapLabelFits(short x, short y, short width, short height)
int set_new_objective(short pathIndex)
short visited(short objective)
short achieved(short objective)
void ResetNavMapReservedAreas(void)
void ResetNavMapLabels(void)
char * nav_note(short objective)
void BriefingMap_LoadShapes(void)
short SelectNavObjectiveAtPoint(short mouseX, short mouseY)
short TryPlaceNavMapLabel(short x, short y, short width, short force)
void __stdcall WarpMouseTo(short x, short y)
void InflightComputer(void)
void CentreMouseOnCurrentNavObjective(void)
void DrawNavLocationReadout(const char *title, short showFlightData)
void SetScreenClipRect(unsigned short a, unsigned short b, unsigned short c, unsigned short d)
void __stdcall SplitGameClockTicks(unsigned char *parts)
void ReportOutOfMemoryAndExit(const char *resource)
void PlaceNavMapLabel(short x, short y, unsigned short colour, const char *text)
void DrawNavCrossMarker(short x, short y, short size, short shadow, unsigned short colour, short reserve)
void DrawNavSquareMarker(short x, short y, short size, short shadow, short colour, short reserve)
void DrawViewportEllipse(Viewport *viewport, short x, short y, short verticalRadius, short horizontalRadius, short colour)
void DrawViewportBorder(Viewport *viewport, short left, short top, short right, short bottom, short colour)
void DrawSelectedNavLegendEntry(const char *text, short navPoint)
void ClearViewport(Viewport *viewport, short colour)
void AddUniqueObjectiveNavLabel(short x, short y, unsigned short colour, const char *text, short objective, short missionShip)
void PollMenuInputDevices(void)
short hidden_objective(short objective)
void nav_getxy(short *x, short *y, int worldX, int worldZ)
void PlaySfxWaveFileByNumber()
void FormatNavCoordinates(unsigned char *out)
void ShowConfedNavScan(void)
void __stdcall free_viewport(Viewport *viewport)
void ReleasePacketHandle(void *handle)
void ScaleNavMapCoordinates(short *x, short *y, short mapX, short mapY)
void BriefingMap_DisplayMap(void)
short mobile_objective(short objective)
void __stdcall SetViewportRect(Viewport *viewport, unsigned short left, unsigned short top, unsigned short right, unsigned short bottom)
void __stdcall SetMouseCursorShape(struct Shape *shape, short frame)
void __stdcall EventManagerHook(void(*callback)(void))
void ScaleNavMapMarkerSize(short *size)
unsigned int ReleaseTextFont(short fontIndex)
void DrawFormattedText(const char *format,...)
void DrawNavRectangleMarker(short x, short y, short size, short shadow, unsigned short colour, short reserve)
void CopyViewportContents(Viewport *source, Viewport *destination)
void UpdateInflightNavText(short showColon)
short cycle_next_objective(void)
short message_showing(void)
void DrawNavPlayerMarker(short colour, short reserve)
@ OBJECT_TYPE_ASTEROID_FIELD