#ifndef GRAFX_H #define GRAFX_H #include "ttrdef.h" #define RAM_WAG_LOCO_60 0x0000 #define RAM_WAG_BACK_60 0x0009 #define RAM_MIS_FOND_60 0x000A #define RAM_MIS_01_60 0x000B #define RAM_PTS_60_4 0x0029 #define RAM_VILLE_OK_60 0x0038 #define RAM_VILLE_KO_60 0x0039 #define RAM_MIS_BA_60 0x003A #define RAM_CARD_SHADOW60 0x003B #define RAM_TICKET_DONE_60 0x003C #define RAM_TICKET_DONE_SHADOW_60 0x003D #define RAM_MASK_TICKET_DONE_60 0x003E #define RAM_WAGON_60 0x003F #define RAM_WAG_LOCO_80 0x0044 #define RAM_WAG_BACK_80 0x004D #define RAM_MIS_FOND_80 0x004E #define RAM_MIS_01_80 0x004F #define RAM_PTS_80_4 0x006D #define RAM_VILLE_OK_80 0x007C #define RAM_VILLE_KO_80 0x007D #define RAM_MIS_BA_80 0x007E #define RAM_CARD_SHADOW80 0x007F #define RAM_TICKET_DONE_80 0x0080 #define RAM_TICKET_DONE_SHADOW_80 0x0081 #define RAM_MASK_TICKET_DONE_80 0x0082 #define RAM_WAGON_80 0x0083 #define RAM_MINI_WAG_LOCO 0x0088 #define RAM_MINI_WAG_BACK 0x0091 #define RAM_MINI_MIS_BACK 0x0092 #define RAM_MINI_MISSION_OK 0x0093 #define RAM_MINI_MISSION_KO 0x0094 #define RAM_MINI_CARD_SHADOW 0x0095 #define RAM_MIS_FOND_NO 0x0096 #define RAM_MIS_01_NO 0x0097 #define RAM_PTS_NO_4 0x00B5 #define RAM_VILLE_OK_NO 0x00C4 #define RAM_VILLE_KO_NO 0x00C5 #define RAM_UI_BOT 0x00C6 #define RAM_UI_HUMAN 0x00CB #define RAM_LAST_TURN 0x00D0 #define RAM_CURSOR 0x00D1 #define RAM_ICO_OK 0x00D2 #define RAM_ICO_CANCEL 0x00D3 #define RAM_CARTE_VILLE_KO 0x00D4 #define RAM_CARTE_VILLE_OK 0x00D5 #define RAM_CARTE_VILLE_SELECT 0x00D6 #define RAM_CARD_SHADOW 0x00D7 #define RAM_TICKET_DONE_NO 0x00D8 #define RAM_TICKET_DONE_SHADOW_NO 0x00D9 #define RAM_MASK_TICKET_DONE_NO 0x00DA #define RAM_MINI_WAG_BLUE 0x00DB #define RAM_ALFA_0 0x00E0 #define FILE_WAG_LOCO_NO 0x0000 #define FILE_WAG_BACK_NO 0x0009 #define FILE_MIS_BA_NO 0x000A #define FILE_WAGON_SHADOW_0_0 0x000B #define FILE_WAGON_BLUE_0_0 0x002F #define FILE_WAGON_GREEN_0_0 0x0053 #define FILE_WAGON_PURPLE_0_0 0x0077 #define FILE_WAGON_RED_0_0 0x009B #define FILE_WAGON_YELLOW_0_0 0x00BF #define FILE_IDXMAP 0x00E3 #define FILE_FOND_NOMBRE 0x00E4 #define FILE_BUTTON_BACK 0x00E5 #define FILE_BUTTON_BACK_OVER 0x00E6 #define FILE_BUTTON_BLUE 0x00E7 #define FILE_BUTTON_BLUE_OVER 0x00E8 #define FILE_BUTTON_GREEN 0x00E9 #define FILE_BUTTON_GREEN_OVER 0x00EA #define FILE_BUTTON_RIGHT 0x00EB #define FILE_BUTTON_RIGHT_OVER 0x00EC #define FILE_TITLE_TTR 0x00ED #define FILE_MAINMENU_FOND 0x00EE #define FILE_MAINMENU_LOCO 0x00EF #define FILE_MAINMENU_SMOKE 0x00F0 #define FILE_MAINMENU_PILAR 0x00F1 #define FILE_MAINMENU_GERRY_WAIT 0x00F2 #define FILE_MAINMENU_GERRY_TICKET 0x00F3 #define FILE_MAINMENU_TEXT 0x00F4 #define FILE_NEWGAME_FOND 0x00F5 #define FILE_NEWGAME_FOND_BOT 0x00F6 #define FILE_NEWGAME_FOND_HUMAN 0x00FB #define FILE_NEWGAME_FOND_OFF 0x0100 #define FILE_NEWGAME_RING_BOT 0x0101 #define FILE_NEWGAME_RING_HUMAIN 0x0102 #define FILE_NEWGAME_FIRST_DIS 0x0103 #define FILE_NEWGAME_FIRST_OFF 0x0104 #define FILE_NEWGAME_FIRST_ON 0x0105 #define FILE_AVATAR_HUMAN_35PX 0x0106 #define FILE_AVATAR_48PX_BOT1 0x010B #define FILE_AVATAR_48PX_BOT2 0x0110 #define FILE_AVATAR_48PX_BOT3 0x0115 #define FILE_AVATAR_48PX_BOT4 0x011A #define FILE_LOADGAME_FOND 0x011F #define FILE_LOADGAME_VIGNETTE 0x0120 #define FILE_LOADGAME_PASTILLE_BOT 0x0121 #define FILE_LOADGAME_PASTILLE_HUMAIN 0x0126 #define FILE_AVATAR_35PX_BOT1 0x012B #define FILE_AVATAR_35PX_BOT2 0x0130 #define FILE_AVATAR_35PX_BOT3 0x0135 #define FILE_AVATAR_35PX_BOT4 0x013A #define FILE_MINI_BEST_PATH2 0x013F #define FILE_LASTACTION_BACK 0x0140 #define FILE_LASTACTION_ROAD 0x0141 #define FILE_MAIN_TAB_ON 0x0142 #define FILE_MAIN_TAB_OFF 0x0143 #define FILE_MAIN_CARDS_WAGON 0x0144 #define FILE_MAIN_CARDS_MISSION 0x0145 #define FILE_MAIN_POINTS 0x0146 #define FILE_SCORE_TRAIN_BLUE 0x0147 #define FILE_SCORE_TRAIN_GREEN 0x0148 #define FILE_SCORE_TRAIN_PURPLE 0x0149 #define FILE_SCORE_TRAIN_RED 0x014A #define FILE_SCORE_TRAIN_YELLOW 0x014B #define FILE_FOND_SCORE 0x014C #define FILE_MINI_LONG_ROAD 0x014D #define FILE_INGAME_TEXT 0x014E #define FILE_USMAP 0x014F #define FILE_CREDITS_FOND 0x0150 #define FILE_CREDITS_CURTAIN 0x0151 #define FILE_CREDITS_DOW 0x0152 #define FILE_CREDITS_ASMODEE 0x0153 #define FILE_MAX_GRAFX 0x0153 #define PTS_MIS_01 12 // boston - miami #define PTS_MIS_02 13 // calgary - phoenix #define PTS_MIS_03 7 // calgary - salt lake city #define PTS_MIS_04 7 // chicago - new orleans #define PTS_MIS_05 9 // chicago - santa fe #define PTS_MIS_06 11 // dallas - new york #define PTS_MIS_07 4 // denver - el paso #define PTS_MIS_08 11 // denver-pittsburgh #define PTS_MIS_09 10 // duluth-elpaso #define PTS_MIS_10 8 // duluth-houston #define PTS_MIS_11 8 // helena-losangeles #define PTS_MIS_12 5 // kansas-houston #define PTS_MIS_13 16 // losangeles-chicago #define PTS_MIS_14 20 // losangeles-miami #define PTS_MIS_15 21 // losangeles-newyork #define PTS_MIS_16 9 // montreal-atlanta #define PTS_MIS_17 13 // montreal-neworleans #define PTS_MIS_18 6 // newyork-atlanta #define PTS_MIS_19 17 // portland-nashville #define PTS_MIS_20 11 // portland-phoenix #define PTS_MIS_21 17 // sanfrancisco-atlanta #define PTS_MIS_22 8 // saultstmarie-nashville #define PTS_MIS_23 9 // saultstmarie-oklahoma #define PTS_MIS_24 9 // seattle-losangeles #define PTS_MIS_25 22 // seattle-newyork #define PTS_MIS_26 10 // toronto-miami #define PTS_MIS_27 20 // vancouver-montreal #define PTS_MIS_28 13 // vancouver-santafe #define PTS_MIS_29 12 // winnipeg-houston #define PTS_MIS_30 11 // winnipeg-littlerock #define SCREEN_SHADOW 0 #define SCREEN_WAGON 1 #define SCREEN_SELECT 2 #define SCREEN_WORKING 3 #define SCREEN_DIRECT 4 #undef DEBUG // fichiers char *ttrdir; char fic[256]; // écran void sauverScreen(); void remettreScreen(); void clearBackScreen(); void afficherBackScreen(); void savScrTobackScr(); void empilerBackScr(); void depilerBackScr(); void assombrirBackScr(); void effacerUsMap(); void effacerMapSelection(); unsigned char *getBackScr(); unsigned char *getSelectionScr(); void grafx_positionner_ram(uint16 num); uint16 afficherGrafx_ram(uint16 num, sint16 x, sint16 y, uint8 ou, uint16 colorisation); uint16 afficherGrafx_ramMask(uint16 num, uint16 numMask, sint16 x, sint16 y, uint8 ou); uint32 grafx_positionner_file(uint16 num); uint16 afficherGrafx_file(uint16 num, sint16 x, sint16 y, uint8 ou, uint16 colorisation); uint16 grafx_read2_file(); void afficherCarte(uint16 x, uint16 y, uint16 maxX, uint8 maxY); void afficherMiniCarte(bool inGame); void afficherCarteSombre(uint16 x0,uint16 y0,uint16 x1,uint16 y1, uint16 x, uint16 y); uint8 routeSousCurseur(uint16 x, uint16 y); void loadGrafx_ram(); void loadGrafx_file(); void doneGrafx_ram(); void doneGrafx_file(); void resetUsMap(); void loadUsMap(); void doneUsMap(); // Global void initGlobal(char *argv); void doneGlobal(); void initAlphaBlending(); uint16 ecrireGrafxA(char *txt, uint16 ouX, uint8 ouY, uint16 colorisation); uint16 ecrireGrafxPhrase(char *txt, uint16 ouX, uint8 ouY, uint8 interligne, uint16 colorisation); uint16 ecrireGrafx0(int nb, uint16 ouX, uint8 ouY, uint16 colorisation); uint16 taillerGrafx0(int nb); void dumperScreen(uint16 num, uint32 size, uint8 ouY); char *getCheminFichier(char *nom); uint32 chargerTaille_file(uint16 num); void chargerGrafx_file(unsigned char *buffer, uint16 num, uint32 taille); uint16 afficherGrafx_buffer(unsigned char *buffer, sint16 x, sint16 y, uint8 ou, uint16 colorisation); uint16 afficherGrafx_bufferSlow(unsigned char *buffer, sint16 x, sint16 y, uint8 ou, uint16 colorisation); uint32 grafx_read3_ram(); uint16 grafx_read2_ram(); #endif