/* Utility declarations */
#ifdef MEDIA678_F31E_F31J_X31J_P31J_SU1E_AU1E_AU2E_AU3E
/* #ifdef THINK_C */
#if ((EXETYPE == C06_CEDT) || (EXETYPE == C07_HINT))
extern void F2042_InitializeScreen();
extern void F2043_UninitializeScreen();
extern unsigned int16_t F0090_strlen(char* P2296_pc_String);


extern long G7110_RandomSeed;
extern GAME* G7111_Games;
extern unsigned char* G3559_puc_MemoryHeap;
extern char G3716_ac_TestFileName[5];
extern char* G3683_pc_NextFTLModuleToRun;
extern long G3601_l_VerticalBlankCount;
extern char G3723_[100];
extern char* G7020_PORTRAIT;
#endif
#if EXETYPE == C06_CEDT
extern long G3926_;
extern unsigned int16_t G3892_;
extern char G2300_FileNamesList[200][32];
extern unsigned int16_t G7150_;
extern FILE_LIST G7151_;
#ifdef MEDIA667_P31J
extern char G7170_[1680 + 2048]; /* 1680 = 6 * 280 = font size. 2048 is in fact another variable G4184_ac_Unreferenced */
#endif
#ifdef MEDIA670_F31E_F31J
extern char G7170_[1728];
extern char G4184_ac_Unreferenced[2048];
#endif

/*extern FILE_LIST* G7006_;*/
extern ERRMSG G2241_ErrorMessages[12];
extern UDSTRUCT7 G2298_[2];
/*extern UDSTRUCT6 G2299_[18];*/
extern MEMORY_REGION* G7155_pc_FirstMemoryArea;
extern MEMORY_REGION* G7156_pc_LastMemoryArea;

extern BOOLEAN G7089_;
extern unsigned char* G0348_Bitmap_Screen;
extern int16_t G7091_;
extern int16_t G7092_;
extern int16_t G7093_;
extern int16_t G7094_;
extern int16_t G0433_i_CommandQueueFirstIndex;
extern int16_t G0437_i_PendingClickX;
extern int16_t G0438_i_PendingClickY;
extern int16_t G0439_i_PendingClickButtonsStatus;
extern BOOLEAN G0436_B_PendingClickPresent;
extern int16_t G2253_i_AllocatedBlockCount;
extern int16_t G7102_;
extern int16_t G7103_;
extern ON_DISK_PORTRAIT G2248_as_OnDiskPortraits[4];
extern int16_t G2271_ai_Box_EditText[4];
extern BOOLEAN G7104_TextCursorVisible;
extern int16_t G7105_EditChampionNameOrTitleCharacterIndex;
extern int16_t G7106_EditChampionNameOrTitle;
extern int16_t G7107_SelectedColorIndex;
#ifdef MEDIA671_F31E_F31J_P31J
extern int16_t G7108_BlinkingCursorTimer;
#endif
#ifdef MEDIA772_SU1E
extern int16_t G7108_BlinkingCursorTimer;
#endif
#ifdef MEDIA692_X31J
extern long G7108_BlinkingCursorTimer;
#endif
extern int16_t G7109_SelectedChampionIndex;
/*extern BACKUP_PORTRAIT G2329_s_UndoPortrait;*/
extern unsigned char* G2244_apuc_DialogBitmaps[2];
/*extern BACKUP_PORTRAIT G2328_s_TempPortrait;*/
extern CMP G2246_CMPData;
extern int16_t G7112_HideMousePointerCount;
extern int16_t G7113_DialogBitmapIndex;
extern int16_t G7114_LoadedChampionCount;
extern long G7115_DialogByteCount;
#ifdef MEDIA772_SU1E
extern unsigned char G7116_Bitmap_FilePickerArrows[1200];
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
extern unsigned char* G7116_Bitmap_FilePickerArrows;
#endif
extern unsigned char* G7117_Bitmap_Mirror;
extern int16_t (*G7125_)();
extern unsigned int16_t G7126_;
extern unsigned int16_t G7127_CleanupHandlerCount;
extern CLEANUP_HANDLER G2252_CleanupHandlers[5];
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern PROGRAM_STATE* G7128_LastProgramState;
#endif
extern int16_t G7129_ProgramStateOrdinal;
extern int16_t G7132_;
extern char G7133_;
extern char G7134_;
extern char G7135_;
extern unsigned char G7136_;
extern int16_t G7137_;
extern int16_t G7138_;
extern char G7139_;
extern char G7140_;
extern unsigned int16_t G7141_SegmentCount;
extern UDSTRUCTA G4188_;
extern int16_t G7147_;
extern int16_t G7148_;
extern int16_t G7149_;
extern int16_t G7158_ScreenPixelHeight;
extern int G7159_ScreenBufferByteCount;
extern int16_t G7160_Unused;
extern int16_t G7161_ScreenPixelWidth;
extern long G7162_;
extern char G7164_;
extern unsigned int16_t G7165_;
extern long G7168_AvailableRAMByteCount;
extern unsigned char* G7169_puc_AvailableRAMBottom;
extern int16_t G2266_ai_Semaphores[1];
extern int16_t G2303_ai_Box_WholeScreen[4];
#ifdef MEDIA671_F31E_F31J_P31J
extern unsigned char G2267_auc_Graphic_Mirror[247];
#ifdef MEDIA667_P31J
extern unsigned char G2268_auc_Graphic_FilePickerArrows[323];
#endif
#ifdef MEDIA670_F31E_F31J
extern unsigned char G2268_auc_Graphic_FilePickerArrows[324];
#endif
/*extern int16_t G2283_[32];*/
#endif
#ifdef MEDIA692_X31J
extern unsigned char G2267_auc_Graphic_Mirror[984];
#endif
#ifdef MEDIA697_X31J_AU1E_AU2E_AU3E
extern unsigned char G2268_auc_Graphic_FilePickerArrows[1200];
#endif

extern int16_t G2256_ai_Box_FilePickerDialog[4];
extern char* G7021_HEALTH;
extern char* G7022_STAMINA;
extern char* G7023_MANA;
extern INPUT_INFO G2263_s_Input_Dialog1Choice;
extern INPUT_INFO G2264_s_Input_Dialog2Choices;
extern INPUT_INFO G2255_s_Input_Dialog3ChoicesA;
extern INPUT_INFO G2254_s_Input_Dialog3ChoicesB;
extern MOUSE2_INPUT G2285_as_FilePickerDialogButtons[5];
extern INPUT_INFO G2287_s_InputInfo_FilePickerDialog;
extern int16_t G2284_Box_FilePickerArrows[4];
extern int16_t G2277_ai_Box_SelectedPortraitZoomed[4];
extern int16_t G7024_SelectedColorBoxX1;
extern int16_t G7025_SelectedColorBoxX2;
extern int16_t G7026_SelectedColorBoxY1Base;
extern int16_t G2278_ai_Box_ColorPalette[4];
extern int16_t G2273_aai_Box_ChampionNames[4][4];
extern int16_t G2275_aai_Box_Portraits[4][4];
extern int16_t G2276_ai_Box_Mirror[4];
extern int16_t G2279_ai_Box_SelectedPortraitSmall[4];
extern int16_t G2269_aai_Box_StatisticsArea[4];
extern MOUSE2_INPUT G2272_MouseInputs[18];
extern INPUT_INFO G2280_;
extern int16_t G7027_;
extern int16_t G7028_;
extern int16_t G7029_HealthStaminaManaScreenX;
extern int16_t G7030_HealthScreenY;
extern int16_t G7031_;
extern int16_t G7032_;
extern int16_t G7033_FilePickerDialogTitleX;
extern int16_t G7034_FilePickerDialogTitleY;
extern unsigned int16_t G7035_PortraitWidth;
extern unsigned int16_t G7036_PortraitHeight;
extern int16_t G7037_MirrorBitmap_Width;
extern int16_t G7038_MirrorBitmap_Height;
extern int16_t G7039_MirrorPortraitLeftMargin;
extern int16_t G7040_MirrorPortraitTopMargin;
extern unsigned int16_t G7041_SelectedColorBoxHeight;
extern unsigned int16_t G7042_PortraitWidthZoomFactor;
extern unsigned int16_t G7043_PortraitHeightZoomFactor;
extern int16_t G7044_DialogWidth;
extern int16_t G7045_DialogHeight;
extern int16_t G7046_FilePickerArrowsWidth;
extern int16_t G7047_FilePickerArrowsHeight;
extern unsigned int16_t G7048_FilePickerFileListVisibleFileNameCount;
extern unsigned int16_t G7049_FilePickerFileListLineHeight;
extern int16_t G7050_FilePickerFileListLeft;
extern int16_t G7051_FilePickerFileListTop;
extern int16_t G7052_TextLineSpacing;
extern unsigned int16_t G7053_TextCharacterWidth;
extern char* G7054_LOAD_CHAMPIONS;
extern char* G7055_SAVE_CHAMPIONS;
extern char* G7056_MAKE_NEW_ADVENTURE;
extern char* G7057_REVERT;
extern char* G7058_UNDO;
extern char* G7059_QUIT;
extern char* G7060_OK;
extern char* G7061_OK_CANCEL;
extern char* G7062_RETRY_CANCEL;
extern char* G7063_OK_CANCEL_FORMAT;
extern char* G7064_GAME_PORTRAIT_CANCEL;
extern char* G7065_DUNGEON_MASTER_CHAOS_STRIKES_BACK_CANCEL;
extern char* G7066_NEW_DISK;
extern char* G7067_CANCEL;
extern char* G7068_YOU_MAY_LOAD_EITHER_A_SAVED_GAME_OR_A_CHAMPION_PORTRAIT;
extern char* G7069_YOU_MAY_SAVE_EITHER_THE_WHOLE_GAME_OR_THE_SELECTED_CHAMPIONS_PORTRAIT;
extern char* G7070_PLEASE_SELECT_A_PORTRAIT;
extern char* G7071_PLEASE_WAIT_LOADING_SAVED_GAME;
extern char* G7072_PLEASE_WAIT_SAVING_GAME;
extern char* G7073_PLEASE_WAIT_SAVING_CHAMPION;
extern char* G7074_PLEASE_WAIT_LOADING_CHAMPION;
extern char* G7075_PLEASE_WAIT_LOADING_NEW_ADVENTURE;
extern char* G7076_PLEASE_WAIT_SAVING_NEW_ADVENTURE;
extern char* G7077_ERROR_WHILE_SAVING_CHAMPION;
extern char* G7078_ERROR_WHILE_SAVING_GAME;
extern char* G7079_THIS_CHAMPION_IS_DAMAGED;
extern char* G7080_THIS_CHAMPION_CANNOT_BE_USED_WITH_THIS_ADVENTURE;
extern char* G7081_EACH_CHAMPION_MUST_HAVE_A_UNIQUE_FIRST_NAME;
extern char* G7082_INCORRECT_OR_DAMAGED_SAVED_GAME;
extern char* G7083_THE_NEW_ADVENTURE_CAN_ONLY_BE_MADE_AFTER_A_SAVED_GAME_IS_LOADED;
extern char* G7084_CANT_MAKE_NEW_ADVENTURE_FROM_THIS_SAVED_GAME;
extern char* G7085_LOAD_WHICH_SAVED_GAME;
extern char* G7086_SYSTEM_ERROR_23001;
extern char* G7087_SYSTEM_ERROR_23002;
extern char* G7088_SYSTEM_ERROR_23003;
extern int16_t (*G7130_)(UDSTRUCT44* Pxxxx_ps_);
extern int16_t G7131_Date;


extern THING F7019_GetObjectInfoIndex(GAME* P3662_ps_, THING P3663_T_);
extern SEGMENTHEADER* F7181_(HEADER* P3897_ps_, long* P3898_pl_SegmentOffset, unsigned int16_t* P3899_pui_SegmentIndex);
extern char F7195_AreFileNamesIdentical();
extern unsigned long F2093_GetVerticalBlankCount();
extern FILE_DESCRIPTOR* F7144_GetFileDescriptor();
extern SEGMENTHEADER* F7161_(UDSTRUCT1* P3868_ps_);
extern UDSTRUCT1** F7149_GetItemInUDSTRUCT55(int16_t P3853_i_);
extern void F7150_(UDSTRUCT1* P3854_ps_);
extern void F7166_(int16_t P3875_i_FileID, UDSTRUCT1* P3876_ps_);
extern void F7167_(UDSTRUCT1** P3877_pps_, UDSTRUCT1** P3878_pps_);
extern char F7177_(UDSTRUCT1* P3893_ps_);
extern UDSTRUCT1* F7154_(UDSTRUCT1* P3859_ps_, UDSTRUCT1*** P3860_ppps_);
extern FILE_ID_INFO* F7145_(UDSTRUCT1* P3848_ps_);
extern UDSTRUCT1** F7169_(UDSTRUCT1* P3883_ps_);
extern UDSTRUCT1** F7155_(int16_t P3861_i_);
extern SEGMENTHEADER* F7160_(UDSTRUCT1* P3867_ps_);
extern void F7342_BuildUDSTRUCT3(char* P3647_pc_, UDSTRUCT3* P3648_ps_);
extern void F7137_FileOperation(int16_t P3835_i_, unsigned int16_t P3836_ui_, ...);
extern void F7024_Free(void HUGE* P3555_pv_);
extern int16_t F7243_(unsigned int16_t P3999_ui_, long P4000_l_);
extern int16_t F7242_();
extern long F7254_(unsigned int16_t P4023_i_, unsigned int16_t P4024_i_);
extern long F7249_GetBitmapByteCount(unsigned int16_t P4010_i_, unsigned int16_t P4011_i_);
extern char F7320_CallF0760_Cconis();
#ifdef MEDIA772_SU1E
extern unsigned char* F7023_Alloc(unsigned long P3553_ul_);
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
extern unsigned char* F7023_Alloc(unsigned long P3553_ul_, int16_t P3554_i_Requirements);
#endif
extern void F7053_FreeGame();
extern void F7066_LoadPortraits();
extern long F7067_GetChampionInfo(GAME* P3588_ps_, unsigned int16_t P3589_ui_ChampionIndex, unsigned int16_t P3590_ui_InfoIndex);
extern void F7068_SetChampionInfo(GAME* P3591_ps_, unsigned int16_t P3592_ui_ChampionIndex, unsigned int16_t P3593_ui_InfoIndex, long P3594_l_InfoData);
extern void F7317_MAIN_CopyBytes_Alt(char HUGE* P0005_pc_Source, char HUGE* P0006_pc_Destination, int16_t P4179_, int16_t P4499_, long P0007_l_ByteCount);
extern int16_t F7072_GetDialogChoiceOrdinal(char* P3736_pc_, unsigned int16_t P3737_i_Color, char* P3738_pc_String, INPUT_INFO* P3739_ps_DialogInputInfo);
extern int16_t F7175_(UDSTRUCT1** P3890_pps_);
extern int16_t F7176_(UDSTRUCT1** P3891_pps_, BOOLEAN P3892_B_);
extern int16_t F7178_(UDSTRUCT1* P3894_ps_);
extern int16_t F7179_(UDSTRUCT1* P3895_ps_);
extern int16_t F7180_(UDSTRUCT1* P3896_ps_);
extern int16_t F7185_(UDSTRUCT1* P3903_ps_);
#ifdef MEDIA772_SU1E
extern void F7259_DrawBitmapOnScreen(
unsigned char* P4032_puc_Bitmap,
int16_t* P4033_pi_Box,
int16_t P4034_i_Width,
int16_t P4035_i_TransparentColor);
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
extern void F7259_DrawBitmapOnScreen(
unsigned char* P4032_puc_Bitmap,
int16_t* P4033_pi_Box,
int16_t P4034_i_Width,
int16_t P4035_i_TransparentColor,
int16_t P4036_i_Height);
#endif
extern void F7339_PrintTextToScreen(int16_t P3634_i_X, int16_t P3635_i_Y, int16_t P3636_i_TextColor, int16_t P3637_i_BackgroundColor, char* P3638_pc_);
#ifdef MEDIA671_F31E_F31J_P31J
extern void F7258_DrawScreenPixel(int16_t P4029_i_, int16_t P4030_i_, unsigned char P4031_uc_Color);
#endif
#ifdef MEDIA772_SU1E
extern void F7341_DrawText(unsigned char* P3639_puc_Bitmap_Destination, unsigned int16_t P3640_ui_ByteWidth, int16_t P3641_i_X, int16_t P3642_i_Y, int16_t P3643_i_TextColor, int16_t P3644_i_BackgroundColor, unsigned char* P3645_puc_String);
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
extern void F7341_DrawText(unsigned char* P3639_puc_Bitmap_Destination, unsigned int16_t P3640_ui_ByteWidth, int16_t P3641_i_X, int16_t P3642_i_Y, int16_t P3643_i_TextColor, int16_t P3644_i_BackgroundColor, unsigned char* P3645_puc_String, unsigned int16_t P3646_ui_);
#endif
/*extern unsigned char* F7337_(int16_t P3623_i_TextColor, int16_t P3624_i_BackgroundColor);*/
extern long F7136_(int16_t P3833_i_, unsigned int16_t P3834_ui_);
extern int16_t F7168_(UDSTRUCT1* P3879_ps_, unsigned long P3880_ul_, unsigned long P3881_ul_, unsigned long P3882_ul_);
#ifdef MEDIA696_X31J_P31J_SU1E_AU1E_AU2E_AU3E
extern long F7332_GetPrefixedBitmapByteCount(int16_t P4170_i_, int16_t P4171_i_); /* Must be commented for FM-Towns */
#endif
extern int16_t F7085_(char P3759_c_);
extern char F7102_DoesFileNameMatchPattern(char* P3787_pc_FileName, char* P3788_pc_FileNamePattern);
extern unsigned long F7189_ReturnUdStruct77ByteCount();
extern long F7280__GetFileDescriptorByteCount();
extern int16_t F7112_FallbackToLastProgramState(BOOLEAN P3795_B_Hang, unsigned int16_t P3796_ui_ReturnCode, long P3797_l_);
extern int16_t F7296_OpenFile(FILE_DESCRIPTOR* P4072_ps_);
extern int16_t F7297_CloseFile(FILE_DESCRIPTOR* P4074_ps_);
extern int16_t F7302_(FILE_DESCRIPTOR* P4087_ps_, long* P4088_pl_);
extern int16_t F7098_SubstituteString(char* P3776_pc_SourceString, char* P3777_pc_StringToReplace, char* P3778_pc_ReplacementString, char* P3779_pc_OutputString, unsigned int16_t P3780_ui_OutputStringMaximumLength);
extern int16_t F7097_strstr(char* P2308_pc_StringHaystack, char* P2309_pc_StringNeedle);
extern void F7323_WaitVerticalBlank();
extern void F7071_();
extern char* F0088_strcpy(char* P2301_pc_StringA, char* P2302_pc_StringB);
#ifdef MEDIA772_SU1E
extern long F7101_sprintf(char* P3784_pc_, char* P3785_pc_, ...);
#endif
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern void F7101_sprintf(char* P3784_pc_, char* P3785_pc_, ...);
#endif
extern void F2247_RESTORE_TOWNS(void);
extern void F2251_INSTALL_CRITICAL_HANDLER();
extern BOOLEAN F2254_KEYAVAIL();
extern void F7001_SaveChampions(void);
extern int16_t F7004_LoadChampions(void);
extern int16_t F7005_Quit(int16_t P3551_i_);
extern int16_t F7012_AddToInputInfoList(INPUT_INFO* P3653_ps_InputInfo);
extern int16_t F7015_ProcessNextUDCommand(UD_COMMAND* P3656_ps_UDCommand);
extern int16_t F7016_GetKeyFromCommand(UD_COMMAND* P3657_ps_);
extern void F7020_RemoveObjectModifiersFromStatistics(GAME* P3664_ps_, unsigned int16_t P3665_ui_ChampionIndex, unsigned int16_t P0624_ui_SlotIndex, THING P3666_T_Thing);
extern void F7021_InitAllocatedMemoryBlocks();
extern void F7022_FreeAllAllocatedBlocks();
extern void F7030_DrawFilledBox(int16_t* P3677_pi_, int16_t P3678_i_, int16_t P3679_i_FillColor, int16_t P3680_i_LineColor);
extern void F7034_DrawButton(MOUSE2_INPUT* P3684_ps_, char* P3685_pc_String, int16_t P3686_i_FillColor);
extern void F7050_MainLoop();
extern int16_t F7051_LoadGame(int16_t P3711_i_GameIndex);
extern void F7052_SaveGame(int16_t P3712_i_GameIndex);
#ifdef MEDIA762_AU1E
extern int16_t F7074_DrawDialogErrorMessage(char* P3747_pc_, unsigned int16_t P3748_ui_Color);
#endif
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern void F7074_DrawDialogErrorMessage(char* P3747_pc_, unsigned int16_t P3748_ui_Color);
#endif
extern BOOLEAN F7076_AreAllChampionNamesUnique();
extern void F7077_InitCMPStructure();
#ifdef MEDIA773_SU1E_AU1E
extern int16_t F7082_DrawFilePickerDialog(char* P3757_pc_);
#endif
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern int16_t F7082_DrawFilePickerDialog(FILE_LIST* P3757_ps_);
#endif
extern int16_t F7083_DrawInitialFilePickerFileList(FILE_LIST* P3758_ps_);
extern int16_t F7084_ProcessFilePickerInput();
extern BOOLEAN F7086_IsReadyToMakeNewAdventure();
extern void F7090_MakeNewAdventure();
extern void F7091_RunChampionEditor();
extern char* F0086_strcat(char* P2297_pc_StringA, char* P2298_pc_StringB);
extern void F7103_InitUnusedVariables();
extern void F7104_EmptyFunction();
extern void F7106_InitExceptionManagement();
extern void F7107_EmptyFunction();
extern unsigned int16_t F7108_GetG7126_();
extern void F7109_AddCleanupHandler(int16_t (*P3792_pfi_)(unsigned int16_t, long), int16_t P3793_i_HandlerID);
extern void F7110_RemoveCleanupHandlerByID(int16_t P3794_i_HandlerID);
extern void F7111_RestorePreviousProgramState();
#ifdef MEDIA699_X31J_AU2E_AU3E
extern int16_t F7132_(unsigned int16_t P3828_ui_FileID);
#endif
#ifdef MEDIA671_F31E_F31J_P31J
extern int16_t F7132_(volatile unsigned int16_t P3828_ui_FileID);
#endif
extern void F7135_(int16_t P3832_i_);
extern void F7138_(int16_t P3838_i_SegmentCount, int16_t P3839_i_, int16_t (*P3840_pfi_)());
extern void F7139_();
extern void F7148_(UDSTRUCT1* P3852_ps_, UDSTRUCT1* P3904_ps_);
extern int16_t F7151_GetItemIndexInUDSTRUCT5(UDSTRUCT1** P3855_pps_);
extern void F7153_SetItemInUDSTRUCT55(int16_t P3857_i_, UDSTRUCT1** P3858_pps_);
extern void F7157_(UDSTRUCT1* P3863_ps_);
extern void F7158_(UDSTRUCT1** P3864_pps_, UDSTRUCT1** P3865_pps_);
extern void F7159_(UDSTRUCT1** P3866_pps_);
extern int16_t F7164_(UDSTRUCT1** P3872_pps_);
extern int16_t F7165_(UDSTRUCT1* P3873_ps_, long P3874_l_, SEGMENTHEADER* P3905_ps_);
extern int16_t F7170_(UDSTRUCT1** P3884_pps_);
extern int16_t F7173_(UDSTRUCT1** P3887_pps_, int16_t* P3888_pi_);
extern int16_t F7182_(UDSTRUCT1** P3900_pps_);
extern void F7186_(int16_t* P3906_pi_, UDSTRUCT8** P3907_pps_);
extern int16_t F7187_();
extern void F7188_(int16_t* P3908_pi_, UDSTRUCT8** P3909_pps_);
extern int16_t F7190_InitUdStruct77(FILE_ID_INFO* P3910_ps_, int16_t P3911_i_FileID);
extern int16_t F7191_(FILE_ID_INFO* P3912_ps_);
extern int16_t F7192_GetDataFileInfo(FILE_ID_INFO* P3913_ps_, unsigned int16_t P3914_ui_, long* P3915_pl_);
extern int16_t F7196_PrepareAndDrawFilePicker(FILE_ID_INFO* P3924_ps_, char* P3925_pc_FileNamesList, int16_t P3926_i_FileNameMaximumLength, int16_t P3927_i_FileCount);
extern int16_t F7197_(char* P3928_pc_FileNamesList, int16_t P3929_i_FileNameMaximumLength, int16_t P3930_i_FileCount);
extern int16_t F7198_();
extern int16_t F7199_();
extern void F7223_InitMemoryVariables();
extern void F7224_AddMemoryArea(unsigned char HUGE* P3971_puc_Address, long P3972_l_Size, int16_t P3973_i_MemoryTypeFlags);
extern void F7225_(int16_t P3974_i_UTMHandleCount, int16_t P3975_i_);
#ifdef MEDIA773_SU1E_AU1E
extern long F7228_FreeMemory(unsigned char** P3978_ppuc_);
#endif
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern void F7228_FreeMemory(unsigned char** P3978_ppuc_);
#endif
extern void F7230_(unsigned char** P3980_ppuc_);
#ifdef MEDIA773_SU1E_AU1E
extern long F7234_(unsigned char** P3985_ppuc_, unsigned long P3986_ul_);
#endif
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern void F7234_(unsigned char HUGE** P3985_ppuc_, unsigned long P3986_ul_);
#endif
extern void F7248_InvertBox(int16_t* P4009_pi_Box);
#ifdef MEDIA674_F31E_F31J_X31J_P31J
extern void F7251_ConvertBitmapFromAtariSTPlanar(unsigned char* P4014_puc_BitmapA, unsigned char* P4015_puc_BitmapB, unsigned int16_t P4016_ui_Width, int16_t P4017_ui_Height);
#endif
#ifdef MEDIA768_AU2E_AU3E
extern void F7251_ConvertBitmapFromAtariSTPlanar(unsigned int16_t* P2353_puc_Bitmap_AtariST, unsigned int16_t* P2354_puc_Bitmap, unsigned int16_t P5989_ui_Width, unsigned int16_t P4017_ui_Height);
#endif
#ifdef MEDIA674_F31E_F31J_X31J_P31J
extern void F7252_ConvertBitmapToAtariSTPlanar(char* P4018_pc_Bitmap, char* P4019_pc_Bitmap_AtariST, unsigned int16_t P4020_ui_Width, unsigned int16_t P4021_i_);
#endif
#ifdef MEDIA768_AU2E_AU3E
extern void F7252_ConvertBitmapToAtariSTPlanar(int16_t* P4018_pc_Bitmap, int16_t* P4019_pi_, unsigned int16_t P4020_ui_Width, unsigned int16_t P4021_ui_Height);
#endif
extern void F7255_(unsigned char* P4025_puc_Bitmap, int16_t* P4026_pi_Box);
#ifdef MEDIA674_F31E_F31J_X31J_P31J
extern void F7256_(int16_t* P4027_pi_, int16_t* P4028_pi_);
#endif
#ifdef MEDIA768_AU2E_AU3E
extern void F7256_(int16_t* P4027_pi_, int16_t* P4028_pi_);
#endif
extern void F7257_ClearScreen();
#ifdef MEDIA762_AU1E
extern void F7260_FillScreenBox(unsigned int16_t* P4037_pui_XYZ, unsigned int16_t P4038_ui_Color);
#endif
#ifdef MEDIA679_F31E_F31J_X31J_P31J_SU1E_AU2E_AU3E
extern void F7260_FillScreenBox(int16_t* P4037_pi_Box, unsigned int16_t P4038_ui_Color);
#endif
extern void F7261_ClearBitmap(unsigned char* P4039_puc_Bitmap, int16_t P4040_i_PixelWidth, int16_t P4041_i_PixelHeight);
extern BOOLEAN F7262_IsSemaphoreEnabled(unsigned int16_t P4042_ui_SemaphoreIndex);
extern int16_t F7269_InitChampionEditor();
extern void F7270_Cleanup();
extern void F7271_ClearStatisticsArea();
extern BOOLEAN F7272_IsDungeonValid(GAME* P4043_ps_, unsigned int16_t P4044_ui_ValidationCriteria);
extern void F7273_DrawDialogThenHang(char* P3556_pc_);
extern unsigned int16_t F7274_GetMouseStatus(int16_t* P3557_pi_MouseX, int16_t* P3558_pi_MouseY);
extern void F7275_EmptyFunction(int16_t P3559_i_);
#ifdef MEDIA772_SU1E
extern unsigned int16_t F7276_GetPixelColor(unsigned char* P4045_puc_Bitmap, int16_t P4046_i_PixelX, int16_t P4047_i_PixelY, unsigned int16_t P4048_ui_Width);
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
extern unsigned int16_t F7276_GetPixelColor(unsigned char* P4045_puc_Bitmap, int16_t P4046_i_PixelX, int16_t P4047_i_PixelY, unsigned int16_t P4048_ui_Width, unsigned int16_t P4049_ui_Height);
#endif
#ifdef MEDIA772_SU1E
extern void F7277_SetPixelColor(unsigned char* P4050_puc_Bitmap, int16_t P4051_i_X, int16_t P4052_i_Y, int16_t P4053_i_PixelColor, unsigned int16_t P4054_ui_Width);
#endif
#ifdef MEDIA676_F31E_F31J_X31J_P31J_AU1E_AU2E_AU3E
extern void F7277_SetPixelColor(unsigned char* P4050_puc_Bitmap, int16_t P4051_i_X, int16_t P4052_i_Y, int16_t P4053_i_PixelColor, unsigned int16_t P4054_ui_Width, unsigned int16_t P4055_ui_Height);
#endif
extern void F7279_EmptyFunction();
extern int16_t F7281__EmptyFunction(FILE_DESCRIPTOR* P4068_ps_);
extern int16_t F7282__TryOpenFile(FILE_DESCRIPTOR* P4071_ps_);
extern int16_t F7283__CreateFile(FILE_DESCRIPTOR* P4073_ps_);
extern void F7284_();
extern void F7285_(int16_t* P4056_pi_, UDSTRUCT8** P4057_pps_);
extern int16_t F7286__Fread(FILE_DESCRIPTOR* P4081_ps_, unsigned long P4082_ul_, char* P4083_pc_);
extern int16_t F7287__GetDataDriveOrdinal();
extern int16_t F7288_();
extern void F7289_(int16_t* P4058_pi_, UDSTRUCT8** P4059_pps_);
extern int16_t F7290_(FILE_DESCRIPTOR* P4060_ps_, FILE_ID_INFO* P4061_ps_);
extern int16_t F7291_(FILE_DESCRIPTOR* P4062_ps_);
extern void F7292_SubstituteStringInFileName(FILE_DESCRIPTOR* P4063_ps_, char* P4064_pc_StringToReplace, char* P4065_pc_ReplacementString);
extern BOOLEAN F7294_(FILE_DESCRIPTOR* P4067_ps_);
extern int16_t F7295_(FILE_DESCRIPTOR* P4069_ps_, int16_t* P4070_pi_);
extern int16_t F7298_GetFileSize(FILE_DESCRIPTOR* P4075_ps_, long* P4076_pl_);
extern int16_t F7300_Fseek(FILE_DESCRIPTOR* P4079_ps_, unsigned long P4080_ul_);
extern int16_t F7301_Fwrite(FILE_DESCRIPTOR* P4084_ps_, unsigned long P4085_ul_, char* P4086_pc_);
extern int16_t F7303_Fdelete(FILE_DESCRIPTOR* P4089_ps_);
extern char F7305_(FILE_DESCRIPTOR* P4092_ps_);
extern void F7306_(FILE_DESCRIPTOR* P4093_ps_, char* P4094_pc_);
extern int16_t F7307_GetDrivePath(FILE_DESCRIPTOR* P4095_ps_, unsigned int16_t P4096_ui_, char** P4097_ppc_);
extern int16_t F7314_FindFirst(char* P4105_pc_, char* P4106_pc_);
extern int16_t F7315_FindNext(char* P4107_pc_);
#ifdef MEDIA677_F31E_F31J_X31J_P31J_AU2E_AU3E
extern int16_t F7316_GetFileNamesArray(FILE_DESCRIPTOR* P4108_ps_, char* P4109_pc_FileNames, unsigned int16_t P4110_i_FileNameMaximumLength, unsigned int16_t P4111_i_FileMaximumCount, int16_t* P4112_pi_FileCount);
#endif
#ifdef MEDIA772_SU1E
extern int16_t F7316_GetFileNamesArray(char* P4109_pc_FileNames);
#endif
#ifdef MEDIA762_AU1E
extern int16_t F7316_GetFileNamesArray(char (*P4109_pc_FileNames)[9]);
#endif
extern int16_t F7319_Crawcin();
extern void F7322_EmptyFunction(char* P3569_pc_);
extern void F7324_EmptyFunction();
#ifdef MEDIA692_X31J
extern int F7327_GetCharacterFromKeyboard();
#endif
#ifdef MEDIA667_P31J
extern int F7327_GetCharacterFromKeyboard();
#endif
#ifdef MEDIA670_F31E_F31J
extern int F7327_GetCharacterFromKeyboard();
#endif
#ifdef MEDIA693_X31J_P31J
extern void F7329_FillBox(unsigned char* P4150_puc_Bitmap, int16_t* P4151_pi_Box, int16_t P4152_i_Color, int16_t P4153_i_Width, int16_t P4154_i_Height);
#endif
#ifdef MEDIA768_AU2E_AU3E
extern void F7329_FillBox(unsigned char* P4150_puc_Bitmap, int16_t* P4151_pi_Box, char P4152_c_Color, int16_t P4153_i_Width, int16_t P4154_i_Height);
#endif
#ifdef MEDIA670_F31E_F31J
extern void F7329_FillBox(
unsigned char*            P0221_puc_Bitmap  SEPARATOR
int16_t*                  P2219_pi_XYZ      SEPARATOR
unsigned int16_t          P0223_i_Color     SEPARATOR
#ifdef ANOMALY_CEDT030_CEDT017
unsigned int16_t          P2221_i_Width     SEPARATOR
int16_t                   P4154_i_Height
#else
unsigned int16_t          P2221_i_Width
#endif
);
#endif
#ifdef MEDIA692_X31J
extern void F7330_DrawBitmap(char* P4155_pc_Bitmap, char* P4156_pc_Bitmap, int16_t* P4157_pi_Box, int16_t P4158_i_X, int16_t P4159_i_Y, int16_t P4160_i_SourceWidth, int16_t P4161_i_DestinationWidth, int16_t P4162_i_TransparentColor, int16_t P4163_i_, int16_t P4164_i_);
#endif
#ifdef MEDIA768_AU2E_AU3E
extern void F7330_DrawBitmap(char* P4155_pc_Bitmap, char* P4156_pc_Bitmap, int16_t* P4157_pi_Box, int16_t P4158_i_X, int16_t P4159_i_Y, int16_t P4160_i_SourceWidth, int16_t P4161_i_DestinationWidth, char P4162_c_TransparentColor, int16_t P4163_i_, int16_t P4164_i_);
#endif
#ifdef MEDIA667_P31J
extern void F7330_DrawBitmap(char* P4155_pc_Bitmap, char* P4156_pc_Bitmap, int16_t* P4157_pi_Box, int16_t P4158_i_X, int16_t P4159_i_Y, int16_t P4160_i_SourceWidth, int16_t P4161_i_DestinationWidth, int16_t P4162_i_TransparentColor, int16_t P4163_i_, int16_t P4164_i_);
#endif
#ifdef MEDIA670_F31E_F31J
extern void F7330_DrawBitmap(
#if EXETYPE != C06_CEDT
unsigned char*             P0199_puc_Bitmap_Source      SEPARATOR
unsigned char*             P0200_puc_Bitmap_Destination SEPARATOR
int16_t*                   P2364_pi_XYZ                 SEPARATOR
int16_t                    P0202_i_X                    SEPARATOR
int16_t                    P0203_i_Y                    SEPARATOR
int16_t                    P0204_i_SourceByteWidth      SEPARATOR
int16_t                    P0205_i_DestinationByteWidth SEPARATOR
int16_t                    P0206_i_TransparentColor     SEPARATOR
#ifdef ANOMALY_CEDT030_CEDT017
int16_t                    P4163_i_                     SEPARATOR
int16_t                    P4164_i_
#else
int16_t                    P4163_i_
#endif
#endif
#ifdef ANOMALY_CEDT017_CEDTTXT
unsigned char*             P0199_puc_Bitmap_Source      SEPARATOR
unsigned char*             P0200_puc_Bitmap_Destination SEPARATOR
int16_t*                   P2364_pi_XYZ                 SEPARATOR
int16_t                    P0202_i_X                    SEPARATOR
int16_t                    P0203_i_Y                    SEPARATOR
int16_t                    P0204_i_SourceByteWidth      SEPARATOR
int16_t                    P0205_i_DestinationByteWidth SEPARATOR
int16_t                    P0206_i_TransparentColor     SEPARATOR
int16_t                    P4163_i_                     SEPARATOR
int16_t                    P4164_i_
#endif
#ifdef ANOMALY_CEDT027
unsigned char*             P0199_puc_Bitmap_Source      SEPARATOR
unsigned char*             P0200_puc_Bitmap_Destination SEPARATOR
int16_t*                   P2364_pi_XYZ                 SEPARATOR
int16_t                    P0202_i_X                    SEPARATOR
int16_t                    P0203_i_Y                    SEPARATOR
int16_t                    P0204_i_SourceByteWidth      SEPARATOR
int16_t                    P0205_i_DestinationByteWidth SEPARATOR
int16_t                    P0206_i_TransparentColor
#endif
);
#endif
#ifdef MEDIA693_X31J_P31J
extern void F0698_InvertBox(int16_t P2377_i_X1, int16_t P2378_i_X2, int16_t P2379_i_Y1, int16_t P2380_i_Y2);
#endif
#ifdef MEDIA670_F31E_F31J
/*extern void F0698_InvertBox(
int16_t P2377_i_X1 SEPARATOR
int16_t P2378_i_X2 SEPARATOR
int16_t P2379_i_Y1 SEPARATOR
int16_t P2380_i_Y2
);*/
#endif
/*extern void F7333_BlitFromScreenNoTransparency(int16_t* P4172_pi_, int16_t P4173_i_, int16_t P4174_i_, int16_t P4175_i_, int16_t P4176_i_); Must be commented for FM-Towns */
extern void F7334_BlitToScreenNoTransparency(unsigned char* P4177_puc_Bitmap);
extern void F7335_AllocateAllRAM();
extern void F7336_FreeAllRAM();

extern unsigned int16_t F7055_F0417_SAVEUTIL_GetChecksumAndObfuscate(
unsigned int16_t* P0804_pui_Buffer  SEPARATOR
unsigned int16_t P0805_ui_Key       SEPARATOR
unsigned int16_t P0806_ui_WordCount
);



extern char* G3774_pc_SaveFloppyDriveName;
extern int16_t G3806_;
extern char* G3797_pc_DungeonMasterSavedGameFileName;
extern char* G3798_pc_DungeonMasterBackupSavedGameFileName;
extern char* G3799_pc_ChaosStrikesBackSavedGameFileName;
extern int16_t G0573_i_GameDiskFloppyDriveIndex;
extern char* G3761_PLEASE_PUT_A_SAVE_GAME_DISK_IN;
extern char* G3762_PUT_PORTRAIT_DISK_IN;
extern char* G3758_PUT_A_BLANK_DISK_IN;
extern char* G7068_YOU_MAY_LOAD_EITHER_A_SAVED_GAME_OR_A_CHAMPION_PORTRAIT;
extern char* G7069_YOU_MAY_SAVE_EITHER_THE_WHOLE_GAME_OR_THE_SELECTED_CHAMPIONS_PORTRAIT;
extern char* G3785_SELECT_A_CHAMPION_PORTRAIT;
extern char* G3765_REPLACE_EXISTING_SAVED_GAME;
extern char* G3786_THIS_WILL_DESTROY_ALL_INFORMATION_ON_THE_DISK_IN;
extern char* G3766_REPLACE_PORTRAIT;
extern char* G7071_PLEASE_WAIT_LOADING_SAVED_GAME;
extern char* G7072_PLEASE_WAIT_SAVING_GAME;
extern char* G3787_PLEASE_WAIT_FORMATTING_DISK;
extern char* G3788_CAN_T_FIND_SAVED_GAME;
extern char* G3789_THERE_ARE_NO_PORTRAITS_ON_THIS_DISK;
extern char* G3790_SAVED_GAME_ERROR;
extern char* G7078_ERROR_WHILE_SAVING_GAME;
extern char* G3791_ERROR_WHILE_FORMATTING_DISK;
extern char* G7077_ERROR_WHILE_SAVING_CHAMPION;
extern char* G7079_THIS_CHAMPION_IS_DAMAGED;
extern char* G7080_THIS_CHAMPION_CANNOT_BE_USED_WITH_THIS_ADVENTURE;
extern char* G7081_EACH_CHAMPION_MUST_HAVE_A_UNIQUE_FIRST_NAME;
extern char* G3756_PLEASE_PUT_THE_CHAOS_STRIKES_BACK_UTILITY_DISK_IN;
extern char* G7075_PLEASE_WAIT_LOADING_NEW_ADVENTURE;
extern char* G7076_PLEASE_WAIT_SAVING_NEW_ADVENTURE;
extern char* G3792_CAN_T_FIND_NEW_ADVENTURE;
extern char* G3793_THE_NEW_ADVENTURE_IS_DAMAGED;
extern char* G3755_THAT_S_NOT_THE_CHAOS_STRIKES_BACK_UTILITY_DISK;
extern char* G3764_THAT_S_THE_CHAOS_STRIKES_BACK_UTILITY_DISK;
extern char* G3794_ERROR_WHILE_SAVING_NEW_ADVENTURE;
extern char* G7083_THE_NEW_ADVENTURE_CAN_ONLY_BE_MADE_AFTER_A_SAVED_GAME_IS_LOADED;
extern char* G7084_CANT_MAKE_NEW_ADVENTURE_FROM_THIS_SAVED_GAME;
extern char* G7085_LOAD_WHICH_SAVED_GAME;
extern char* G7060_OK;
extern char* G7061_OK_CANCEL;
extern char* G3763_SAVE_FORMAT_CANCEL;
extern char* G3759_MAKE_NEW_ADVENTURE_FORMAT_CANCEL;
extern char* G3768_YES_NO;
extern char* G3795_FORMAT_CANCEL;
extern char* G7064_GAME_PORTRAIT_CANCEL;
extern char* G7065_DUNGEON_MASTER_CHAOS_STRIKES_BACK_CANCEL;
extern char* G7066_NEW_DISK;
extern char* G7067_CANCEL;
extern char* G3800_pc_ChaosStrikesBackBackupSavedGameFileName;
extern char* G3801_;
extern char* G3775_pc_GameFloppyDriveName;
extern char* G3802_pc_SaveFloppyDriveRootPath;
extern unsigned char G3784_[10608];
extern int16_t G2302_ai_Box_DialogDimensions[4];
extern unsigned int16_t G3751_aui_Palette[16];
extern char* G3769_pc_PortraitsDirectory;
extern char* G3771_;
extern char* G3803_;
#ifdef MEDIA772_SU1E
extern int16_t G3805_FileHandle;
#endif
#ifdef MEDIA762_AU1E
extern FILE_HANDLE G3805_FileHandle;
#endif

extern int16_t G3770_;
extern INPUT_INFO G3760_;
extern char G3782_[80];
extern int16_t G3807_;
extern unsigned int16_t G3749_aui_BlankPalette[16];
extern int16_t G3808_[4];
extern int16_t G3809_[4];
extern int16_t G3810_[4];
extern int16_t G3811_[4];
extern int16_t G3812_[4];
extern char* G3558_ac_NextFTLModuleToRun;
extern char* G3903_COULDN_T_FIND_DISK_IN;

extern int16_t F0087_strcmp();
extern int16_t F1991_();
extern char* F2095_AllocateMemory();
extern unsigned char* G3935_;
#ifdef MEDIA762_AU1E
extern char F2008_IsLeftMouseButtonDown();
extern FTL_LIBRARY* F9008_OpenPRIM();
#endif
extern unsigned char** F7227_RequestMemoryHandle(unsigned long P3976_ul_RequestedByteCount, int16_t P3977_i_Requirements);
#ifdef MEDIA773_SU1E_AU1E
extern void F1525_OpenVDIWorkstation();
extern void F1526_CloseWorkstationAndExitApplication();
extern void F1530_ShowMousePointerAsArrow();
extern void F1531_MouseHandler();
extern unsigned char* F7229_();
/* extern void F0359_COMMAND_ProcessClick_CPSC(); */
#endif
#ifdef MEDIA772_SU1E
extern void F1762_();
#endif
#if (defined(MEDIA773_SU1E_AU1E) || (defined(MEDIA767_AU2E) && (EXETYPE == C07_HINT)))
extern long F1769_GetLastErrorCode();
extern long F1770_();
extern UTM_BLOCK_PREFIX* F7220_();
extern void F7222_RemoveBlock();
#endif
#endif
#if EXETYPE == C07_HINT
extern long F1857_PerformIORequestOperation();
extern long F1861_GetIORequestOutputValue();
extern long F1872_LoadGraphics();
extern long F1878_LoadGraphic();
extern long F1880_LoadBitmapFromGraphic();
extern long F1886_Memory();
extern char* F1920_AllocateMemory();
extern long F1925_CPSX();
extern long F1931_();
extern long F1933_();
extern long F1955_Input_CPSX();
extern void F1957_();
extern long F1965_();
extern unsigned char* F2015_();
extern unsigned char* F2016_();
extern char F2008_IsLeftMouseButtonDown();
extern unsigned int16_t F2026_GetGraphicByteCount();
extern void F2028_LoadHintOracleTexts();
extern void F2030_FreeHintOracleTexts();
extern unsigned int16_t* F2033_();
extern unsigned char* F2037_();
extern unsigned char* F2038_();
extern void F2039_();
extern void F0078_MOUSE_DisableScreenUpdate();
extern void F0077_MOUSE_EnableScreenUpdate_CPSE();
extern STRUCT22B* F1884_Text();


extern long G3852_;
extern int16_t G3854_[100];
extern int16_t G3855_[16];
extern struct BitMap G3835_s_BitMap_Screen;
extern unsigned int16_t G3829_aui_Palette[32];
extern char G3720_CPSX[8];
extern int16_t G3576_i_Unused;
extern STRUCT22B* G3715_;
extern int16_t G3718_ui_PartyChampionCount;
extern GAME_HINT G3623_Game[2];
extern int16_t G3638_i_IORequestIndex_CSBGAME;
extern int16_t G3717_;
extern char* G3637_apc_FileNames[6];
extern int16_t G3681_;
extern int16_t G3678_i_AllocatedMemoryBlockCount;
extern long G3730_;
extern BOOLEAN G3642_B_HintDataLoaded;
extern int16_t G3709_i_SelectedHintPageIndex;
extern int16_t G3710_i_SelectedHintIndex;
extern STRUCT22B* G3712_ps_HintTitle;
extern STRUCT22B* G3713_ps_HintPageText;
extern long G3711_l_CurrentHintIndex;
extern long G3714_l_CurrentHintPageIndex;
extern int16_t G3572_B_DebugEnabled;
extern int16_t G3684_i_CallDepth;
extern char* G3731_apc_DebugCategoryNames[64];
extern unsigned char* G3680_[100];
extern unsigned char* G3679_apuc_AllocatedMemoryBlocks[100];
extern char G3656_ac_DecompressedHintContent[2240];
extern int16_t G3645_i_SelectedHintCount;
extern HINT_SQUARE* G3639_ps_HintLocations;
extern HINT* G3640_ps_Hints;
extern int16_t* G3641_pi_HintByteCounts;
extern unsigned int16_t G3649_i_HintSquareCount;
extern int16_t G3651_i_HintCount;
extern long G3653_l_HintDataOffset;
extern unsigned int16_t G3644_aui_SelectedHintIndices[7];
extern unsigned int16_t G3643_ui_SelectedHintIndex;
extern STRUCTHINT G3646_;
extern HINT_GRAPHICS* G3677_ps_HintGraphics;
extern unsigned char* G3676_;
extern unsigned int16_t G3608_;
extern long G3602_;
extern MOUSE2_INPUT G3594_as_MouseInput[12];
extern KEY2BOARD_INPUT G3595_as_KeyboardInput[12];
extern INPUT_INFO G3596_s_InputInfo;
extern int16_t G3592_i_MouseInputCount;
extern int16_t G3593_i_KeyboardInputCount;
extern int16_t G3597_i_InputInfoIndex;
extern char G3725_ac_Unreferenced[10];
extern UD_COMMAND G3604_s_UDCommand;
extern STRUCT10B* G3706_[23];
extern int16_t G3621_ai_XYZ_Screen[4];
extern HINT_BUTTON G3598_as_HintButtons[20];
extern HINT_BUTTON G3708_s_HintButton;
extern char G3665_ac_TextLine[80];
extern int16_t G3658_;
extern int16_t G3659_i_CharacterIndex;
extern int16_t G3663_i_SpaceCharacterIndex;
extern int16_t G3660_i_CharacterCount;
extern int16_t G3661_i_Width;
extern int16_t G3662_i_HintTextLineY;
extern int16_t G3666_i_HintTextLineX;
extern char G3664_;
extern IOREQ** G3670_IORequests;
extern unsigned char** G3671_puc_IOBuffer;
extern int16_t G3675_;
extern unsigned int16_t G3669_ui_IORequestCount;
extern char G3673_ac_FileName[22];
extern char G3674_ac_FileName[22];
extern int16_t G3620_i_ScreenIndex;
extern BOOLEAN G3624_;
extern int16_t G3721_ai_ColorComponentMasks[3];
extern int16_t G3722_ai_ColorComponentIncrements[3];
extern STRUCT22B* G3577_ps_InsertDiskInDriveAThenPressLoad;
extern STRUCT22B* G3578_ps_InsertDiskInDriveBThenPressLoad;
extern STRUCT22B* G3579_ps_InsertDiskInDriveA;
extern STRUCT22B* G3580_ps_InsertDiskInDriveB;
extern STRUCT22B* G3581_ps_NoClueForThisLocation;
extern STRUCT22B* G3729_ps_SafeToTurnSystemOff;
extern STRUCT22B* G3582_ps_PleaseInsertCSBUtilityDisk;
extern STRUCT22B* G3583_ps_PleaseInsertCSBUtilityDisk;
extern STRUCT22B* G3584_ps_DiskErrorPleaseTryAgain;
extern STRUCT22B* G3585_ps_DiskError_LoadHintContent;
extern STRUCT22B* G3586_ps_DiskErrorPleaseTryAgain;
extern STRUCT22B* G3587_ps_DiskErrorPleaseTryAgain;
extern STRUCT22B* G3588_ps_DiskErrorPleaseTryAgain;
extern STRUCT22B* G3589_ps_DiskErrorPleaseTryAgain;
extern STRUCT22B* G3590_ps_DiskErrorPleaseTryAgain;
extern STRUCT22B* G3591_ps_IncorrectOrDamagedSavedGame;
extern int16_t G3622_;
extern char* G3618_apuc_Screens[2];
extern int16_t G3724_ai_XYZ[4];
extern long G3631_;
extern unsigned int16_t G3609_aui_GraphicIntegers[100];
extern unsigned int16_t G3682_aui_Palette_BeforeHintOracle[16];
extern unsigned int16_t G3617_aui_Palette[16];
extern int16_t G3603_aui_Palette_HintOracle[16];
extern unsigned char G3657_auc_PaletteChanges_Font[16];
extern unsigned char G3655_auc_PaletteChanges[16];
extern BOOLEAN G3546_B_;
extern unsigned char* G3613_puc_Bitmap_Font;
extern unsigned char* G3612_;
extern unsigned char* G3611_puc_Bitmap_Oracle;
extern HINT_GRAPHICS G3615_s_HintGraphics;
#endif
#if ((EXETYPE == C06_CEDT) || (EXETYPE == C07_HINT))
#if (defined(MEDIA671_F31E_F31J_P31J) || defined(THINK_C))
extern UDSTRUCT8 G2296_[1];
extern UDSTRUCT8 G2281_[2];
extern STRUCT12B G3553_[24];
extern MEMORY_REGION G3561_as_MemoryRegions[2];

#if EXETYPE == C06_CEDT
extern UD_COMMAND G2257_Command;
extern INPUT_INFO* G7100_as_InputInfo[6];

extern INPUT_INFO** F7014_SetCurrentInputInfoList(INPUT_INFO** P3655_pps_NewInputInfoList);
#endif

extern unsigned char** F7227_RequestMemoryHandle(unsigned long P3976_ul_RequestedByteCount, int16_t P3977_i_Requirements);
extern unsigned char* F7229_();
#endif
/* #endif */
#endif
#endif
