#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA042_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
#ifdef MEDIA351_G14ED_G20E_G21E
/* TO BE MERGED WITH DATA IN OTHER VERSIONS ONCE CONTENT IS VALIDATED */
char* G0536_pc_GAMELOADEDREADYTOPLAY = "GAME LOADED, READY TO PLAY.";
char* G0537_pc_CANTMODIFYGAMEDISK = "CAN'T MODIFY DUNGEON MASTER DISK!";
char* G0538_pc_THATSNOTTHEMASTERDISK = "THAT'S NOT THE MASTER DISK!";
char* G0539_pc_CANTFINDSAVEDGAME = "CAN'T FIND SAVED GAME!";
char* G0540_pc_UNABLETOSAVEGAME = "UNABLE TO SAVE GAME!";
char* G0541_pc_UNABLETOFORMATDISK = "UNABLE TO FORMAT DISK!";
char* G0542_pc_THATSTHEGAMEDISK = "THAT'S THE DUNGEON MASTER DISK!";
char* G0543_pc_THATSAGAMESAVEDISK = "THAT'S A GAME SAVE DISK!";
char* G0544_pc_THATDISKISWRITEPROTECTED = "THAT DISK IS WRITE-PROTECTED!";
char* G0545_pc_THATDISKISUNREADABLE = "THAT DISK IS UNREADABLE";
char* G0546_pc_THATSNOTTHESAMEGAME = "THAT'S NOT THE SAME GAME";
#ifdef MEDIA349_G14ED
char* G0547_pc_SAVEDGAMEDAMAGED = "SAVED GAME DAMAGED!";
#endif
#ifdef MEDIA388_G20E_G21E
char* G0547_pc_SAVEDGAMEDAMAGED = "THE GAME IS DAMAGED!";
#endif
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "PUT THE GAME SAVE DISK IN ~";
char* G0549_pc_PUTTHEGAMEDISKIN = "PUT THE DUNGEON MASTER DISK IN ~";
char* G0550_pc_PUTABLANKDISKIN = "PUT A BLANK DISK IN ~";
char* G0551_pc_SAVINGGAME = "SAVING GAME . . .";
char* G0552_pc_LOADINGGAME = "LOADING GAME . . .";
char* G0553_pc_FORMATTINGDISK = "FORMATTING DISK . . .";
char* G0554_pc_FORMATDISKANYWAY = "FORMAT DISK ANYWAY?";
char* G0555_pc_THEREISNODISKIN = "THERE IS NO DISK IN ~!";
char* G0556_pc_LOADSAVEDGAME = "LOAD SAVED GAME";
char* G0557_pc_SAVEANDPLAY = "SAVE AND PLAY";
char* G0558_pc_SAVEANDQUIT = "SAVE AND QUIT";
char* G0559_pc_FORMATFLOPPY = "FORMAT FLOPPY";
char* G0560_pc_OK = "OK";
char* G0561_pc_CANCEL = "CANCEL";
#endif
#ifdef MEDIA198_S10EA_S10EB_S11E_S12E_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE4_00_LOCALIZATION Translation to German language */
#ifdef MEDIA002_S10EA_S10EB_S11E /* CHANGE3_16_OPTIMIZATION Variables reordered */
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "PUT GAME SAVE DISK IN DRIVE A:";
#endif
char* G0536_pc_GAMELOADEDREADYTOPLAY = "GAME LOADED, READY TO PLAY.";
#ifdef MEDIA199_S10EA_S10EB_S11E_S12E_A20ED_A20E_A21E_A22E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0537_pc_CANTMODIFYGAMEDISK = "CAN'T MODIFY DUNGEON MASTER DISK!";
#endif
#ifdef MEDIA265_S20E_S21E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0537_pc_CANTMODIFYGAMEDISK = "CAN'T MODIFY CHAOS STRIKES BACK DISK!";
#endif
#ifdef MEDIA002_S10EA_S10EB_S11E /* CHANGE3_16_OPTIMIZATION Variables reordered */
char* G0549_pc_PUTTHEGAMEDISKIN = "PUT DUNGEON MASTER DISK IN A:";
#endif
char* G0538_pc_THATSNOTTHEMASTERDISK = "THAT'S NOT THE MASTER DISK!";
#ifdef MEDIA002_S10EA_S10EB_S11E /* CHANGE3_16_OPTIMIZATION Variables reordered */
char* G0550_pc_PUTABLANKDISKIN = "PUT A BLANK DISK IN DRIVE A:";
#endif
char* G0539_pc_CANTFINDSAVEDGAME = "CAN'T FIND SAVED GAME!";
char* G0540_pc_UNABLETOSAVEGAME = "UNABLE TO SAVE GAME!";
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_31_IMPROVEMENT */
char* G0541_pc_UNABLETOFORMATDISK = "UNABLE TO FORMAT DISK!";
#endif
#ifdef MEDIA199_S10EA_S10EB_S11E_S12E_A20ED_A20E_A21E_A22E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0542_pc_THATSTHEGAMEDISK = "THAT'S THE DUNGEON MASTER DISK!";
#endif
#ifdef MEDIA265_S20E_S21E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0542_pc_THATSTHEGAMEDISK = "THAT'S THE CHAOS STRIKES BACK DISK!";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_31_IMPROVEMENT */
char* G0543_pc_THATSAGAMESAVEDISK = "THAT'S A GAME SAVE DISK!";
#endif
char* G0544_pc_THATDISKISWRITEPROTECTED = "THAT DISK IS WRITE-PROTECTED!";
#ifdef MEDIA003_S10EA_S10EB_S11E_S12E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0545_pc_THATDISKISUNREADABLE = "THAT DISK IS UNREADABLE.";
char* G0546_pc_THATSNOTTHESAMEGAME = "THAT'S NOT THE SAME GAME.";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0545_pc_THATDISKISUNREADABLE = "THAT DISK IS UNREADABLE";
char* G0546_pc_THATSNOTTHESAMEGAME = "THAT'S NOT THE SAME GAME";
#endif
#ifdef MEDIA251_S12E_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE3_17_IMPROVEMENT */
char* G0547_pc_SAVEDGAMEDAMAGED = "SAVED GAME DAMAGED!";
#endif
#ifdef MEDIA234_S12E /* CHANGE3_16_OPTIMIZATION Variables reordered */
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "PUT GAME SAVE DISK IN DRIVE A:";
char* G0549_pc_PUTTHEGAMEDISKIN = "PUT DUNGEON MASTER DISK IN A:";
char* G0550_pc_PUTABLANKDISKIN = "PUT A BLANK DISK IN DRIVE A:";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_03_IMPROVEMENT Support for two floppy disk drives CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "PUT THE GAME SAVE DISK IN ~";
#endif
#ifdef MEDIA265_S20E_S21E /* CHANGE7_03_IMPROVEMENT Support for two floppy disk drives CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0549_pc_PUTTHEGAMEDISKIN = "PUT THE CHAOS STRIKES BACK DISK IN ~";
#endif
#ifdef MEDIA430_A20ED_A20E_A21E_A22E
char* G0549_pc_PUTTHEGAMEDISKIN = "PUT THE DUNGEON MASTER DISK IN ~";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_03_IMPROVEMENT Support for two floppy disk drives CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0550_pc_PUTABLANKDISKIN = "PUT A BLANK DISK IN ~";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_07_LOCALIZATION Translation to English language (differences with original Dungeon Master) */
char* G0551_pc_SAVINGGAME = "SAVING GAME . . .";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_32_IMPROVEMENT */
char* G0552_pc_LOADINGGAME = "LOADING GAME . . .";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_31_IMPROVEMENT */
char* G0553_pc_FORMATTINGDISK = "FORMATTING DISK . . .";
char* G0554_pc_FORMATDISKANYWAY = "FORMAT DISK ANYWAY?";
#endif
#ifdef MEDIA317_S20E_S21E_A20ED_A20E_A21E_A22E /* CHANGE7_31_IMPROVEMENT CHANGE7_32_IMPROVEMENT CHANGE7_33_IMPROVEMENT */
char* G0555_pc_THEREISNODISKIN = "THERE IS NO DISK IN ~!";
#endif
char* G0556_pc_LOADSAVEDGAME = "LOAD SAVED GAME";
char* G0557_pc_SAVEANDPLAY = "SAVE AND PLAY";
char* G0558_pc_SAVEANDQUIT = "SAVE AND QUIT";
char* G0559_pc_FORMATFLOPPY = "FORMAT FLOPPY";
char* G0560_pc_OK = "OK";
char* G0561_pc_CANCEL = "CANCEL";
#endif
#ifdef MEDIA255_S12G_A20G_A22G /* CHANGE4_00_LOCALIZATION Translation to German language */
char* G0536_pc_GAMELOADEDREADYTOPLAY = "SPIEL GELADEN, STARTBEREIT.";
#ifdef MEDIA252_S12G
char* G0537_pc_CANTMODIFYGAMEDISK = "DM KANN NICHT GEAENDERT WERDEN!";
#endif
#ifdef MEDIA446_A20G_A22G
char* G0537_pc_CANTMODIFYGAMEDISK = "DM-DISK KANN NICHT GEAENDERT WERDEN!";
#endif
char* G0538_pc_THATSNOTTHEMASTERDISK = "DIES IST NICHT DIE ORIGINALDISK!";
char* G0539_pc_CANTFINDSAVEDGAME = "GESICHERTES SPIEL NICHT ZU FINDEN";
char* G0540_pc_UNABLETOSAVEGAME = "KEIN SICHERN MOEGLICH!";
#ifdef MEDIA252_S12G
char* G0542_pc_THATSTHEGAMEDISK = "DIES IST DIE DM-ORIGINALDISKETTE!";
#endif
#ifdef MEDIA446_A20G_A22G
char* G0541_pc_UNABLETOFORMATDISK = "FORMATIEREN DER DISK NICHT MOEGLICH!";
char* G0542_pc_THATSTHEGAMEDISK = "DIES IST DIE DUNGEONMASTER DISK!";
char* G0543_pc_THATSAGAMESAVEDISK = "DIES IST EINE SPIELARCHIV DISK!";
#endif
char* G0544_pc_THATDISKISWRITEPROTECTED = "DISKETTE IST SCHREIBGESCHUETZT!";
#ifdef MEDIA252_S12G
char* G0545_pc_THATDISKISUNREADABLE = "DISKETTE NICHT LESBAR.";
char* G0546_pc_THATSNOTTHESAMEGAME = "DIES IST NICHT DASSELBE SPIEL.";
char* G0547_pc_SAVEDGAMEDAMAGED = "SAVED GAME DAMAGED!";
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "ARCHIV-DISK IN A LAUFWERK A LEGEN";
char* G0549_pc_PUTTHEGAMEDISKIN = "DM-DISK IN A EINLEGEN";
char* G0550_pc_PUTABLANKDISKIN = "LEERE DISKETTE IN A EINLEGEN";
#endif
#ifdef MEDIA446_A20G_A22G
char* G0545_pc_THATDISKISUNREADABLE = "DISKETTE NICHT LESBAR";
char* G0546_pc_THATSNOTTHESAMEGAME = "DIES IST NICHT DASSELBE SPIEL";
char* G0547_pc_SAVEDGAMEDAMAGED = "GESICHERTES SPIEL BESCHAEDIGT!";
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "SPIELARCHIV DISK IN ~ EINLEGEN";
char* G0549_pc_PUTTHEGAMEDISKIN = "DUNGEONMASTER DISK IN ~ EINLEGEN";
char* G0550_pc_PUTABLANKDISKIN = "LEERE DISKETTE IN ~ EINLEGEN";
char* G0551_pc_SAVINGGAME = "SPIEL WIRD GESICHERT . . .";
char* G0552_pc_LOADINGGAME = "SPIEL WIRD GELADEN . . .";
char* G0553_pc_FORMATTINGDISK = "DISK WIRD FORMATIERT . . .";
char* G0554_pc_FORMATDISKANYWAY = "DIESE DISK FORMATIEREN?";
char* G0555_pc_THEREISNODISKIN = "ES IST KEINE DISKETTE IN ~!";
#endif
char* G0556_pc_LOADSAVEDGAME = "ARCHIVIERTES SPIEL LADEN";
char* G0557_pc_SAVEANDPLAY = "SICHERN/SPIEL";
char* G0558_pc_SAVEANDQUIT = "SICHERN/ENDEN";
char* G0559_pc_FORMATFLOPPY = "FORMATIEREN";
char* G0560_pc_OK = "OK";
char* G0561_pc_CANCEL = "WIDERRUFEN";
#endif
#ifdef MEDIA261_S13FA_S13FB_A20F /* CHANGE5_00_LOCALIZATION Translation to French language */
char* G0536_pc_GAMELOADEDREADYTOPLAY = "JEU CHARGE, PRET A COMMENCER.";
char* G0537_pc_CANTMODIFYGAMEDISK = "DISQUE NE PEUT ETRE MODIFIE";
char* G0538_pc_THATSNOTTHEMASTERDISK = "CECI N'EST PAS LE DISQUE MAITRE!";
char* G0539_pc_CANTFINDSAVEDGAME = "JEU SAUVEGARDE EST ABSENT";
char* G0540_pc_UNABLETOSAVEGAME = "IMPOSSIBLE DE SAUVEGARDER LE JEU!";
#ifdef MEDIA256_S13FA_S13FB
char* G0542_pc_THATSTHEGAMEDISK = "CECI EST LE DISQUE MAITRE!";
#endif
#ifdef MEDIA443_A20F
char* G0541_pc_UNABLETOFORMATDISK = "IMPOSSIBLE DE FORMATER LE DISQUE!";
char* G0542_pc_THATSTHEGAMEDISK = "CECI EST LE DISQUE DU DUNGEON MASTER!";
char* G0543_pc_THATSAGAMESAVEDISK = "CECI EST UN DISQUE DE SAUVEGARDE DU JEU!";
#endif
char* G0544_pc_THATDISKISWRITEPROTECTED = "DISQUE BLOQUE";
char* G0545_pc_THATDISKISUNREADABLE = "DISQUE ILLISIBLE";
char* G0546_pc_THATSNOTTHESAMEGAME = "JEU DIFFERENT";
#ifdef MEDIA256_S13FA_S13FB
char* G0547_pc_SAVEDGAMEDAMAGED = "SAVED GAME DAMAGED!";
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "DISQUE DE SAUVEGARDE DU JEU EN A:";
char* G0549_pc_PUTTHEGAMEDISKIN = "METTRE DISQUE MAITRE EN A:";
char* G0550_pc_PUTABLANKDISKIN = "METTRE UN DISQUE VIERGE EN A:";
char* G0551_pc_SAVINGGAME = "UN MOMENT A SAUVEGARDER DU JEU...";
#endif
#ifdef MEDIA443_A20F
char* G0547_pc_SAVEDGAMEDAMAGED = "JEU SAUVEGARDE EST ENDOMMAGE!";
char* G0548_pc_PUTTHEGAMESAVEDISKIN = "METTRE DISQUE SAUVEGARDE DANS LE LECTEUR DE DISQUE ~";
char* G0549_pc_PUTTHEGAMEDISKIN = "METTRE DISQUE DUNGEON MASTER DANS LE LECTEUR DE DISQUE ~";
char* G0550_pc_PUTABLANKDISKIN = "METTRE UN DISQUE VIERGE EN ~";
char* G0551_pc_SAVINGGAME = "SAUVEGARDE DU JEU . . .";
char* G0552_pc_LOADINGGAME = "CHARGEMENT DU JEU . . .";
char* G0553_pc_FORMATTINGDISK = "FORMATAGE DU DISQUE . . .";
char* G0554_pc_FORMATDISKANYWAY = "FORMATER QUAND MEME LE DISQUE?";
char* G0555_pc_THEREISNODISKIN = "IL N'Y A PAS DE DISQUE DANS LE LECTEUR DE DISQUE ~!";
#endif
char* G0556_pc_LOADSAVEDGAME = "CHARGER JEU SAUVEGARDE";
#ifdef MEDIA256_S13FA_S13FB
char* G0557_pc_SAVEANDPLAY = "GARDER: JOUER";
char* G0558_pc_SAVEANDQUIT = "GARDER: SORTIR";
char* G0559_pc_FORMATFLOPPY = "FORMATER A:";
#endif
#ifdef MEDIA443_A20F
char* G0557_pc_SAVEANDPLAY = "GARDER/JOUER";
char* G0558_pc_SAVEANDQUIT = "GARDER/SORTIR";
char* G0559_pc_FORMATFLOPPY = "FORMATER";
#endif
char* G0560_pc_OK = "OK";
char* G0561_pc_CANCEL = "ANNULLER";
#endif
/*#ifdef MEDIA349_G14ED
char G1059_pc_DungeonFileName[] = "/DUNGEON.MASTER/DEMODUN.DAT";
*//*#endif*/
#ifdef MEDIA410_A20ED
char* G1059_pc_DungeonFileName = "DungeonMaster:DemoDun.dat";
#endif
/*#ifdef MEDIA388_G20E_G21E
char G1149_pc_BonusDungeonFileName[] = "*:DUNGEON.BONUS";
char G1059_pc_DungeonFileName[] = "*:DUNGEON.GAME";
char G1064_pc_ExpansionSetDungeonFileName[] = ":DUNGEON.SAVE:DUNGEON.FTL";
*//*#endif*/
#ifdef MEDIA433_A20E_A20F_A20G_A21E_A22E_A22G
char* G1059_pc_DungeonFileName = "DungeonMaster:Dungeon.dat";
#endif
#ifdef MEDIA448_A21E_A22E
char* G1149_pc_BonusDungeonFileName = "DungeonMaster:DungeonB.dat";
#endif
#ifdef MEDIA410_A20ED
char* G1060_pc_GameDiskVolumeName = "DungeonMaster";
char* G1061_pc_SaveDiskVolumeName = "DungeonSave";
#endif
#ifdef MEDIA433_A20E_A20F_A20G_A21E_A22E_A22G
char* G1060_pc_GameDiskVolumeName = "DungeonMaster:";
char* G1061_pc_SaveDiskVolumeName = "DungeonSave:";
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
char* G1062_pc_SavedGameFileName = "DungeonSave:DMGame.dat";
char* G1063_pc_SavedGameBackupFileName = "DungeonSave:DMGame.bak";
char* G1064_pc_ExpansionSetDungeonFileName = "DungeonSave:Dungeon.FTL";
#endif
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
int16_t G2062_DialogSetIndex = C1_DIALOG_SET_SCREEN;
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
unsigned int16_t G0335_ui_SelectedDialogChoice;
#endif
#ifdef MEDIA540_F20E_F20J_X30J_P20JA_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
int16_t G2064_[2] = { C11_COLOR_YELLOW, C09_COLOR_GOLD };
/* "V3.1"\0\0 */
#endif
#ifdef MEDIA478_P20JB_I34E_I34M
int16_t G2064_[2] = { C11_COLOR_YELLOW, C15_COLOR_WHITE };
/* "V3.4"\0\0 */
#endif


#ifdef MEDIA007_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E
overlay "start"
#endif
#ifdef MEDIA351_G14ED_G20E_G21E
segment "start"
#endif

#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
STATICFUNCTION void F0600_DIALOG_subroutine(
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
void
#endif
#ifdef MEDIA488_F20E_F20J
int16_t P6119_
#endif
)
{
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        if (G2062_DialogSetIndex) {
#endif
#ifdef MEDIA488_F20E_F20J
        if (P6119_) {
#endif
                F0021_MAIN_BlitToScreen(G0296_puc_Bitmap_Viewport, C005_ZONE_SCREEN_CENTERED_DIALOG, CM1_COLOR_NO_TRANSPARENCY);
        } else {
                F0097_DUNGEONVIEW_DrawViewport(C0_VIEWPORT_NOT_DUNGEON_VIEW);
        }
}
#endif

int16_t F0424_DIALOG_GetChoice(
#ifdef MEDIA184_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_G14ED_A20ED /* CHANGE7_34_OPTIMIZATION Function calls to show and hide the mouse pointer on screen are now included in the function to get the player's choice in dialogs */
P0824_ui_ChoiceCount, P0825_ui_DialogSetIndex)
#endif
#ifdef MEDIA292_S20E_S21E_G20E_G21E_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_34_OPTIMIZATION */
P0824_ui_ChoiceCount, P0825_ui_DialogSetIndex, P0826_i_DriveType, P0827_i_AutomaticChoiceIfFloppyInDrive)
#endif
unsigned int16_t P0824_ui_ChoiceCount                   SEPARATOR
#ifdef MEDIA014_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J
unsigned int16_t P0825_ui_DialogSetIndex                SEPARATOR
#endif
#ifdef MEDIA297_S20E_S21E_G20E_G21E_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J /* CHANGE7_34_OPTIMIZATION */
int16_t          P0826_i_DriveType                      SEPARATOR /* BUG0_00 Useless code (Atari ST) */
int16_t          P0827_i_AutomaticChoiceIfFloppyInDrive FINAL_SEPARATOR /* BUG0_00 Useless code (Atari ST) */
#endif
{
        MOUSE_INPUT* L1298_ps_PrimaryMouseInputBackup;
        MOUSE_INPUT* L1299_ps_SecondaryMouseInputBackup;
        KEYBOARD_INPUT* L1300_ps_PrimaryKeyboardInputBackup;
        KEYBOARD_INPUT* L1301_ps_SecondaryKeyboardInputBackup;
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        int16_t L1302_i_Unreferenced; /* BUG0_00 Useless code */
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J /* MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J */
        int16_t L2341_ai_XYZ[4];
#endif
#ifdef MEDIA725_I34E_I34M_A36M_A33M_A35E_A35M
        int16_t L2342_i_;
#endif
#ifdef MEDIA035_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_P31J
        int16_t L1303_ai_BoxB[4];   /* Should be merged with L2341_ai_XYZ above */
        int16_t L1304_ai_BoxA[4];
#endif


#ifdef MEDIA292_S20E_S21E_G20E_G21E_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_34_OPTIMIZATION In previous versions, this function was always called prior to this function */
        M523_MOUSE_ShowPointer();
#endif
        L1298_ps_PrimaryMouseInputBackup = G0441_ps_PrimaryMouseInput;
        L1299_ps_SecondaryMouseInputBackup = G0442_ps_SecondaryMouseInput;
        L1300_ps_PrimaryKeyboardInputBackup = G0443_ps_PrimaryKeyboardInput;
        L1301_ps_SecondaryKeyboardInputBackup = G0444_ps_SecondaryKeyboardInput;
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        G0442_ps_SecondaryMouseInput = G0443_ps_PrimaryKeyboardInput = G0444_ps_SecondaryKeyboardInput = NULL;
#endif
#ifdef MEDIA014_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J
        G0441_ps_PrimaryMouseInput = G0480_aaps_PrimaryMouseInput_DialogSets[P0825_ui_DialogSetIndex][P0824_ui_ChoiceCount - 1];
#endif
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        G0441_ps_PrimaryMouseInput = G0480_aaps_PrimaryMouseInput_DialogSets[G2062_DialogSetIndex][P0824_ui_ChoiceCount - 1];
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        G0442_ps_SecondaryMouseInput = 0;
        G0443_ps_PrimaryKeyboardInput = G0444_ps_SecondaryKeyboardInput = 0;
#endif
        F0357_COMMAND_DiscardAllInput();
#ifdef MEDIA725_I34E_I34M_A36M_A33M_A35E_A35M
        L2342_i_ = 0;
        while (G0587_i_HideMousePointerRequestCount > 0) {
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                M523_MOUSE_ShowPointer();
#endif
#ifdef MEDIA725_I34E_I34M_A36M_A33M_A35E_A35M
                L2342_i_++;
        }
#endif
        G0335_ui_SelectedDialogChoice = 99;
        do {
                F0380_COMMAND_ProcessQueue_CPSC();
                M526_WaitVerticalBlank();
#ifdef MEDIA052_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_X31J
                if ((G0335_ui_SelectedDialogChoice == 99) && (P0824_ui_ChoiceCount == 1) && M527_IsCharacterInKeyboardBuffer() && ((int16_t)M528_GetCharacterInKeyboardBuffer() == '\r')) { /* If a choice has not been made yet with the mouse and the dialog has only one possible choice and carriage return was pressed on the keyboard */
#endif
#ifdef MEDIA670_F31E_F31J
                if ((G0335_ui_SelectedDialogChoice == 99) && (P0824_ui_ChoiceCount == 1) && M527_IsCharacterInKeyboardBuffer() && ((int16_t)M528_GetCharacterInKeyboardBuffer() == '\x1D')) { /* If a choice has not been made yet with the mouse and the dialog has only one possible choice and carriage return was pressed on the keyboard */
#endif
#ifdef MEDIA463_P20JA_P20JB_I34E_I34M_P31J
                if ((G0335_ui_SelectedDialogChoice == 99) && (P0824_ui_ChoiceCount == 1) && M527_IsCharacterInKeyboardBuffer() && ((int16_t)M528_GetCharacterInKeyboardBuffer() == '\x1C')) { /* If a choice has not been made yet with the mouse and the dialog has only one possible choice and carriage return was pressed on the keyboard */
#endif
#ifdef MEDIA746_A36M_A31E_A31M_A33M_A35E_A35M
                if ((G0335_ui_SelectedDialogChoice == 99) && (P0824_ui_ChoiceCount == 1) && M527_IsCharacterInKeyboardBuffer() && ((int16_t)M528_GetCharacterInKeyboardBuffer() == 0x4400)) { /* If a choice has not been made yet with the mouse and the dialog has only one possible choice and carriage return was pressed on the keyboard */
#endif
                        G0335_ui_SelectedDialogChoice = C1_DIALOG_CHOICE_1;
                }
#ifdef MEDIA265_S20E_S21E /* CHANGE7_34_OPTIMIZATION */
                if (C0_FALSE) { /* BUG0_00 Useless code */
#endif
#ifdef MEDIA394_G20E_G21E_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                if (F0529_FLOPPY_IsFloppyInDrive(P0826_i_DriveType)) { /* BUG0_00 Useless code */
#endif
#ifdef MEDIA297_S20E_S21E_G20E_G21E_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        G0335_ui_SelectedDialogChoice = P0827_i_AutomaticChoiceIfFloppyInDrive;
                }
#endif
        } while (G0335_ui_SelectedDialogChoice == 99);
#ifdef MEDIA725_I34E_I34M_A36M_A33M_A35E_A35M
        while (L2342_i_--) {
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                M522_MOUSE_HidePointer();
#endif
#ifdef MEDIA725_I34E_I34M_A36M_A33M_A35E_A35M
        }
#endif
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        G0578_B_UseByteBoxCoordinates = C0_FALSE;
        F0007_MAIN_CopyBytes(&G0441_ps_PrimaryMouseInput[G0335_ui_SelectedDialogChoice - 1].Box, L1304_ai_BoxA, sizeof(L1304_ai_BoxA));
        M768_BOX_LEFT(L1304_ai_BoxA) -= 3;
        M769_BOX_RIGHT(L1304_ai_BoxA) += 3;
        M770_BOX_TOP(L1304_ai_BoxA) -= 3;
        M771_BOX_BOTTOM(L1304_ai_BoxA) += 4;
        F0077_MOUSE_EnableScreenUpdate_CPSE();
#endif
        G0297_B_DrawFloorAndCeilingRequested = C1_TRUE;
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        if (G0441_ps_PrimaryMouseInput[G0335_ui_SelectedDialogChoice - 1].Box.X1 < 0) {
#ifdef MEDIA508_F20E_F20J_X30J_P20JA_P20JB
                F0638_GetZone(G0441_ps_PrimaryMouseInput[G0335_ui_SelectedDialogChoice - 1].Box.X2, L1304_ai_BoxA);
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                F0638_GetZone(G0441_ps_PrimaryMouseInput[G0335_ui_SelectedDialogChoice - 1].Box.X2, L2341_ai_XYZ);
#endif
        }
#endif
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        M768_BOX_LEFT(L1303_ai_BoxB) = 0;
        M770_BOX_TOP(L1303_ai_BoxB) = 0;
        M771_BOX_BOTTOM(L1303_ai_BoxB) = M771_BOX_BOTTOM(L1304_ai_BoxA) - M770_BOX_TOP(L1304_ai_BoxA) + 3;
        M769_BOX_RIGHT(L1303_ai_BoxB) = M769_BOX_RIGHT(L1304_ai_BoxA) - M768_BOX_LEFT(L1304_ai_BoxA) + 3;
#endif
#ifdef MEDIA508_F20E_F20J_X30J_P20JA_P20JB
        M768_BOX_LEFT(L1304_ai_BoxA) -= 2;
        M769_BOX_RIGHT(L1304_ai_BoxA) += 2;
        M770_BOX_TOP(L1304_ai_BoxA) -= 2;
        M771_BOX_BOTTOM(L1304_ai_BoxA) += 3;
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        M704_ZONE_LEFT(L2341_ai_XYZ) -= 3;
        M706_ZONE_TOP(L2341_ai_XYZ) -= 2;
        M708_ZONE_WIDTH(L2341_ai_XYZ) += 6;
        M709_ZONE_HEIGHT(L2341_ai_XYZ) += 5;
#endif
#ifdef MEDIA008_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E
        F0132_VIDEO_Blit(G0348_Bitmap_Screen, G0296_puc_Bitmap_Viewport, L1303_ai_BoxB, M768_BOX_LEFT(L1304_ai_BoxA), M770_BOX_TOP(L1304_ai_BoxA), C160_BYTE_WIDTH_SCREEN, C160_BYTE_WIDTH_SCREEN, CM1_COLOR_NO_TRANSPARENCY);
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        F0132_VIDEO_Blit(G0348_Bitmap_Screen, G0296_puc_Bitmap_Viewport, L1303_ai_BoxB, M768_BOX_LEFT(L1304_ai_BoxA), M770_BOX_TOP(L1304_ai_BoxA), C160_BYTE_WIDTH_SCREEN, C160_BYTE_WIDTH_SCREEN, CM1_COLOR_NO_TRANSPARENCY, 200, 25);
#endif
#ifdef MEDIA020_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB
        M526_WaitVerticalBlank();
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M771_BOX_BOTTOM(L1303_ai_BoxB) = M770_BOX_TOP(L1303_ai_BoxB);
        M524_FillScreenBox(L1303_ai_BoxB, C05_COLOR_LIGHT_BROWN);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M769_BOX_RIGHT(L1303_ai_BoxB) = M768_BOX_LEFT(L1303_ai_BoxB);
        --M771_BOX_BOTTOM(L1303_ai_BoxB);
        M524_FillScreenBox(L1303_ai_BoxB, C05_COLOR_LIGHT_BROWN);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M770_BOX_TOP(L1303_ai_BoxB) = --M771_BOX_BOTTOM(L1303_ai_BoxB);
        M768_BOX_LEFT(L1303_ai_BoxB) -= 2;
        M524_FillScreenBox(L1303_ai_BoxB, C00_COLOR_BLACK);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M768_BOX_LEFT(L1303_ai_BoxB) = M769_BOX_RIGHT(L1303_ai_BoxB);
        M524_FillScreenBox(L1303_ai_BoxB, C00_COLOR_BLACK);
#ifdef MEDIA579_X30J_P20JA_P20JB
        F0600_DIALOG_subroutine();
#endif
#ifdef MEDIA488_F20E_F20J
        F0600_DIALOG_subroutine(P0825_ui_DialogSetIndex);
#endif
        F0022_MAIN_Delay(5);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M771_BOX_BOTTOM(L1303_ai_BoxB) = ++M770_BOX_TOP(L1303_ai_BoxB);
        M769_BOX_RIGHT(L1303_ai_BoxB) -= 2;
        M524_FillScreenBox(L1303_ai_BoxB, C05_COLOR_LIGHT_BROWN);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M769_BOX_RIGHT(L1303_ai_BoxB) = ++M768_BOX_LEFT(L1303_ai_BoxB);
        M771_BOX_BOTTOM(L1303_ai_BoxB)--;
        M524_FillScreenBox(L1303_ai_BoxB, C05_COLOR_LIGHT_BROWN);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M768_BOX_LEFT(L1303_ai_BoxB) = --M769_BOX_RIGHT(L1303_ai_BoxB);
        M524_FillScreenBox(L1303_ai_BoxB, C00_COLOR_BLACK);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M770_BOX_TOP(L1303_ai_BoxB) = M771_BOX_BOTTOM(L1303_ai_BoxB) -= 2;
        M768_BOX_LEFT(L1303_ai_BoxB)++;
        M524_FillScreenBox(L1303_ai_BoxB, C00_COLOR_BLACK);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M770_BOX_TOP(L1303_ai_BoxB) = M771_BOX_BOTTOM(L1303_ai_BoxB) += 2;
        M768_BOX_LEFT(L1303_ai_BoxB)--;
        M769_BOX_RIGHT(L1303_ai_BoxB) += 2;
        M524_FillScreenBox(L1303_ai_BoxB, C13_COLOR_LIGHTEST_GRAY);
        F0007_MAIN_CopyBytes(M772_CAST_PC(L1304_ai_BoxA), M772_CAST_PC(L1303_ai_BoxB), M543_BYTE_COUNT_INT(sizeof(L1303_ai_BoxB)));
        M768_BOX_LEFT(L1303_ai_BoxB) = M769_BOX_RIGHT(L1303_ai_BoxB) += 3;
        M771_BOX_BOTTOM(L1303_ai_BoxB) += 2;
        M524_FillScreenBox(L1303_ai_BoxB, C13_COLOR_LIGHTEST_GRAY);
#ifdef MEDIA579_X30J_P20JA_P20JB
        F0600_DIALOG_subroutine();
#endif
#ifdef MEDIA488_F20E_F20J
        F0600_DIALOG_subroutine(P0825_ui_DialogSetIndex);
#endif
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + 1, M706_ZONE_TOP(L2341_ai_XYZ), M708_ZONE_WIDTH(L2341_ai_XYZ) - 1, 1), C05_COLOR_LIGHT_BROWN);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + M708_ZONE_WIDTH(L2341_ai_XYZ) - 1, M706_ZONE_TOP(L2341_ai_XYZ), 1, M709_ZONE_HEIGHT(L2341_ai_XYZ) - 1), C00_COLOR_BLACK);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) - 1, M706_ZONE_TOP(L2341_ai_XYZ) + M709_ZONE_HEIGHT(L2341_ai_XYZ) - 2, M708_ZONE_WIDTH(L2341_ai_XYZ) + 1, 2), C00_COLOR_BLACK);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ), M706_ZONE_TOP(L2341_ai_XYZ), 1, M709_ZONE_HEIGHT(L2341_ai_XYZ) - 2), C05_COLOR_LIGHT_BROWN);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) - 1, M706_ZONE_TOP(L2341_ai_XYZ) + M709_ZONE_HEIGHT(L2341_ai_XYZ) + 1, M708_ZONE_WIDTH(L2341_ai_XYZ) + 3, 1), C13_COLOR_LIGHTEST_GRAY);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + M708_ZONE_WIDTH(L2341_ai_XYZ) + 1 + 1, M706_ZONE_TOP(L2341_ai_XYZ) - 1, 1, M709_ZONE_HEIGHT(L2341_ai_XYZ) + 3), C13_COLOR_LIGHTEST_GRAY);
        F0600_DIALOG_subroutine();
#endif
        F0022_MAIN_Delay(5);
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        M769_BOX_RIGHT(L1304_ai_BoxA) += 3;
        M771_BOX_BOTTOM(L1304_ai_BoxA) += 3;
#endif
#ifdef MEDIA008_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E
        F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0348_Bitmap_Screen, L1304_ai_BoxA, 0, 0, C160_BYTE_WIDTH_SCREEN, C160_BYTE_WIDTH_SCREEN, CM1_COLOR_NO_TRANSPARENCY);
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0348_Bitmap_Screen, L1304_ai_BoxA, 0, 0, C160_BYTE_WIDTH_SCREEN, C160_BYTE_WIDTH_SCREEN, CM1_COLOR_NO_TRANSPARENCY, 25, C200_HEIGHT_SCREEN);
#endif
#ifdef MEDIA109_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        F0078_MOUSE_DisableScreenUpdate();
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + 1 + 1, M706_ZONE_TOP(L2341_ai_XYZ) + 1, M708_ZONE_WIDTH(L2341_ai_XYZ) - 3, 1), C05_COLOR_LIGHT_BROWN);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + 1, M706_ZONE_TOP(L2341_ai_XYZ), 1, M709_ZONE_HEIGHT(L2341_ai_XYZ) - 2), C05_COLOR_LIGHT_BROWN);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + M708_ZONE_WIDTH(L2341_ai_XYZ) - 2, M706_ZONE_TOP(L2341_ai_XYZ), 1, M709_ZONE_HEIGHT(L2341_ai_XYZ) - 2), C12_COLOR_DARKEST_GRAY);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ), M706_ZONE_TOP(L2341_ai_XYZ) + M709_ZONE_HEIGHT(L2341_ai_XYZ) - 3, M708_ZONE_WIDTH(L2341_ai_XYZ) - 1, 1), C12_COLOR_DARKEST_GRAY);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ), M706_ZONE_TOP(L2341_ai_XYZ) + M709_ZONE_HEIGHT(L2341_ai_XYZ), M708_ZONE_WIDTH(L2341_ai_XYZ) + 1, 1), C01_COLOR_DARK_GRAY);
        F0735_FillViewportBox(F0626_GetTemporaryZoneInitializedFromCoordinates(M704_ZONE_LEFT(L2341_ai_XYZ) + M708_ZONE_WIDTH(L2341_ai_XYZ) + 1, M706_ZONE_TOP(L2341_ai_XYZ), 1, M709_ZONE_HEIGHT(L2341_ai_XYZ) + 1), C01_COLOR_DARK_GRAY);
        F0600_DIALOG_subroutine();
#endif
#ifdef MEDIA744_A36M
        T0424001: /* Unreferenced label but required for D36M */
#endif
#ifdef MEDIA551_F20E_F20J_F31E_F31J
        T0424001: /* Unreferenced label but required */
#endif
        G0441_ps_PrimaryMouseInput = L1298_ps_PrimaryMouseInputBackup;
        G0442_ps_SecondaryMouseInput = L1299_ps_SecondaryMouseInputBackup;
        G0443_ps_PrimaryKeyboardInput = L1300_ps_PrimaryKeyboardInputBackup;
        G0444_ps_SecondaryKeyboardInput = L1301_ps_SecondaryKeyboardInputBackup;
        F0357_COMMAND_DiscardAllInput();
#ifdef MEDIA318_S20E_S21E_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_34_OPTIMIZATION In previous versions, this function was always called prior to this function */
        M522_MOUSE_HidePointer();
#endif
        return G0335_ui_SelectedDialogChoice;
}

#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
void F0425_DIALOG_PrintCenteredChoice(
P0828_puc_Bitmap, P0829_pc_String, P0830_i_X, P0831_i_Y)
unsigned char* P0828_puc_Bitmap SEPARATOR
char*          P0829_pc_String  SEPARATOR
int16_t        P0830_i_X        SEPARATOR
int16_t        P0831_i_Y        FINAL_SEPARATOR
{
        if (P0829_pc_String != NULL) {
                P0830_i_X -= (strlen(P0829_pc_String) * 6) >> 1;
                M521_F0040_TEXT_Print(P0828_puc_Bitmap, C112_BYTE_WIDTH_VIEWPORT, P0830_i_X, P0831_i_Y, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0829_pc_String, C136_HEIGHT_VIEWPORT);
        }
}
#endif

#ifdef MEDIA267_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_35_IMPROVEMENT If a text message in a dialog is too long then it is split and printed on two lines */
BOOLEAN F0426_DIALOG_IsMessageOnTwoLines(
P0832_pc_String, P0833_pc_Part1, P0834_pc_Part2)
char* P0832_pc_String SEPARATOR
char* P0833_pc_Part1  SEPARATOR
char* P0834_pc_Part2  FINAL_SEPARATOR
{
        unsigned int16_t L1305_ui_StringLength;
        unsigned int16_t L1306_ui_SplitPosition;


        L1305_ui_StringLength = strlen(P0832_pc_String);
        if (L1305_ui_StringLength <= 30) {
                return C0_FALSE;
        }
#ifdef MEDIA353_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* ANOMALY_ST_BRANCH */
        else {
#endif
                strcpy(P0833_pc_Part1, P0832_pc_String);
                L1306_ui_SplitPosition = L1305_ui_StringLength >> 1;
                while ((P0833_pc_Part1[L1306_ui_SplitPosition] != ' ') && L1306_ui_SplitPosition < L1305_ui_StringLength) {
                        L1306_ui_SplitPosition++;
                }
                P0833_pc_Part1[L1306_ui_SplitPosition] = '\0';
                strcpy(P0834_pc_Part2, &P0833_pc_Part1[L1306_ui_SplitPosition + 1]);
#ifdef MEDIA353_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        }
#endif
        return C1_TRUE;
}
#endif

void F0427_DIALOG_Draw(
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0835_pc_Message1, P0836_pc_Message2, P0837_pc_Choice1, P0838_pc_Choice2, P0839_pc_Choice3, P0840_pc_Choice4, P0841_B_ScreenDialog, P0842_B_ClearScreen, P0843_B_Fading)
#endif
char*   P0835_pc_Message1                      SEPARATOR
char*   P0836_pc_Message2                      SEPARATOR
char*   P0837_pc_Choice1                       SEPARATOR
char*   P0838_pc_Choice2                       SEPARATOR
char*   P0839_pc_Choice3                       SEPARATOR
#ifdef MEDIA031_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_F31J_X31J_P31J
char*   P0840_pc_Choice4                       SEPARATOR
#endif
#ifdef MEDIA718_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E
char*   P0840_pc_Choice4                       FINAL_SEPARATOR
#endif
#ifdef MEDIA014_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J
BOOLEAN P0841_B_ScreenDialog                   SEPARATOR
BOOLEAN P0842_B_ClearScreen                    SEPARATOR
BOOLEAN P0843_B_Fading                         FINAL_SEPARATOR
#endif
#ifdef MEDIA585_X30J_P20JA_P20JB_F31J_X31J_P31J
int16_t P2000_i_DriveType                      SEPARATOR
int16_t P2001_i_AutomaticChoiceIfFloppyInDrive FINAL_SEPARATOR
#endif
{
#ifdef MEDIA352_G14ED_G20E_G21E_A20ED_A20E
        char L1312_ac_StringPart1[40];
        char L1313_ac_StringPart2[40];
#endif
#ifdef MEDIA325_S20E_S21E_A21E_A22E /* CHANGE7_35_IMPROVEMENT */
        char L1312_ac_StringPart1[50];
        char L1313_ac_StringPart2[50];
#endif
#ifdef MEDIA446_A20G_A22G
        char L1312_ac_StringPart1[66];
        char L1313_ac_StringPart2[66];
#endif
#ifdef MEDIA443_A20F
        char L1312_ac_StringPart1[70];
        char L1313_ac_StringPart2[70];
#endif
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        REGISTER int16_t L1307_i_Unreferenced; /* BUG0_00 Useless code */
        REGISTER int16_t L1308_i_X;
        REGISTER int16_t L1309_i_Y;
        REGISTER unsigned int16_t L1310_ui_ChoiceCount;
#endif
#ifdef MEDIA000_S10EA /* CHANGE1_00_OPTIMIZATION */
        unsigned int16_t L1311_aui_Palette_Blank[16];
#endif
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        int16_t L1314_ai_Box[4];
        unsigned char* L1315_puc_Bitmap_DialogPatch;
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        REGISTER unsigned char* L1315_puc_Bitmap_DialogPatch;
        REGISTER unsigned int16_t L2343_ui_;
        REGISTER unsigned int16_t L2344_ui_Y;
        REGISTER unsigned int16_t L1310_ui_ChoiceCount;
        int16_t L2345_i_Multiple;
#define ZoneIndex      L2345_i_Multiple
#define CharacterIndex L2345_i_Multiple
        int16_t L2346_i_ZoneWidth;
        int16_t L2347_i_ZoneHeight;
        int16_t L2348_i_MessageIndex;
        char L2349_ac_Unreferenced[12];
        int16_t L2350_ai_XYZ[4];
        char L2351_ac_String[60];
        STRUCT4 L2352_s_Struct4[2];
#endif


#ifdef MEDIA571_F20J_X30J_P20JA_P20JB_F31J_X31J_P31J
        if (P0835_pc_Message1 && P0836_pc_Message2) {
#ifdef MEDIA585_X30J_P20JA_P20JB_F31J_X31J_P31J
                F0427_DIALOG_Draw(P0835_pc_Message1, NULL, G0560_pc_OK, NULL, NULL, NULL, P2000_i_DriveType, P2001_i_AutomaticChoiceIfFloppyInDrive);
                F0424_DIALOG_GetChoice(C1_ONE_CHOICE, P2000_i_DriveType, P2001_i_AutomaticChoiceIfFloppyInDrive);
                P0835_pc_Message1 = NULL;
#endif
#ifdef MEDIA564_F20J
                F0427_DIALOG_Draw(P0835_pc_Message1, NULL, G0560_pc_OK, NULL, NULL, NULL, P0841_B_ScreenDialog, P0842_B_ClearScreen, P0843_B_Fading);
                F0424_DIALOG_GetChoice(C1_ONE_CHOICE, P0841_B_ScreenDialog, 0, 0);
                P0842_B_ClearScreen = C0_FALSE;
                P0843_B_Fading = C0_FALSE;
                P0835_pc_Message1 = NULL;
#endif
        }
#endif
#ifdef MEDIA020_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB
        F0466_EXPAND_GraphicToBitmap(G0343_puc_Graphic_DialogBox, G0296_puc_Bitmap_Viewport, 0, 0);
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        F0466_EXPAND_GraphicToBitmap(G0343_puc_Graphic_DialogBox, G0296_puc_Bitmap_Viewport);
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        M100_PIXEL_WIDTH(G0296_puc_Bitmap_Viewport) = *((int16_t*)G0343_puc_Graphic_DialogBox);
        M101_PIXEL_HEIGHT(G0296_puc_Bitmap_Viewport) = *((int16_t*)G0343_puc_Graphic_DialogBox + 1);
#endif
#ifdef MEDIA217_S10EB /* CHANGE1_01_IMPROVEMENT Engine version 1.0 printed in top right corner of dialog boxes */
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V1.0");
#endif
#ifdef MEDIA222_S11E /* CHANGE2_18_IMPROVEMENT Engine version 1.1 printed in top right corner of dialog boxes */
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V1.1");
#endif
#ifdef MEDIA235_S12E_S12G /* CHANGE3_18_IMPROVEMENT Engine version 1.2 printed in top right corner of dialog boxes */
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V1.2");
#endif
#ifdef MEDIA256_S13FA_S13FB /* CHANGE5_04_IMPROVEMENT Engine version 1.3 printed in top right corner of dialog boxes */
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V1.3");
#endif
#ifdef MEDIA349_G14ED
        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V1.4", C136_HEIGHT_VIEWPORT);
#endif
#ifdef MEDIA336_S20E_G20E_A20ED_A20E_A20F_A20G /* CHANGE7_36_IMPROVEMENT Engine version 2.0 printed in top right corner of dialog boxes */
        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V2.0", C136_HEIGHT_VIEWPORT);
#endif
#ifdef MEDIA341_S21E_G21E_A21E /* CHANGE8_13_IMPROVEMENT Engine version 2.1 printed in top right corner of dialog boxes */
        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V2.1", C136_HEIGHT_VIEWPORT);
#endif
#ifdef MEDIA455_A22E_A22G
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, 192, 7, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V2.2", C136_HEIGHT_VIEWPORT);
#endif
#ifdef MEDIA489_F20E_F20J_P20JA_P20JB
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V2.0");
#endif
#ifdef MEDIA577_X30J
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.0");
#endif
#ifdef MEDIA619_A31E_A31M
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.1", G2074_C136_ViewportHeight);
#endif
#ifdef MEDIA674_F31E_F31J_X31J_P31J
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.1");
#endif
#ifdef MEDIA665_A33M
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.3", G2074_C136_ViewportHeight);
#endif
#ifdef MEDIA707_I34E_I34M
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.4");
#endif
#ifdef MEDIA741_A35E_A35M
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.5", G2074_C136_ViewportHeight);
#endif
#ifdef MEDIA744_A36M
        F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, C450_ZONE_DIALOG_VERSION, C02_COLOR_LIGHT_GRAY, C01_COLOR_DARK_GRAY, "V3.6", G2074_C136_ViewportHeight);
#endif
        L1310_ui_ChoiceCount = 1;
        if (P0838_pc_Choice2 != NULL) {
                L1310_ui_ChoiceCount++;
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        }
        if (P0839_pc_Choice3 != NULL) {
                L1310_ui_ChoiceCount++;
        }
        if (P0840_pc_Choice4 != NULL) {
                L1310_ui_ChoiceCount++;
        }
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                if (P0839_pc_Choice3 != NULL) {
                        L1310_ui_ChoiceCount++;
                        if (P0840_pc_Choice4 != NULL) {
                                L1310_ui_ChoiceCount++;
                        }
                }
        }
#endif
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        if (P0843_B_Fading) {
#ifdef MEDIA000_S10EA /* CHANGE1_00_OPTIMIZATION */
                F0008_MAIN_ClearBytes(L1311_aui_Palette_Blank, sizeof(L1311_aui_Palette_Blank));
                F0436_STARTEND_FadeToPalette(L1311_aui_Palette_Blank);
#endif
#ifdef MEDIA218_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE1_00_OPTIMIZATION Use an existing blank global variable as a blank color palette instead of a dedicated local variable */
                F0436_STARTEND_FadeToPalette(G0345_aui_BlankBuffer);
#endif
        }
        if (P0842_B_ClearScreen) {
                F0008_MAIN_ClearBytes(G0348_Bitmap_Screen, M075_BITMAP_BYTE_COUNT(320, 200));
        }
        G0578_B_UseByteBoxCoordinates = C0_FALSE;
        if (L1310_ui_ChoiceCount == 1) {
#ifdef MEDIA008_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E
                L1315_puc_Bitmap_DialogPatch = F0468_MEMORY_Allocate((long)M075_BITMAP_BYTE_COUNT(224, 75), C0_ALLOCATION_TEMPORARY_ON_TOP_OF_HEAP);
                F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, L1315_puc_Bitmap_DialogPatch, G0467_ai_Graphic561_Box_Dialog1ChoicePatchA, 0, 14, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY);
                F0020_MAIN_BlitToViewport(L1315_puc_Bitmap_DialogPatch, G0468_ai_Graphic561_Box_Dialog1ChoicePatchB, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY);
                F0469_MEMORY_FreeAtHeapTop((long)M075_BITMAP_BYTE_COUNT(224, 75));
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
                F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G1065_ai_Box1, 0, 64, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY, C136_HEIGHT_VIEWPORT, C136_HEIGHT_VIEWPORT);
                F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G1066_ai_Box2, 0, 39, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY, C136_HEIGHT_VIEWPORT, C136_HEIGHT_VIEWPORT);
                F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G1067_ai_Box3, 0, 14, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY, C136_HEIGHT_VIEWPORT, C136_HEIGHT_VIEWPORT);
#endif
                F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0837_pc_Choice1, 112, 114);
        } else {
                if (L1310_ui_ChoiceCount == 2) {
#ifdef MEDIA008_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E
                        F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G0469_ai_Graphic561_Box_Dialog2ChoicesPatch, 102, 52, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY);
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
                        F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G0469_ai_Graphic561_Box_Dialog2ChoicesPatch, 102, 52, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY, C136_HEIGHT_VIEWPORT, C136_HEIGHT_VIEWPORT);
#endif
                        F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0837_pc_Choice1, 112, 77);
                        F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0838_pc_Choice2, 112, 114);
                } else {
                        if (L1310_ui_ChoiceCount == 3) {
                                F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0837_pc_Choice1, 112, 77);
                                F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0838_pc_Choice2, 59, 114);
                                F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0839_pc_Choice3, 166, 114);
                        } else {
                                if (L1310_ui_ChoiceCount == 4) {
#ifdef MEDIA008_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E
                                        F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G0470_ai_Graphic561_Box_Dialog4ChoicesPatch, 102, 99, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY);
#endif
#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
                                        F0132_VIDEO_Blit(G0296_puc_Bitmap_Viewport, G0296_puc_Bitmap_Viewport, G0470_ai_Graphic561_Box_Dialog4ChoicesPatch, 102, 99, C112_BYTE_WIDTH_VIEWPORT, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY, C136_HEIGHT_VIEWPORT, C136_HEIGHT_VIEWPORT);
#endif
                                        F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0837_pc_Choice1, 59, 77);
                                        F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0838_pc_Choice2, 166, 77);
                                        F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0839_pc_Choice3, 59, 114);
                                        F0425_DIALOG_PrintCenteredChoice(G0296_puc_Bitmap_Viewport, P0840_pc_Choice4, 166, 114);
                                }
                        }
                }
        }
        L1309_i_Y = 29;
        if (P0835_pc_Message1 != NULL) {
#ifdef MEDIA267_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_35_IMPROVEMENT */
                if (F0426_DIALOG_IsMessageOnTwoLines(P0835_pc_Message1, L1312_ac_StringPart1, L1313_ac_StringPart2)) {
                        L1309_i_Y = 21;
                        L1308_i_X = 113 - ((strlen(L1312_ac_StringPart1) * 6) >> 1);
                        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, L1308_i_X, L1309_i_Y, C11_COLOR_YELLOW, C05_COLOR_LIGHT_BROWN, L1312_ac_StringPart1, C136_HEIGHT_VIEWPORT);
                        L1309_i_Y += 8;
                        L1308_i_X = 113 - ((strlen(L1313_ac_StringPart2) * 6) >> 1);
                        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, L1308_i_X, L1309_i_Y, C11_COLOR_YELLOW, C05_COLOR_LIGHT_BROWN, L1313_ac_StringPart2, C136_HEIGHT_VIEWPORT);
                        L1309_i_Y += 8;
                } else {
#endif
                        L1308_i_X = 113 - ((strlen(P0835_pc_Message1) * 6) >> 1);
                        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, L1308_i_X, L1309_i_Y, C11_COLOR_YELLOW, C05_COLOR_LIGHT_BROWN, P0835_pc_Message1, C136_HEIGHT_VIEWPORT);
                        L1309_i_Y += 8;
#ifdef MEDIA267_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_35_IMPROVEMENT */
                }
#endif
        }
        if (P0836_pc_Message2 != NULL) {
#ifdef MEDIA267_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_35_IMPROVEMENT */
                if (F0426_DIALOG_IsMessageOnTwoLines(P0836_pc_Message2, L1312_ac_StringPart1, L1313_ac_StringPart2)) {
                        L1308_i_X = 113 - ((strlen(L1312_ac_StringPart1) * 6) >> 1);
                        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, L1308_i_X, L1309_i_Y, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, L1312_ac_StringPart1, C136_HEIGHT_VIEWPORT);
                        L1309_i_Y += 8;
                        L1308_i_X = 113 - ((strlen(L1313_ac_StringPart2) * 6) >> 1);
                        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, L1308_i_X, L1309_i_Y, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, L1313_ac_StringPart2, C136_HEIGHT_VIEWPORT);
                } else {
#endif
                        L1308_i_X = 113 - ((strlen(P0836_pc_Message2) * 6) >> 1);
                        M521_F0040_TEXT_Print(G0296_puc_Bitmap_Viewport, C112_BYTE_WIDTH_VIEWPORT, L1308_i_X, L1309_i_Y, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0836_pc_Message2, C136_HEIGHT_VIEWPORT);
#ifdef MEDIA267_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G /* CHANGE7_35_IMPROVEMENT */
                }
#endif
        }
        if (P0841_B_ScreenDialog) {
                M706_ZONE_TOP(L1314_ai_Box) = 33;
                M707_ZONE_BOTTOM(L1314_ai_Box) = 168;
                M704_ZONE_LEFT(L1314_ai_Box) = 47;
                M705_ZONE_RIGHT(L1314_ai_Box) = 270;
                F0077_MOUSE_EnableScreenUpdate_CPSE();
                M520_F0021_MAIN_BlitToScreen(G0296_puc_Bitmap_Viewport, L1314_ai_Box, C112_BYTE_WIDTH_VIEWPORT, CM1_COLOR_NO_TRANSPARENCY, C136_HEIGHT_VIEWPORT);
                F0078_MOUSE_DisableScreenUpdate();
        } else {
                F0097_DUNGEONVIEW_DrawViewport(C0_VIEWPORT_NOT_DUNGEON_VIEW);
                M526_WaitVerticalBlank();
        }
        if (P0843_B_Fading) {
                F0436_STARTEND_FadeToPalette(G0347_aui_Palette_TopAndBottomScreen);
        }
#endif
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        if (G2062_DialogSetIndex) {
#endif
#ifdef MEDIA488_F20E_F20J
        if (P0843_B_Fading) {
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
                F1012_PALETTE_SetCurtain(C0_BLACK_PALETTE);
                F0694_SetMultipleColorsInPalette(C09_ICON);
#endif
#ifdef MEDIA607_X30J_X31J
                F0436_STARTEND_FadeToPalette(G3087_aui_Palette_Blank);
#endif
#ifdef MEDIA746_A36M_A31E_A31M_A33M_A35E_A35M
                F0436_STARTEND_FadeToPalette(G3161_ac_Buffer724Bytes->_aui_Palette_0x188);
#endif
#ifdef MEDIA488_F20E_F20J
        }
        if (P0842_B_ClearScreen) {
#endif
                M518_FillScreenBlack();
        }
        if (L1310_ui_ChoiceCount != 3) { /* If the dialog graphic must be patched for another number of choices */
                if (!G2232_B_GraphicMemoryInitialized) {
#ifdef MEDIA508_F20E_F20J_X30J_P20JA_P20JB
                        L1315_puc_Bitmap_DialogPatch = F0468_MEMORY_Allocate((long)G2070_ViewportBitmapByteCount, MASK0x8000_ALLOCATE_BITMAP | C0_ALLOCATION_TEMPORARY_ON_TOP_OF_HEAP);
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        L1315_puc_Bitmap_DialogPatch = F0606_AllocateMemForGraphic(G2073_C224_ViewportPixelWidth, G2074_C136_ViewportHeight, C0_ALLOCATION_TEMPORARY_ON_TOP_OF_HEAP);
#endif
                } else {
                        F0491_CACHE_IsDerivedBitmapInCache(C000_DERIVED_BITMAP_VIEWPORT);
                        L1315_puc_Bitmap_DialogPatch = F0492_CACHE_GetDerivedBitmap(C000_DERIVED_BITMAP_VIEWPORT);
                }
                F0616_CopyBitmap(G0296_puc_Bitmap_Viewport, L1315_puc_Bitmap_DialogPatch);
        }
        switch (L1310_ui_ChoiceCount) {
                case 1:
                        ZoneIndex = C469_ZONE_DIALOG;
                        F0632_COORD_SetNegativeBitmapPointer(M621_NEGGRAPHIC_DIALOG_PATCH_1_CHOICE, L1315_puc_Bitmap_DialogPatch);
                        F0658_BlitBitmapIndexToZoneIndexWithTransparency(M621_NEGGRAPHIC_DIALOG_PATCH_1_CHOICE, C451_ZONE_DIALOG_PATCH_1_CHOICE, CM1_COLOR_NO_TRANSPARENCY);
#ifdef MEDIA540_F20E_F20J_X30J_P20JA_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        F0649_PrintCenteredTextToViewportZone(C462_ZONE_DIALOG_BOTTOM_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
#endif
#ifdef MEDIA478_P20JB_I34E_I34M
                        F0649_PrintCenteredTextToViewportZone(C462_ZONE_DIALOG_BOTTOM_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
#endif
                        break;
                case 2:
                        ZoneIndex = C471_ZONE_DIALOG;
                        F0632_COORD_SetNegativeBitmapPointer(M622_NEGGRAPHIC_DIALOG_PATCH_2_CHOICES, L1315_puc_Bitmap_DialogPatch);
                        F0658_BlitBitmapIndexToZoneIndexWithTransparency(M622_NEGGRAPHIC_DIALOG_PATCH_2_CHOICES, C452_ZONE_DIALOG_PATCH_2_CHOICES, CM1_COLOR_NO_TRANSPARENCY);
#ifdef MEDIA540_F20E_F20J_X30J_P20JA_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        F0649_PrintCenteredTextToViewportZone(C463_ZONE_DIALOG_TOP_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
                        F0649_PrintCenteredTextToViewportZone(C462_ZONE_DIALOG_BOTTOM_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0838_pc_Choice2);
#endif
#ifdef MEDIA478_P20JB_I34E_I34M
                        F0649_PrintCenteredTextToViewportZone(C463_ZONE_DIALOG_TOP_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
                        F0649_PrintCenteredTextToViewportZone(C462_ZONE_DIALOG_BOTTOM_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0838_pc_Choice2);
#endif
                        break;
                case 3:
                        ZoneIndex = C471_ZONE_DIALOG;
#ifdef MEDIA540_F20E_F20J_X30J_P20JA_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        F0649_PrintCenteredTextToViewportZone(C463_ZONE_DIALOG_TOP_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
                        F0649_PrintCenteredTextToViewportZone(C466_ZONE_DIALOG_BOTTOM_LEFT_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0838_pc_Choice2);
                        F0649_PrintCenteredTextToViewportZone(C467_ZONE_DIALOG_BOTTOM_RIGHT_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0839_pc_Choice3);
#endif
#ifdef MEDIA478_P20JB_I34E_I34M
                        F0649_PrintCenteredTextToViewportZone(C463_ZONE_DIALOG_TOP_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
                        F0649_PrintCenteredTextToViewportZone(C466_ZONE_DIALOG_BOTTOM_LEFT_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0838_pc_Choice2);
                        F0649_PrintCenteredTextToViewportZone(C467_ZONE_DIALOG_BOTTOM_RIGHT_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0839_pc_Choice3);
#endif
                        break;
                case 4:
                        ZoneIndex = C471_ZONE_DIALOG;
                        F0632_COORD_SetNegativeBitmapPointer(M623_NEGGRAPHIC_DIALOG_PATCH_4_CHOICES, L1315_puc_Bitmap_DialogPatch);
                        F0658_BlitBitmapIndexToZoneIndexWithTransparency(M623_NEGGRAPHIC_DIALOG_PATCH_4_CHOICES, C453_ZONE_DIALOG_PATCH_4_CHOICES, CM1_COLOR_NO_TRANSPARENCY);
#ifdef MEDIA540_F20E_F20J_X30J_P20JA_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        F0649_PrintCenteredTextToViewportZone(C464_ZONE_DIALOG_TOP_LEFT_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
                        F0649_PrintCenteredTextToViewportZone(C465_ZONE_DIALOG_TOP_RIGHT_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0838_pc_Choice2);
                        F0649_PrintCenteredTextToViewportZone(C466_ZONE_DIALOG_BOTTOM_LEFT_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0839_pc_Choice3);
                        F0649_PrintCenteredTextToViewportZone(C467_ZONE_DIALOG_BOTTOM_RIGHT_CHOICE, C09_COLOR_GOLD, C05_COLOR_LIGHT_BROWN, P0840_pc_Choice4);
#endif
#ifdef MEDIA478_P20JB_I34E_I34M
                        F0649_PrintCenteredTextToViewportZone(C464_ZONE_DIALOG_TOP_LEFT_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0837_pc_Choice1);
                        F0649_PrintCenteredTextToViewportZone(C465_ZONE_DIALOG_TOP_RIGHT_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0838_pc_Choice2);
                        F0649_PrintCenteredTextToViewportZone(C466_ZONE_DIALOG_BOTTOM_LEFT_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0839_pc_Choice3);
                        F0649_PrintCenteredTextToViewportZone(C467_ZONE_DIALOG_BOTTOM_RIGHT_CHOICE, C15_COLOR_WHITE, C05_COLOR_LIGHT_BROWN, P0840_pc_Choice4);
#endif
        }
        if (L1310_ui_ChoiceCount != 3) {
                if (!G2232_B_GraphicMemoryInitialized) {
#ifdef MEDIA508_F20E_F20J_X30J_P20JA_P20JB
                        F0469_MEMORY_FreeAtHeapTop((long)G2070_ViewportBitmapByteCount + 4);
#endif
#ifdef MEDIA720_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        F0607_FreeMemForGraphic(L1315_puc_Bitmap_DialogPatch);
#endif
                } else {
                        F0493_CACHE_AddDerivedBitmap(C000_DERIVED_BITMAP_VIEWPORT);
                        F0480_CACHE_ReleaseBlock(C000_DERIVED_BITMAP_VIEWPORT | MASK0x8000_DERIVED_BITMAP);
                }
        }
        F0638_GetZone(ZoneIndex, L2350_ai_XYZ);
        L2346_i_ZoneWidth = M708_ZONE_WIDTH(L2350_ai_XYZ);
        L2347_i_ZoneHeight = M709_ZONE_HEIGHT(L2350_ai_XYZ);
        L2352_s_Struct4[0].s4m1_String = P0835_pc_Message1;
        L2352_s_Struct4[1].s4m1_String = P0836_pc_Message2;
        L2344_ui_Y = 0;
        for (L2348_i_MessageIndex = 0; L2348_i_MessageIndex < 2; L2348_i_MessageIndex++) {
                if (L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String) {
                        F0645_GetStringPixelDimensions(L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String, &L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width, &L2352_s_Struct4[L2348_i_MessageIndex].s4m4_Height);
#ifdef MEDIA488_F20E_F20J
                        L2352_s_Struct4[L2348_i_MessageIndex].s4m2 = (L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width <= (L2346_i_ZoneWidth - (L2346_i_ZoneWidth >> 2))) ? 1 : 2;
#endif
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                        L2352_s_Struct4[L2348_i_MessageIndex].s4m2 = (L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width <= (L2346_i_ZoneWidth - (L2346_i_ZoneWidth >> 3))) ? 1 : 2;
#endif
#ifdef MEDIA579_X30J_P20JA_P20JB
                        L2344_ui_Y += L2352_s_Struct4[L2348_i_MessageIndex].s4m2 * (L2352_s_Struct4[L2348_i_MessageIndex].s4m4_Height + (G2340_ << 1) + G2341_);
#endif
#ifdef MEDIA689_F31J_X31J_P31J
                        L2344_ui_Y += L2352_s_Struct4[L2348_i_MessageIndex].s4m2 * (L2352_s_Struct4[L2348_i_MessageIndex].s4m4_Height + (G2340_ << 1) - G2341_ + 1);
#endif
#ifdef MEDIA718_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E
                        L2344_ui_Y += L2352_s_Struct4[L2348_i_MessageIndex].s4m2 * (L2352_s_Struct4[L2348_i_MessageIndex].s4m4_Height + (G2085_ * 2) - G2086_C1_ + 1);
#endif
#ifdef MEDIA487_F20E
                        L2344_ui_Y += L2352_s_Struct4[L2348_i_MessageIndex].s4m2 * (L2352_s_Struct4[L2348_i_MessageIndex].s4m4_Height + (G2085_ * 2));
#endif
#ifdef MEDIA564_F20J
                        L2344_ui_Y += L2352_s_Struct4[L2348_i_MessageIndex].s4m2 * (L2352_s_Struct4[L2348_i_MessageIndex].s4m4_Height + (G2340_ * 2));
#endif
                }
        }
        if (L2344_ui_Y) {
#ifdef MEDIA585_X30J_P20JA_P20JB_F31J_X31J_P31J
                L2344_ui_Y = M706_ZONE_TOP(L2350_ai_XYZ) + ((L2347_i_ZoneHeight - (L2344_ui_Y - (G2340_ << 1))) >> 1) + G2338_i_JapaneseCharacterMaximumHeight - 1;
#endif
#ifdef MEDIA564_F20J
                L2344_ui_Y = M706_ZONE_TOP(L2350_ai_XYZ) + ((L2347_i_ZoneHeight - (L2344_ui_Y - (G2340_ << 1))) >> 1) + G2338_i_JapaneseCharacterMaximumHeight;
#endif
#ifdef MEDIA718_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E
                L2344_ui_Y = M706_ZONE_TOP(L2350_ai_XYZ) + ((L2347_i_ZoneHeight - (L2344_ui_Y - (G2085_ * 2))) >> 1) + G2083_C6_ - 1;
#endif
#ifdef MEDIA487_F20E
                L2344_ui_Y = M706_ZONE_TOP(L2350_ai_XYZ) + ((L2347_i_ZoneHeight - (L2344_ui_Y - (G2085_ * 2))) >> 1) + G2083_C6_;
#endif
                for (L2348_i_MessageIndex = 0; L2348_i_MessageIndex < 2; L2348_i_MessageIndex++) {
                        if (!L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String)
                                continue;
                        CharacterIndex = 0;
                        if (L2352_s_Struct4[L2348_i_MessageIndex].s4m2 == C2_UNKNOWN) {
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
                                L2343_ui_ = F0646_GetLargestPrintableSubString(L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String, L2351_ac_String, &CharacterIndex, F0024_MAIN_GetMinimumValue(L2346_i_ZoneWidth, L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width - (L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width >> 3)));
#endif
#ifdef MEDIA488_F20E_F20J
                                L2343_ui_ = F0646_GetLargestPrintableSubString(L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String, L2351_ac_String, &CharacterIndex, F0024_MAIN_GetMinimumValue(L2346_i_ZoneWidth, L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width - (L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width >> 2)));
#endif
#ifdef MEDIA469_P20JB
                                if (L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String[CharacterIndex] == '\n') {
                                        CharacterIndex++;
                                }
#endif
                                M720_F0644_PrintTextAlt(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, (G2073_C224_ViewportPixelWidth - L2343_ui_) >> 1, L2344_ui_Y, G2064_[L2348_i_MessageIndex], C05_COLOR_LIGHT_BROWN, L2351_ac_String, G2074_C136_ViewportHeight);
#ifdef MEDIA571_F20J_X30J_P20JA_P20JB_F31J_X31J_P31J
                                L2344_ui_Y += G2342_C17_JapaneseTextLineHeight + G2340_;
                                L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width -= (L2343_ui_ + G2339_);
#endif
#ifdef MEDIA562_F20E_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E
                                L2344_ui_Y += G2088_C7_TextLineHeight + G2085_;
#endif
#ifdef MEDIA746_A36M_A31E_A31M_A33M_A35E_A35M
                                L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width -= (L2343_ui_ + G2084_C1_);
#endif
#ifdef MEDIA559_F20E_F31E
                                L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width -= (L2343_ui_ + G2084_C1_);
#endif
#ifdef MEDIA707_I34E_I34M
                                L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width = L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width - (L2343_ui_ + G2084_C1_);
#endif
                        }
                        M720_F0644_PrintTextAlt(G0296_puc_Bitmap_Viewport, G2073_C224_ViewportPixelWidth, (G2073_C224_ViewportPixelWidth - L2352_s_Struct4[L2348_i_MessageIndex].s4m3_Width) >> 1, L2344_ui_Y, G2064_[L2348_i_MessageIndex], C05_COLOR_LIGHT_BROWN, L2352_s_Struct4[L2348_i_MessageIndex].s4m1_String + CharacterIndex, G2074_C136_ViewportHeight);
#ifdef MEDIA571_F20J_X30J_P20JA_P20JB_F31J_X31J_P31J
                        L2344_ui_Y += G2342_C17_JapaneseTextLineHeight + G2340_;
#endif
#ifdef MEDIA562_F20E_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E
                        L2344_ui_Y += G2088_C7_TextLineHeight + G2085_;
#endif
                }
        }
#ifdef MEDIA593_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        F0600_DIALOG_subroutine();
        if (G2062_DialogSetIndex) {
#endif
#ifdef MEDIA488_F20E_F20J
        F0600_DIALOG_subroutine(P0841_B_ScreenDialog);
        if (P0843_B_Fading) {
#endif
#ifdef MEDIA496_F20E_F20J_P20JA_P20JB_I34E_I34M_F31E_F31J_P31J
                F1012_PALETTE_SetCurtain(C1_NORMAL_PALETTE);
#endif
#ifdef MEDIA613_X30J_A36M_A31E_A31M_A33M_A35E_A35M_X31J
                F0436_STARTEND_FadeToPalette(G3088_aui_Palette_TopAndBottomScreen);
#endif
        }
#endif
        G0297_B_DrawFloorAndCeilingRequested = C1_TRUE;
}

#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
#include "REQDISK.C"
#endif

#ifdef MEDIA413_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
void F0513_DIALOG_DrawGameReadyToPlay_Unreferenced(
)
{
        F0427_DIALOG_Draw(NULL, G0536_pc_GAMELOADEDREADYTOPLAY, G0560_pc_OK, NULL, NULL, NULL, C1_TRUE, C1_TRUE, C1_TRUE);
}
#endif
#endif
