22 "Sorry, an error has occured while %s.\n"
23 "Please note the following information:\n"
24 "%s #%d (ERR %d PS%ld LB%ld FL%d) at %s\n"
25 "Check your configuration. If this problem persists, please\n"
26 "call Origin Systems' service line. We are sorry for the inconvenience.";
49 short retry,
short section,
50 const char *sourceTag)
52 unsigned int packetSize;
54 const char *operation;
66 if (packet != 0 && section != -1)
74 (
int)section, (
int)error, packetSize,
88 section, destination, 0, 0);
96 unsigned int packetSize;
105 fileIndex = logicalFile;
114 section, packet, 0, 0);
117 if (retries <= 0 || error == 0)
119 }
while (error != 8);
145 section, 0, flags, 0);
156 section, 0, flags, 0);
172 section, 0, flags, 0);
182 if (packet == 0 && (flags & 4) == 0 &&
194 unsigned char colour,
195 signed char background)
201 if (fontIndex == 1) {
240 const char *text,
unsigned char alignment)
242 char *savedText = context->
text;
243 unsigned char savedAlignment = context->
alignment;
247 context->
text = (
char *)text;
250 context->
text = savedText;
268 inner = (
signed char)(outer + 1);
270 if ((
short)inner < count) {
272 signed char value = values[outer];
274 if (values[inner] < value) {
275 values[outer] = values[inner];
276 values[inner] = value;
279 }
while ((
short)inner < count);
282 }
while ((
int)next < count - 1);
304 if (toupper((
int)(
signed char)
325 short backgroundColour;
326 signed char diskReady;
327 signed char savedViewportMode;
328 signed char diskNumber;
330 savedViewportMode = 2;
340 cprintf(
"Please Insert Disk %d. Press any key to continue",
350 unsigned int leftTop;
351 unsigned int rightBottom;
370 backgroundColour = (short)(
unsigned int)savedTextContext;
374 if (savedViewportMode != 0) {
393 "Please insert disk %d\ninto any drive\nPress any key when ready.",
399 if (savedViewportMode != 0) {
407 }
while (diskReady == 0);
409 if (savedViewportMode == 1) {
411 }
else if (savedViewportMode == 2) {
423 number = strchr(fileName,
'.');
426 number = fileName + 1;
451 escaped = (short)event.
value + 1;
454 escaped = (short)event.
value + 1;
457 escaped = (short)event.
value + 1;
470 unsigned char savedMode;
489 key = (
signed char)event.
value;
512 unsigned char savedMode;
521 if (duration != -1) {
543 }
while (eventType != 0);
558 if ((
short)event->
value == 0x4c) {
564 switch ((
short)event->
value) {
625 short characterWidth;
633 clearArea.
left = (short)(clearArea.
left +
634 textWidth - characterWidth);
635 clearArea.
right = (short)(clearArea.
left + characterWidth - 1);
637 clearArea.
bottom = (short)(clearArea.
top +
const char * pszPacketAllocationOperation
short nKeyboardPointerStep
const char * pszPacketReadOperation
const char * pszPacketLoadErrorFormat
const char * DAT_00469698[3]
const char * apszGraphicsModeNames[4]
void(__cdecl *pIxFree)(void *)
short bSlowSceneAnimation
unsigned char cBlackColour
char szTxtWorkspaceBuffer[256]
TextContext * pCurTextContext
unsigned char cViewportClearColour
unsigned int bKeyEventQueueEnabled
short nDiskPromptBorderColour
MouseCursorState stHostMouseState
unsigned char bInputModeState
unsigned char * apTextFonts[4]
int bPtrMovedByKeyboardState
Viewport stDiskPromptBgView
unsigned char abDiskPromptDriveStates[0x20]
MouseCursorState stMouseCursorState
short bCurrentRunningFromHardDiskFlag
unsigned char cPrimaryViewBufferColour
char szDefaultTxtBuf[0xc8]
short nEventManagerActive
Viewport stSpaceBufferViewport
Viewport stDiskPromptViewport
DiskFileRecord * pDiskFileRecords
FontWorkspace ** apFontWorkspaces[4]
TextContext stDiskPromptTextContext
ShortRect stDiskPromptBounds
FontWorkspace ** fontWorkspace
unsigned char backgroundColour
Umbrella header for the game core.
unsigned int GetZeroUnused(void)
void * AllocateTaggedMemory(int size, unsigned short flags)
void FormatTextBufferFromStart(const char *format,...)
void LeaveAllocationScope(void)
unsigned short __stdcall GetFontCharWidth(char i)
void SetMousePosition(int x, int y)
void MoveMenuPointerFromKeyboard(InputEventState *event)
void * LoadPacketAllocated(short logicalFile, short section)
char PumpMessagesDuringWait(void)
unsigned int SetDiskFileNumber(char *fileName, short diskNumber)
unsigned int InitializeTextContextFromFont(TextContext *context, short fontIndex, unsigned char colour, signed char background)
short LogMemoryUsage(void)
short __stdcall PollInputEvent(InputEventState *event, short filter)
unsigned short __stdcall AllocateViewport(Viewport *viewport, short clearColour, short flags)
unsigned int __stdcall GetPacketSize(const char *filename, short section)
void * FetchDiskPacketRetrying(short logicalFile, short section, short flags)
void __stdcall SetTextCursor(unsigned short a, unsigned short b)
short OpenDiskDataFile(short logicalFile)
void __stdcall PromptInsertNumberedDisk(short logicalFile)
void ClearInputKeyStatePreservingModifiers(void)
short __stdcall MeasureTextPixelWidthClamped(const char *text)
unsigned int GetFixedOneMillionThunkAlt(short memoryType)
int IsFrameTickElapsed(void)
void FlushInputEvents(void)
void * LoadPacketIntoBuffer(short logicalFile, short section, void *destination)
short WaitForInputKey(void)
void FreeFontWorkspace(FontWorkspace **workspace)
void __stdcall CloseDataFile(unsigned short fd)
void __stdcall SetTextContext(TextContext *context)
void QueueInputEvent(int type, int x, int y, int value, int primaryButton, int secondaryButton, unsigned int timestamp)
void WaitForSceneAdvance(short duration, short unused)
void EnterAllocationScope(void)
unsigned int PumpWindowMessages(void)
short __stdcall OpenDataFileOrDie(const char *path)
void __stdcall SetFrameTimerPeriodDirect(short p)
void RetainInputEventsOfType(int type)
void ReportPacketLoadError(void *packet, short logicalFile, short retry, short section, const char *sourceTag)
void __stdcall DrawTextString(const char *text)
FontWorkspace ** AllocateFontWorkspace(short fontIndex)
short WaitForStreamInputKey(void)
unsigned short __stdcall FontHeight(const void *p)
void DrawViewportBorder(Viewport *viewport, short left, short top, short right, short bottom, short colour)
void DiskPromptDrawHook(void)
unsigned int SortSignedByteValuesAscending(signed char *values, short count)
void ClearViewport(Viewport *viewport, short colour)
void ResetDiskPromptTimerHook(int mode, int interval)
void *__stdcall PacketLoad(const char *filename, short section, void *destination, unsigned short flags, void *decompressionWorkspace)
void __stdcall ConvertChar_Int(char *text, short number, short digits)
void __stdcall free_viewport(Viewport *viewport)
void ReleasePacketHandle(void *handle)
unsigned int DrawTextAt(TextContext *context, short x, short y, const char *text, unsigned char alignment)
short GetCurrentDiskDriveHook(void)
void EraseLastTextInputCharacter(void)
short __stdcall IsInputEventQueued(short type)
void FatalErrorAndExit(const char *format,...)
void FreePacketAndClear(void *slot, unsigned short releaseFlags)
unsigned int ReleaseTextFont(short fontIndex)
short __stdcall DosStrlen(const char *s)
void CopyViewportContents(Viewport *source, Viewport *destination)
void __stdcall FillGraphicSuffix(char *path, short number, short digits)
short __stdcall PeekInputEvent(InputEventState *event, short type)
unsigned short __stdcall SelectDiskDriveHook(short drive)