1
0
mirror of https://github.com/jummy0/sb2-decomp synced 2025-03-14 20:23:30 +01:00

text is working + progress on multiplayer menus

This commit is contained in:
jummy 2024-11-07 16:19:16 -06:00
parent 72cab852c6
commit 0120173489
23 changed files with 1031 additions and 507 deletions

View File

@ -168,6 +168,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<None Include="Debug\DATA\config.def" />
<None Include="resource\cursor1.cur" />
<None Include="resource\IDC_ARROW.cur" />
<None Include="resource\IDC_ARROWD.cur" />
<None Include="resource\IDC_ARROWDL.cur" />
@ -206,6 +207,7 @@
<ClCompile Include="src\wave.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource\resource.h" />
<ClInclude Include="src\button.h" />
<ClInclude Include="src\ddutil.h" />
<ClInclude Include="src\decor.h" />
@ -221,7 +223,6 @@
<ClInclude Include="src\pixmap.h" />
<ClInclude Include="src\pixtables.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\resource1.h" />
<ClInclude Include="src\sound.h" />
<ClInclude Include="src\text.h" />
<ClInclude Include="src\texttables.h" />

View File

@ -63,6 +63,9 @@
<None Include="resource\IDC_EMPTY.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\cursor1.cur">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\resource.h">
@ -107,9 +110,6 @@
<ClInclude Include="src\pixtables.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\resource1.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\sound.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -125,6 +125,9 @@
<ClInclude Include="src\button.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="resource\IDR_MAINFRAME.ico">

Binary file not shown.

Binary file not shown.

BIN
resource/RCa07276 Normal file

Binary file not shown.

BIN
resource/RCa07552 Normal file

Binary file not shown.

BIN
resource/RCb07276 Normal file

Binary file not shown.

BIN
resource/RCc07276 Normal file

Binary file not shown.

561
resource/resource.h Normal file
View File

@ -0,0 +1,561 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Eggbert2.rc
//
#define TX_IONAMEEX 100
#define TX_IOFREE 101
#define TX_OWNMISSION 102
#define TX_TESTMISSION 103
#define TX_BUTTON_JOUER 104
#define TX_BUTTON_APPRENDRE 105
#define TX_BUTTON_QUITTER 106
#define TX_BUTTON_PREVP 107
#define TX_BUTTON_NEXTP 108
#define TX_BUTTON_PLAYP 109
#define TX_BUTTON_BUILDP 110
#define TX_BUTTON_TERM 111
#define TX_BUTTON_READP 112
#define TX_BUTTON_WRITEP 113
#define TX_BUTTON_CANCELP 114
#define TX_BUTTON_CONTP 115
#define TX_BUTTON_REPEAT 116
#define TX_CHOOSEPLAYER 117
#define TX_PLAYERSNAME 118
#define TX_BUTTON_TERMC 119
#define TX_CHOOSESIZE 120
#define TX_BUTTON_HVSCROLL 121
#define TX_BUTTON_ONLYHSCROLL 122
#define TX_BUTTON_ONLYVSCROLL 123
#define TX_BUTTON_TESTMISSION 124
#define TX_PAUSE 125
#define TX_TINY 126
#define TX_CLEARPLAYER 127
#define TX_SETTINGS 128
#define TX_CHOOSEMUSIC 129
#define TX_BUTTON_SETUP1 130
#define TX_BUTTON_SETUP2 131
#define TX_BUTTON_SETUP3 132
#define TX_BUTTON_SETUP4 133
#define TX_NOMUSIC 134
#define TX_MUSIC1 135
#define TX_MUSIC2 136
#define TX_MUSIC3 137
#define TX_MUSIC4 138
#define TX_MUSIC5 139
#define TX_MUSIC6 140
#define TX_MUSIC7 141
#define TX_MUSIC8 142
#define TX_MUSIC9 143
#define TX_BUTTON_REGION 144
#define TX_CHOOSEBACK 144
#define TX_DISCARDGAME 145
#define TX_CONFIRMCLEARGAME 145
#define TX_EGGBERT 146
#define TX_BLUPI 146
#define TX_DESIGNMISSION 147
#define TX_DESIGNMISSIONS 147
#define TX_CHOOSEGAMER 148
#define TX_CHOOSEPLAYER2 148
#define TX_MUSIC 149
#define TX_CHOOSEMUSIC2 149
#define TX_TRAININGNUM 150
#define TX_MISSIONNUM 151
#define TX_MISSIONTIME 152
#define IDS_STRING152 152
#define TX_SIZE 153
#define IDS_STRING153 153
#define TX_BUTTON_SETUP5 154
#define IDS_STRING154 154
#define TX_BUTTON_SETUP6 155
#define IDS_STRING155 155
#define TX_BUTTON_SETUP7 156
#define IDS_STRING156 156
#define TX_BUTTON_SETUP8 157
#define IDS_STRING157 157
#define TX_CONFYES 158
#define IDS_STRING158 158
#define TX_CONFNO 159
#define IDS_STRING159 159
#define TX_SETTING 160
#define IDS_STRING160 160
#define TX_SAVECURRENTMISS 161
#define IDS_STRING161 161
#define TX_SOUNDVOL 162
#define IDS_STRING162 162
#define TX_MUSICVOL 163
#define IDS_STRING163 163
#define TX_COLORDEP 164
#define IDS_STRING164 164
#define TX_INPUT 165
#define IDS_STRING165 165
#define TX_OPENMISS 166
#define IDS_STRING166 166
#define TX_READINFO 167
#define IDS_STRING167 167
#define TX_PLAYERFREE 168
#define IDS_STRING168 168
#define TX_NUMDOOROPEN 169
#define IDS_STRING169 169
#define TX_NUMDOORSOPEN 170
#define IDS_STRING170 170
#define TX_MUSIC10 171
#define IDS_STRING171 171
#define TX_WRITENAME 172
#define IDS_STRING172 172
#define TX_NONE 173
#define IDS_STRING173 173
#define TX_CONFIRM 174
#define IDS_STRING174 174
#define TX_CANCEL 175
#define IDS_STRING175 175
#define TX_YES 176
#define IDS_STRING176 176
#define TX_NO 177
#define IDS_STRING177 177
#define TX_REGION 178
#define IDS_STRING178 178
#define TX_SUS 179
#define IDS_STRING179 179
#define TX_BUTTON_SETUP 180
#define IDS_STRING180 180
#define TX_SAVES 181
#define IDS_STRING181 181
#define TX_INSERT 182
#define IDS_STRING182 182
#define TX_DELETEMISS 183
#define IDS_STRING183 183
#define TX_DELETEMISSION 184
#define IDS_STRING184 184
#define TX_NAMEOFMISS 185
#define IDS_STRING185 185
#define TX_NAMEOFMISSION 186
#define IDS_STRING186 186
#define TX_NONAME 187
#define IDS_STRING187 187
#define TX_DESIGN 188
#define IDS_STRING188 188
#define TX_MISSNUM 189
#define IDS_STRING189 189
#define TX_MISSTIME 190
#define IDS_STRING190 190
#define TX_MISSION2D 191
#define IDS_STRING191 191
#define TX_SHOWNEXT 192
#define IDS_STRING192 192
#define TX_SHOWPREV 193
#define IDS_STRING193 193
#define TX_CONTENT 194
#define IDS_STRING194 194
#define TX_SINGLEPLAYER 195
#define IDS_STRING195 195
#define TX_MUTLIPLAYER 196
#define TX_MULTIPLAYER 196
#define IDS_STRING196 196
#define TX_GAMEPAUSE 197
#define TX_CANCELLAST 198
#define TX_PLAYDEMO 199
#define IDS_STRING199 199
#define TX_HADFUN 200
#define IDS_STRING200 200
#define TX_OGCREATION 201
#define IDS_STRING201 201
#define TX_WEBSITE 202
#define IDS_STRING202 202
#define TX_FULL_END1 203
#define IDS_STRING203 203
#define TX_FULL_END2 204
#define IDS_STRING204 204
#define TX_FULL_END3 205
#define IDS_STRING205 205
#define TX_FULL_END4 206
#define IDS_STRING206 206
#define TX_CHOOSECOLOR 207
#define IDS_STRING207 207
#define TX_CLICKREADY 208
#define IDS_STRING208 208
#define TX_BUTTON_SKILL 209
#define IDS_STRING209 209
#define TX_EASY 210
#define IDS_STRING210 210
#define TX_HARD 211
#define IDS_STRING211 211
#define TX_BUTTON_DEMO 212
#define IDS_STRING212 212
#define TX_DEMOREC 213
#define TX_DEMOPLAY 214
#define IDS_STRING215 215
#define IDS_STRING216 216
#define IDS_STRING217 217
#define IDS_STRING218 218
#define IDS_STRING219 219
#define IDS_STRING220 220
#define IDS_STRING221 221
#define IDS_STRING222 222
#define IDS_STRING223 223
#define IDS_STRING224 224
#define IDS_STRING225 225
#define IDS_STRING226 226
#define IDS_STRING227 227
#define IDS_STRING228 228
#define IDS_STRING229 229
#define IDS_STRING230 230
#define IDS_STRING231 231
#define IDS_STRING232 232
#define IDS_STRING233 233
#define IDS_STRING234 234
#define IDS_STRING235 235
#define IDS_STRING236 236
#define IDS_STRING237 237
#define IDS_STRING238 238
#define IDS_STRING239 239
#define IDS_STRING240 240
#define IDS_STRING241 241
#define TX_SHOWCONNECTION 242
#define IDS_STRING242 242
#define IDS_STRING243 243
#define IDS_STRING244 244
#define IDS_STRING245 245
#define IDS_STRING246 246
#define TX_GAMEJOIN 247
#define IDS_STRING247 247
#define TX_CREATE_MULTIGAME 248
#define IDS_STRING248 248
#define TX_UPDATELIST 249
#define IDS_STRING249 249
#define TX_MULTI_CREATE 250
#define TX_MULTI_GNAME 251
#define IDS_STRING251 251
#define IDS_STRING252 252
#define IDS_STRING253 253
#define IDS_STRING254 254
#define IDS_STRING255 255
#define IDS_STRING256 256
#define IDS_STRING257 257
#define IDS_STRING258 258
#define IDS_STRING259 259
#define IDS_STRING260 260
#define IDS_STRING261 261
#define IDS_STRING262 262
#define IDS_STRING263 263
#define TX_OPEN 264
#define IDS_STRING264 264
#define IDS_STRING265 265
#define IDS_STRING266 266
#define IDS_STRING267 267
#define TX_HELP 268
#define IDS_STRING268 268
#define TX_LOAD_CGAME 269
#define TX_SAVE_CGAME 270
#define IDS_STRING271 271
#define TX_MISSIONFREE 272
#define IDS_STRING272 272
#define IDS_STRING273 273
#define IDS_STRING274 274
#define IDS_STRING275 275
#define IDS_STRING276 276
#define IDS_STRING277 277
#define IDS_STRING278 278
#define IDS_STRING279 279
#define IDS_STRING280 280
#define IDS_STRING281 281
#define IDS_STRING282 282
#define IDS_STRING283 283
#define IDS_STRING284 284
#define IDS_STRING285 285
#define IDS_STRING286 286
#define IDS_STRING287 287
#define TX_GAMESAVED 288
#define IDS_STRING288 288
#define TX_NOTINDEMO 289
#define IDS_STRING289 289
#define IDS_STRING290 290
#define IDS_STRING291 291
#define IDS_STRING292 292
#define IDS_STRING293 293
#define IDS_STRING294 294
#define IDS_STRING295 295
#define IDS_STRING296 296
#define IDS_STRING297 297
#define IDS_STRING298 298
#define IDS_STRING299 299
#define IDS_STRING300 300
#define IDS_STRING301 301
#define IDS_STRING302 302
#define IDS_STRING303 303
#define IDS_STRING304 304
#define IDS_STRING305 305
#define IDS_STRING306 306
#define IDS_STRING400 400
#define IDS_STRING401 401
#define IDS_STRING402 402
#define IDS_STRING403 403
#define IDS_STRING404 404
#define IDS_STRING405 405
#define IDS_STRING406 406
#define IDS_STRING407 407
#define IDS_STRING408 408
#define IDS_STRING409 409
#define IDS_STRING410 410
#define IDS_STRING411 411
#define IDS_STRING412 412
#define TX_REPEAT_CULTIVE 500
#define IDS_STRING500 500
#define TX_REPEAT_FLEUR 501
#define IDS_STRING501 501
#define TX_REPEAT_FLEURQ 502
#define IDS_STRING502 502
#define TX_REPEAT_FABMINE 503
#define IDS_STRING503 503
#define TX_REPEAT_FABJEEP 504
#define IDS_STRING504 504
#define TX_REPEAT_PALIS 505
#define IDS_STRING505 505
#define TX_REPEAT_PALISQ 506
#define IDS_STRING506 506
#define TX_REPEAT_PONT 507
#define IDS_STRING507 507
#define TX_REPEAT_PONTQ 508
#define IDS_STRING508 508
#define TX_REPEAT_BATEAU 509
#define IDS_STRING509 509
#define TX_REPEAT_BATEAUQ 510
#define IDS_STRING510 510
#define TX_REPEAT_FABARMURE 511
#define IDS_STRING511 511
#define TX_DIRECT_N 512
#define IDS_STRING512 512
#define TX_DIRECT_S 513
#define TX_DIRECT_E 514
#define TX_DIRECT_O 515
#define IDS_STRING600 600
#define IDS_STRING601 601
#define IDS_STRING602 602
#define IDS_STRING603 603
#define IDS_STRING604 604
#define IDS_STRING605 605
#define IDS_STRING606 606
#define IDS_STRING607 607
#define IDS_STRING608 608
#define IDS_STRING609 609
#define IDS_STRING610 610
#define IDS_STRING611 611
#define IDS_STRING612 612
#define IDS_STRING613 613
#define IDS_STRING614 614
#define IDS_STRING615 615
#define IDS_STRING616 616
#define IDS_STRING617 617
#define IDS_STRING618 618
#define IDS_STRING619 619
#define IDS_STRING620 620
#define IDS_STRING621 621
#define IDS_STRING622 622
#define IDS_STRING623 623
#define IDR_WAVE_BOING 1000
#define TX_ERROR_MISC 1000
#define IDS_STRING1000 1000
#define IDR_WAVE_BLOW 1001
#define TX_ERROR_GROUND 1001
#define IDS_STRING1001 1001
#define TX_ERROR_FREE 1002
#define IDS_STRING1002 1002
#define TX_ERROR_PONTOP 1003
#define IDS_STRING1003 1003
#define TX_ERROR_PONTTERM 1004
#define IDS_STRING1004 1004
#define TX_ERROR_TOURISOL 1005
#define IDS_STRING1005 1005
#define TX_ERROR_TOUREAU 1006
#define IDS_STRING1006 1006
#define TX_ERROR_TELE2 1007
#define IDS_STRING1007 1007
#define IDS_STRING1008 1008
#define IDS_STRING1009 1009
#define IDS_STRING1010 1010
#define IDS_STRING1011 1011
#define IDS_STRING1012 1012
#define IDS_STRING1013 1013
#define IDS_STRING1014 1014
#define IDS_STRING1015 1015
#define IDS_STRING1016 1016
#define IDS_STRING1017 1017
#define IDS_STRING1018 1018
#define IDS_STRING1019 1019
#define IDS_STRING1020 1020
#define IDS_STRING1021 1021
#define IDS_STRING1022 1022
#define IDS_STRING1023 1023
#define IDS_STRING1024 1024
#define IDS_STRING1025 1025
#define IDS_STRING1026 1026
#define IDS_STRING1027 1027
#define IDS_STRING1028 1028
#define IDS_STRING1029 1029
#define IDS_STRING1030 1030
#define IDS_STRING1031 1031
#define IDS_STRING1032 1032
#define IDS_STRING1033 1033
#define IDS_STRING1034 1034
#define IDS_STRING1035 1035
#define IDS_STRING1036 1036
#define IDS_STRING1037 1037
#define IDS_STRING1038 1038
#define IDS_STRING1039 1039
#define IDS_STRING1040 1040
#define IDS_STRING1041 1041
#define IDS_STRING1042 1042
#define IDS_STRING1043 1043
#define IDS_STRING1044 1044
#define IDS_STRING1045 1045
#define IDS_STRING1046 1046
#define IDS_STRING1047 1047
#define IDS_STRING1048 1048
#define IDS_STRING1049 1049
#define IDS_STRING1050 1050
#define IDS_STRING1051 1051
#define IDS_STRING1052 1052
#define IDS_STRING1053 1053
#define IDS_STRING1054 1054
#define IDS_STRING1055 1055
#define IDS_STRING1056 1056
#define IDS_STRING1057 1057
#define IDS_STRING1058 1058
#define IDS_STRING1059 1059
#define IDS_STRING1060 1060
#define IDS_STRING1061 1061
#define IDS_STRING1062 1062
#define IDS_STRING1063 1063
#define IDS_STRING1064 1064
#define IDS_STRING1065 1065
#define IDS_STRING1066 1066
#define IDS_STRING1067 1067
#define IDS_STRING1068 1068
#define IDS_STRING1069 1069
#define IDS_STRING1070 1070
#define IDS_STRING1071 1071
#define IDS_STRING1072 1072
#define IDS_STRING1073 1073
#define IDS_STRING1074 1074
#define IDS_STRING1075 1075
#define IDS_STRING1076 1076
#define IDS_STRING1077 1077
#define IDS_STRING1078 1078
#define IDS_STRING1079 1079
#define IDS_STRING1080 1080
#define IDS_STRING1081 1081
#define IDS_STRING1082 1082
#define IDS_STRING1083 1083
#define IDS_STRING1084 1084
#define TX_OBJ_BLUPIm 2000
#define TX_OBJ_BLUPIf 2001
#define TX_OBJ_BLUPI 2002
#define TX_OBJ_BATEAU 2003
#define TX_OBJ_JEEP 2004
#define IDS_STRING2004 2004
#define TX_OBJ_PIEGE 2005
#define TX_OBJ_POISON 2006
#define TX_OBJ_DYNAMITE 2007
#define IDS_STRING2007 2007
#define TX_OBJ_MINE 2008
#define TX_OBJ_TOMATE 2009
#define IDS_STRING2009 2009
#define TX_OBJ_POTION 2010
#define TX_OBJ_PLANCHE 2011
#define TX_OBJ_PIERRE 2012
#define TX_OBJ_DRAPEAU 2013
#define TX_OBJ_FER 2014
#define TX_OBJ_FLEUR1 2015
#define TX_OBJ_FLEUR2 2016
#define TX_OBJ_FLEUR3 2017
#define TX_OBJ_CABANE 2018
#define TX_OBJ_LABO 2019
#define TX_OBJ_MINEFER 2020
#define TX_OBJ_USINE 2021
#define TX_OBJ_TOUR 2022
#define TX_OBJ_FEU 2023
#define TX_OBJ_ROBOT 2024
#define TX_OBJ_TRACKS 2025
#define TX_OBJ_BOMBE 2026
#define TX_OBJ_ARAIGNEE 2027
#define TX_OBJ_VIRUS 2028
#define TX_OBJ_ELECTRO 2029
#define TX_OBJ_ARBRE 2030
#define IDS_STRING2030 2030
#define TX_OBJ_MUR 2031
#define TX_OBJ_ARBREb 2032
#define TX_OBJ_ROC 2033
#define IDS_STRING2033 2033
#define TX_OBJ_OEUF 2034
#define TX_OBJ_PALISSADE 2035
#define TX_OBJ_ENNEMIp 2036
#define TX_OBJ_ENNEMI 2037
#define TX_OBJ_HERBE 2038
#define IDS_STRING2038 2038
#define TX_OBJ_MOUSSE 2039
#define TX_OBJ_TERRE 2040
#define TX_OBJ_EAU 2041
#define IDS_STRING2041 2041
#define TX_OBJ_RIVE 2042
#define TX_OBJ_MIXTE 2043
#define TX_OBJ_PONT 2044
#define IDS_STRING2044 2044
#define TX_OBJ_COUVEUSE 2045
#define TX_OBJ_GLACE 2046
#define TX_OBJ_MAISON 2047
#define IDS_STRING2047 2047
#define TX_OBJ_HACHURE 2048
#define TX_OBJ_MOUSSEb 2049
#define TX_OBJ_BOUQUET1 2050
#define TX_OBJ_BOUQUET2 2051
#define TX_OBJ_BOUQUET3 2052
#define TX_OBJ_DALLE 2053
#define TX_OBJ_ENNEMIs 2054
#define TX_OBJ_DISCIPLE 2055
#define TX_OBJ_METAL 2056
#define TX_OBJ_FUSEE 2057
#define TX_OBJ_TELEPORTE 2058
#define TX_OBJ_ARMURE 2059
#define TX_OBJ_DALLESPEC 2060
#define TX_OBJ_COUVTELE 2061
#define TX_OBJ_BATIMENT 2062
#define TX_OBJ_BATENNEMIS 2063
#define TX_OBJ_MURPAL 2064
#define TX_OBJ_OBJET 2065
#define TX_OBJ_ARME 2066
#define TX_OBJ_VEHICULE 2067
#define TX_OBJ_STARTFEU 2068
#define TX_OBJ_DELOBJ 2069
#define TX_OBJ_DELPERSO 2070
#define TX_OBJ_DELFEU 2071
#define TX_OBJ_PLANTE 2072
#define IDS_STRING2072 2072
#define TX_OBJ_BARENNEMIS 2073
#define TX_WIN1 3000
#define TX_WIN2 3001
#define TX_WIN3 3002
#define TX_WIN4 3003
#define TX_WIN5 3004
#define TX_LOST1 3100
#define TX_LOST2 3101
#define TX_LOST3 3102
#define TX_LOST4 3103
#define TX_LOST5 3104
#define TX_LASTWIN1 3200
#define IDS_STRING3200 3200
#define TX_LASTWIN2 3201
#define IDS_STRING3201 3201
#define TX_LASTWIN3 3202
#define IDS_STRING3202 3202
#define TX_BUTTON_CREATE 6900
#define IDM_EXIT 40001
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 195
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -1,19 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Blupi-e.rc
//
#define TX_DIRECT_N 512
#define TX_DIRECT_S 513
#define TX_DIRECT_E 514
#define TX_DIRECT_O 515
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -25,7 +25,7 @@ CButton::CButton()
m_type = 0;
m_bEnable = TRUE;
m_bHide = FALSE;
m_bSomething = FALSE;
m_bLocked = FALSE;
m_state = 0;
m_mouseState = 0;
m_nbMenu = 0;
@ -69,7 +69,7 @@ BOOL CButton::Create(HWND hWnd, CPixmap *pPixmap, CSound *pSound,
m_bMinimizeRedraw = bMinimizeRedraw;
m_bEnable = TRUE;
m_bHide = FALSE;
m_bSomething = FALSE;
m_bLocked = FALSE;
m_message = message;
m_pos.x = pos.x;
m_pos.y = pos.y;
@ -126,7 +126,7 @@ void CButton::Draw()
}
else
{
m_pPixmap->DrawIcon(-1, CHBUTTON + m_type, m_bSomething ? 5 : 4, m_pos);
m_pPixmap->DrawIcon(-1, CHBUTTON + m_type, m_bLocked ? 5 : 4, m_pos);
}
if (m_nbMenu == 0) return;
@ -202,16 +202,6 @@ void CButton::SetEnable(BOOL bEnable)
m_bEnable = bEnable;
}
void CButton::SetSomething(BOOL bSomething)
{
if (m_bSomething != bSomething)
{
m_bRedraw = TRUE;
}
m_bSomething = bSomething;
}
/*
// Needed Yet?

View File

@ -29,8 +29,6 @@ public:
BOOL GetEnable();
void SetEnable(BOOL bEnable);
void SetSomething(BOOL bSomething);
BOOL GetHide();
void SetHide(BOOL bHide);
@ -52,6 +50,7 @@ protected:
CSound* m_pSound;
int m_type; // type de bouton
BOOL m_bEnable; // TRUE si bouton actif
int m_bLocked;
BOOL m_bHide; // TRUE si bouton caché
UINT m_message; // message envoyé si bouton actionné
POINT m_pos; // coin sup/gauche
@ -63,7 +62,6 @@ protected:
int m_nbMenu; // nb de case du sous-menu
int m_nbToolTips; // nb d'info-bulles
int m_selMenu;
int m_bSomething; // sous-menu sélectionné
BOOL m_bMouseDown; // TRUE -> bouton souris pressé
BOOL m_bMinimizeRedraw;
BOOL m_bRedraw;

View File

@ -31,6 +31,7 @@
#define MAXNOTIF 5
#define MAXFIFOPOS 10
#define MAXCHAT 6
#define MAXSAVE 6
#define LIFT_RANGE_Y 30
#define LXIMAGE 640 // dimensions de la fenêtre de jeu

View File

@ -1824,8 +1824,6 @@ CEvent::CEvent()
m_keyPress = 0;
m_menuIndex = 0;
ZeroMemory(m_menuDecor, sizeof(m_menuDecor));
return;
}
// Destructor
@ -2405,51 +2403,46 @@ BOOL CEvent::DrawButtons()
int lg, sound;
BOOL soundEnabled;
char res[100];
char text[100];
char res2[100];
POINT pos;
RECT rect;
if (m_phase != WM_PHASE_INSERT && m_phase != WM_PHASE_BYE)
if (m_phase != WM_PHASE_INSERT && m_phase != WM_PHASE_BYE && m_phase != WM_PHASE_INTRO1 && m_phase != WM_PHASE_INTRO2)
{
m_bChangeCheat = FALSE;
text[0] = 0;
res2[0] = 0;
if (m_bBuildOfficialMissions)
{
AddCheatCode(text, cheat_code[0]);
AddCheatCode(res2, cheat_code[0]);
}
if (m_bAllMissions)
{
AddCheatCode(text, cheat_code[1]);
AddCheatCode(res2, cheat_code[1]);
}
if (m_pDecor->GetSuperBlupi())
{
AddCheatCode(text, cheat_code[3]);
AddCheatCode(res2, cheat_code[3]);
}
if (m_pDecor->GetDrawSecret())
{
AddCheatCode(text, cheat_code[11]);
AddCheatCode(res2, cheat_code[11]);
}
if (m_pDecor->GetNetPacked())
{
AddCheatCode(text, cheat_code[19]);
AddCheatCode(res2, cheat_code[19]);
}
if (!m_pDecor->GetNetMovePredict())
{
AddCheatCode(text, cheat_code[21]);
AddCheatCode(res2, cheat_code[21]);
}
m_pDecor->OutputNetDebug(text);
m_pDecor->OutputNetDebug(res2);
if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST || m_phase == WM_PHASE_BUILD)
if (m_phase != WM_PHASE_PLAY && m_phase != WM_PHASE_PLAYTEST && m_phase != WM_PHASE_BUILD)
{
DrawTextLeft(m_pPixmap, POINT( 2, 2 ), text, FONTLITTLE);
}
else
{
m_pPixmap->DrawPart(-1, CHBACK, POINT( 2, 2 ), RECT( 2, 2, 302, 14 ), 1, FALSE);
m_pPixmap->DrawPart(-1, CHBACK, POINT(2, 2), RECT(2, 2, 302, 14), 1, FALSE);
}
DrawTextLeft(m_pPixmap, POINT(2, 2), res2, FONTLITTLE);
}
if (m_phase == WM_PHASE_INIT)
@ -2461,23 +2454,36 @@ BOOL CEvent::DrawButtons()
{
LoadString(TX_CHOOSEGAMER, res, 100);
DrawTextLeft(m_pPixmap, POINT( LXIMAGE / 2 - GetTextWidth(res) / 2, 26 ), res, FONTGOLD);
for (i = 0; i < 8; i++)
for (i = 0; i < MAXGAMER; i++)
{
DrawText(m_pPixmap, POINT( 110, 69 + i * DIMBUTTONY ), m_gamerNameList[i], FONTWHITE);
}
SetEnable(WM_PHASE_CLEARGAMER, m_gamerExist[m_gamer]);
}
if (m_phase == WM_PHASE_CREATE)
{
LoadString(TX_MULTI_CREATE, res, 50);
lg = GetTextWidth(res);
pos.x = (320 - lg) / 2;
pos.y = 103;
DrawTextLeft(m_pPixmap, pos, res, FONTSELECTED);
LoadString(TX_MULTI_GNAME, res, 100);
pos.x = (320 - lg) / 2;
pos.y = 190;
DrawTextLeft(m_pPixmap, pos, res, FONTSELECTED);
}
if (m_phase == WM_PHASE_NAMEGAMER)
{
LoadString(TX_CHOOSEGAMER, res, 100);
lg = GetTextWidth(res, 0);
pos.x = 320 - lg / 2;
pos.x = LXIMAGE / 2 - lg / 2;
pos.y = 102;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(TX_WRITENAME, res, 100);
lg = GetTextWidth(res, 100);
pos.x = 320 - lg / 2;
pos.x = LXIMAGE / 2 - lg / 2;
pos.y = 190;
DrawTextLeft(m_pPixmap, pos, res, 0);
@ -2500,40 +2506,52 @@ BOOL CEvent::DrawButtons()
PutTextInputBox(POINT( 320, 232 ));
}
// now that the decomp is looking convincingly like the retail game,
// we should clearly differentiate the two when sharing WIP screenshots/videos to reduce confusion.
if (m_phase == WM_PHASE_CLEARGAMER)
{
POINT debugMousePos = GetMousePos();
int debugTextY;
if (debugMousePos.x > LXIMAGE - GetTextWidth("WORK IN PROGRESS") && debugMousePos.x < LXIMAGE && debugMousePos.y < 36 && debugMousePos.y >= 0)
{
debugTextY = 40;
}
else
{
debugTextY = 0;
}
DrawTextLeft(m_pPixmap, POINT( LXIMAGE - GetTextWidth("DECOMPILATION"), debugTextY ), "DECOMPILATION", FONTGOLD);
DrawTextLeft(m_pPixmap, POINT( LXIMAGE - GetTextWidth("WORK IN PROGRESS"), debugTextY + 11 ), "WORK IN PROGRESS", FONTGOLD);
DrawTextLeft(m_pPixmap, POINT( LXIMAGE - GetTextWidth(__DATE__ " " __TIME__), debugTextY + 22 ), __DATE__ " " __TIME__, FONTGOLD);
LoadString(TX_CHOOSEGAMER, res, 100);
lg = GetTextWidth((char*)res, 0);
pos.y = 102;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, (char*)res, 1);
LoadString(TX_DISCARDGAME, res, 100);
lg = GetTextWidth(res, 0);
pos.x = 320 - lg / 2;
pos.y = 210;
DrawTextLeft(m_pPixmap, pos, res, 0);
strcpy(res2, m_gamerName);
strcat(res2, "?");
lg = GetTextWidth(res2, 0);
pos.x = 320 - lg / 2;
pos.y = 230;
DrawTextLeft(m_pPixmap, pos, res2, 0);
}
///////
if (m_phase != WM_PHASE_PLAY && m_phase != WM_PHASE_PLAYTEST && m_phase != WM_PHASE_BUILD)
m_pPixmap->DrawPart(-1, 0, POINT( 2, 2 ), RECT( 2, 2, 302, 14 ), 1, 0);
if (m_phase == WM_PHASE_CREATE)
if (m_phase == WM_PHASE_CLEARDESIGN)
{
LoadString(TX_MULTI_CREATE, res, 50);
lg=GetTextWidth(res);
pos.x = (320 - lg) / 2;
pos.y = 103;
DrawTextLeft(m_pPixmap, pos, res, FONTSLIM);
LoadString(TX_MULTI_GNAME, res, 100);
pos.x = (320 - lg) / 2;
pos.y = 190;
DrawTextLeft(m_pPixmap, pos, res, FONTSLIM);
LoadString(TX_DESIGNMISSION, res, 100);
lg = GetTextWidth(res, 0);
pos.y = 104;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(TX_DELETEMISSION, res, 100);
sprintf(res2, res, GetWorld());
lg = GetTextWidth(res2, 0);
pos.y = 210;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res2, 0);
strcpy(res2, m_pDecor->GetMissionTitle());
if (res2[0] == '\0')
{
LoadString(TX_NONAME, res, 100);
}
strcat(res2, "?");
lg = GetTextWidth(res2, 0);
pos.y = 230;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
if (m_phase == WM_PHASE_SETUP || m_phase == WM_PHASE_SETUPp)
{
sound = m_pSound->GetAudioVolume();
@ -2543,6 +2561,12 @@ BOOL CEvent::DrawButtons()
soundEnabled = FALSE;
}
}
for (i = 0; table[m_index].buttons[i].message != 0; i++)
{
m_buttons[i].Draw();
}
if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST)
{
if (m_pDecor->GetPause() == 0)
@ -2579,6 +2603,36 @@ BOOL CEvent::DrawButtons()
pos.y = 103;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
}
if (m_phase == WM_PHASE_HELP)
{
LoadString(TX_HELP, res, 100);
lg = GetTextWidth(res, 0);
pos.x = LXIMAGE / 2 - lg / 2;
pos.y = 65;
DrawTextLeft(m_pPixmap, pos, res, 1);
lg = 140;
UINT j;
for (j = 601; j < 625; j += 3)
{
if (m_somethingJoystick == NULL)
{
pos.y = j - 1;
}
else
{
pos.y = j;
}
LoadString(pos.y, res, 100);
pos.x = 110;
pos.y = lg;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(j + 1, res, 100);
pos.x = 230;
pos.y = lg;
DrawTextLeft(m_pPixmap, pos, res, 0);
lg += 20;
}
}
if (m_phase == WM_PHASE_MUSIC)
{
LoadString(TX_MUSIC, res, 100);
@ -2595,6 +2649,39 @@ BOOL CEvent::DrawButtons()
pos.y = 26;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
}
if (m_phase == WM_PHASE_INFO)
{
LoadString(TX_DESIGNMISSION, res, 100);
lg = GetTextWidth(res, 0);
pos.y = 37;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 0);
if (m_bDrawMap != FALSE)
{
pos.x = 148;
pos.y = 96;
m_pPixmap->DrawIcon(-1, 8, 0, pos, 0, FALSE);
}
LoadString(TX_MISSNUM, res, 100);
if (m_bPrivate)
m_private = m_private;
else
m_private = m_mission;
sprintf(res2, res, m_private);
lg = GetTextWidth(res2, 0);
pos.y = 106;
pos.x = 250 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res2, 1);
strcpy(res2, m_pDecor->GetMissionTitle());
if (res2[0] == '\0')
{
LoadString(TX_NONAME, res, 100);
}
lg = GetTextWidth(res, 0);
pos.y = 269;
pos.x = 250 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
if (m_phase == WM_PHASE_LOST || m_phase == WM_PHASE_LOSTDESIGN || m_phase == WM_PHASE_WINMULTI)
{
LoadString(TX_LOST1 + GetWorld() % 5, res, 50);
@ -2605,118 +2692,20 @@ BOOL CEvent::DrawButtons()
LoadString(TX_WIN1 + GetWorld() % 5, res, 50);
DrawTextLeft(m_pPixmap, pos, res, FONTWHITE);
}
if (m_phase == WM_PHASE_READDESIGN)
if (m_phase == WM_PHASE_LASTWIN)
{
LoadString(TX_OPENMISS, res, 100);
lg = GetTextWidth(res, 0);
pos.x = 320 - lg / 2;
pos.y = 31;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(TX_CONTENT, res, 100);
pos.x = 190;
pos.y = 79;
DrawTextLeft(m_pPixmap, pos, res, 0);
int string;
pos.x = 240;
pos.y = 122;
for (i=0; i < m_nbChoices; i++)
{
if (i >= 6) break;
if (m_choicePageOffset + i >= m_nbChoices) break;
strncpy(text, m_filenameBuffer[m_choicePageOffset + i], 100);
strcpy(text + 26, "...");
DrawText(m_pPixmap, pos, text, m_choiceIndex == m_choicePageOffset + i ? 0 : 2);
pos.y += 40;
}
}
if (m_phase == WM_PHASE_GREAD || m_phase == WM_PHASE_GREADp || m_phase == WM_PHASE_GWRITE)
{
if (m_phase == WM_PHASE_GREAD)
{
LoadString(TX_SAVE_CGAME, res, 50);
}
if (m_bPrivate)
string = TX_LASTWIN3;
else
{
LoadString(TX_LOAD_CGAME, res, 50);
}
}
if (m_phase == WM_PHASE_BYE)
{
LoadString(TX_FULL_END1, res, 100);
lg = GetTextWidth(res);
pos.x = (320 - lg) / 2;
pos.y = 20;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
LoadString(TX_FULL_END2, res, 100);
lg = GetTextWidth(res);
pos.x = (320 - lg) / 2;
pos.y = 40;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
LoadString(TX_FULL_END3, res, 100);
lg = GetTextWidth(res);
pos.x = (320 - lg) / 2;
pos.y = 430;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
LoadString(TX_FULL_END4, res, 100);
lg = GetTextWidth(res);
pos.x = (320 - lg) / 2;
pos.y = 450;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
}
if (m_phase == WM_PHASE_INSERT)
{
DrawTextCenter(TX_INSERT, LXIMAGE / 2, 20);
}
if (m_textToolTips[0] != '\0')
{
DrawTextLeft(m_pPixmap, m_posToolTips, m_textToolTips, FONTWHITE);
}
if (m_phase == WM_PHASE_CLEARGAMER)
{
LoadString(TX_CHOOSEGAMER, res, 100);
lg = GetTextWidth((char*)res, 0);
pos.y = 102;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, (char*)res, 1);
LoadString(TX_DISCARDGAME, res, 100);
lg = GetTextWidth(res, 0);
pos.x = 320 - lg / 2;
pos.y = 210;
DrawTextLeft(m_pPixmap, pos, res, 0);
strcpy(text, m_gamerName);
strcat(text, "?");
lg = GetTextWidth(text, 0);
pos.x = 320 - lg / 2;
pos.y = 230;
DrawTextLeft(m_pPixmap, pos, text, 0);
}
if (m_phase == WM_PHASE_CLEARDESIGN)
{
LoadString(TX_DESIGNMISSION, res, 100);
lg = GetTextWidth(res, 0);
pos.y = 104;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(TX_DELETEMISSION, res, 100);
sprintf(text, res, GetWorld());
lg = GetTextWidth(text, 0);
pos.y = 210;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, text, 0);
strcpy(text, m_pDecor->GetMissionTitle());
if (text[0] == '\0')
{
LoadString(TX_NONAME, res, 100);
}
strcat(text, "?");
lg = GetTextWidth(text, 0);
pos.y = 230;
pos.x = 320 - lg / 2;
string = TX_LASTWIN2;
LoadString(string, res, 100);
pos.x = 60;
pos.y = 443;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
if ((m_phase == WM_PHASE_SETUP) || (m_phase == WM_PHASE_SETUPp))
if (m_phase == WM_PHASE_SETUP || m_phase == WM_PHASE_SETUPp)
{
lg = m_pSound->GetAudioVolume();
i = 1;
@ -2745,153 +2734,220 @@ BOOL CEvent::DrawButtons()
SetState(j + WM_BUTTON7, ((int)m_somethingJoystick == j));
}
}
if (m_phase == WM_PHASE_INFO)
if (m_phase == WM_PHASE_SERVICE)
{
LoadString(TX_DESIGNMISSION, res, 100);
lg = GetTextWidth(res, 0);
pos.y = 37;
pos.x = 320 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 0);
if (m_bDrawMap != FALSE)
LoadString(0xEF, res, 100);
DrawTextLeft(m_pPixmap, POINT(LXIMAGE / 2 - GetTextWidth(res) / 2, 31), res, FONTGOLD);
LoadString(0xF0, res, 100);
DrawTextLeft(m_pPixmap, POINT(140, 79), res, FONTWHITE);
m_nbChoices = m_pNetwork->GetNbProviders();
pos = POINT(190, 122);
for (i = 0; i < m_nbChoices && i < 6; i++)
{
pos.x = 148;
pos.y = 96;
m_pPixmap->DrawIcon(-1, 8, 0, pos, 0, FALSE);
if (m_choicePageOffset + i > m_nbChoices) break;
strncpy(res, m_pNetwork->GetProviderName(m_choicePageOffset + i), 100);
strcpy(res + 45, "...");
DrawTextLeft(m_pPixmap, pos, res, m_choicePageOffset + i == m_choiceIndex ? FONTSELECTED : FONTWHITE);
pos.y += 40;
}
LoadString(TX_MISSNUM, res, 100);
if (m_bPrivate)
m_private = m_private;
else
m_private = m_mission;
sprintf(text, res, m_private);
lg = GetTextWidth(text, 0);
pos.y = 106;
pos.x = 250 - lg / 2;
DrawTextLeft(m_pPixmap, pos, text, 1);
strcpy(text, m_pDecor->GetMissionTitle());
if (text[0] == '\0')
{
LoadString(TX_NONAME, res, 100);
}
lg = GetTextWidth(res, 0);
pos.y = 269;
pos.x = 250 - lg / 2;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
if (m_phase == WM_PHASE_HELP)
if (m_phase == WM_PHASE_SESSION)
{
LoadString(TX_HELP, res, 100);
lg = GetTextWidth(res, 0);
pos.x = LXIMAGE / 2 - lg / 2;
pos.y = 65;
DrawTextLeft(m_pPixmap, pos, res, 1);
lg = 140;
UINT j;
for (j = 601; j < 625; j+= 3)
LoadString(0xF3, res, 100);
DrawTextLeft(m_pPixmap, POINT(LXIMAGE / 2 - GetTextWidth(res) / 2, 31), res, FONTGOLD);
LoadString(0xF4, res, 100);
DrawTextLeft(m_pPixmap, POINT(120, 79), res, FONTWHITE);
m_nbChoices = m_pNetwork->GetNbSessions();
pos = POINT(170, 122);
for (i = 0; i < m_nbChoices && i < 6; i++)
{
if (m_somethingJoystick == NULL)
if (m_choicePageOffset + i > m_nbChoices) break;
strncpy(res, m_pNetwork->GetSessionName(m_choicePageOffset + i), 100);
strcpy(res + 45, "...");
DrawTextLeft(m_pPixmap, pos, res, m_choicePageOffset + i == m_choiceIndex ? FONTSELECTED : FONTWHITE);
pos.y += 40;
}
}
if (m_phase == WM_PHASE_MULTI)
{
LoadString(0xFD, res, 100);
DrawTextLeft(m_pPixmap, POINT(LXIMAGE / 2 - GetTextWidth(res) / 2, 32), res, FONTGOLD);
LoadString(0xFE, res, 100);
DrawTextLeft(m_pPixmap, POINT(130, 82), res, FONTWHITE);
LoadString(0x11E, res, 100);
DrawTextLeft(m_pPixmap, POINT(288, 82), res, FONTWHITE);
LoadString(0x100, res, 100);
DrawTextLeft(m_pPixmap, POINT(80, 301), res, FONTWHITE);
if (m_bDrawMap)
{
m_pPixmap->DrawIcon(-1, CHMAP, 0, POINT(377, 75));
}
LoadString(0xFF, res, 100);
sprintf(res2, res, m_multi);
DrawTextLeft(m_pPixmap, POINT(479 - GetTextWidth(res2), 217), res, FONTWHITE);
pos = POINT(130, 110);
for (i = 0; i < MAXNETPLAYER; i++)
{
if (m_pNetwork->m_players[i].bIsPresent)
{
pos.y = j - 1;
DrawTextLeft(m_pPixmap, pos, m_pNetwork->m_players[i].name, FONTLITTLE);
}
pos.y += 42;
}
pos = POINT(323, 80);
for (i = 0; i < MAXCHAT; i++)
{
if (m_chatZone[i][0] != '\0')
{
DrawText(m_pPixmap, pos, m_chatZone[i], FONTLITTLE);
}
pos.y += DIMLITTLEY;
}
PutTextInputBox(POINT(221, 418));
SetEnable(WM_BUTTON20, m_textInput[0] != '\0');
}
if (m_phase == WM_PHASE_READDESIGN)
{
LoadString(TX_OPENMISS, res, 100);
lg = GetTextWidth(res, 0);
pos.x = 320 - lg / 2;
pos.y = 31;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(TX_CONTENT, res, 100);
pos.x = 190;
pos.y = 79;
DrawTextLeft(m_pPixmap, pos, res, 0);
pos.x = 240;
pos.y = 122;
for (i = 0; i < m_nbChoices && i < 6; i++)
{
if (m_choicePageOffset + i >= m_nbChoices) break;
strncpy(res, m_filenameBuffer[m_choicePageOffset + i], 100);
strcpy(res + 45, "...");
DrawText(m_pPixmap, pos, res, m_choiceIndex == m_choicePageOffset + i ? FONTSELECTED : FONTWHITE);
pos.y += 40;
}
}
if (m_phase == WM_PHASE_WRITEDESIGN)
{
LoadString(0xA1, res, 100);
DrawTextLeft(m_pPixmap, POINT(LXIMAGE / 2 - GetTextWidth(res) / 2, 32), res, FONTGOLD);
LoadString(0xC2, res, 100);
DrawTextLeft(m_pPixmap, POINT(190, 79), res, FONTGOLD);
pos.x = 190;
pos.y = 107;
for (i = 0; i < m_nbChoices && i < 12; i++)
{
if (m_choicePageOffset + i >= m_nbChoices) break;
strncpy(res, m_filenameBuffer[m_choicePageOffset + i], 100);
strcpy(res + 45, "...");
DrawText(m_pPixmap, pos, res, FONTWHITE);
pos.y += DIMTEXTY;
}
}
if (m_phase == WM_PHASE_GREAD || m_phase == WM_PHASE_GREADp || m_phase == WM_PHASE_GWRITE)
{
if (m_phase == WM_PHASE_GWRITE)
{
LoadString(TX_SAVE_CGAME, res, 100);
}
else
{
LoadString(TX_LOAD_CGAME, res, 100);
}
DrawTextLeft(m_pPixmap, POINT(415 - GetTextWidth(res) / 2, 31), res, FONTGOLD);
LoadString(0x10F, res, 100);
DrawTextLeft(m_pPixmap, POINT(280, 78), res, FONTWHITE);
pos.y = 122;
for (i = 0; i < m_nbChoices && i < MAXSAVE; i++)
{
pos.x = 296;
sprintf(res, "%d", i + 1);
DrawTextLeft(m_pPixmap, pos, res, m_choiceIndex == i ? FONTGOLD : FONTWHITE);
// manually split the string into two draw calls if it contains a newline
char* line2 = strchr(m_filenameBuffer[i], '\n');
if (line2)
{
strcpy(res, m_filenameBuffer[i]);
res[line2 - res] = '\0'; // janky. pls verify
pos.x = 330;
pos.y -= DIMTEXTY / 2;
DrawTextLeft(m_pPixmap, pos, res, m_choiceIndex == i ? FONTSELECTED : FONTWHITE);
pos.y += DIMTEXTY;
DrawTextLeft(m_pPixmap, pos, line2 + 1, m_choiceIndex == i ? FONTSELECTED : FONTWHITE);
pos.y += DIMBUTTONY - DIMTEXTY / 2;
}
else
{
pos.y = j;
pos.x = 330;
DrawTextLeft(m_pPixmap, pos, res, m_choiceIndex == i ? FONTSELECTED : FONTWHITE);
pos.y += DIMBUTTONY;
}
}
if (m_choiceIndex >= 0)
{
if (m_bNamesExist[m_choiceIndex])
{
m_pPixmap->DrawIcon(-1, CHMAP, 0, POINT(19, 149));
}
LoadString(pos.y, res, 100);
pos.x = 110;
pos.y = lg;
DrawTextLeft(m_pPixmap, pos, res, 1);
LoadString(j + 1, res, 100);
pos.x = 230;
pos.y = lg;
DrawTextLeft(m_pPixmap, pos, res, 0);
lg += 20;
}
}
if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST)
if (m_phase == WM_PHASE_BYE)
{
if (m_pDecor->GetPause())
{
if (m_pDecor->GetTime() % 20 < 15)
DrawTextCenter(TX_PAUSE, 320, 240, 0);
}
else
{
if (m_bDemoRec)
{
LoadString(TX_DEMOREC, res, 100);
pos.x = 10;
pos.y = 10;
DrawTextLeft(m_pPixmap, pos, res, 1);
}
if (m_bDemoPlay)
{
LoadString(TX_DEMOPLAY, res, 100);
pos.x = 10;
pos.y = 10;
DrawTextLeft(m_pPixmap, pos, res, 1);
}
}
if (m_speed > 1)
{
sprintf(res, "x%d", m_speed);
pos.x = 64;
pos.y = 465;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
}
if (m_phase == WM_PHASE_REGION)
{
LoadString(TX_REGION, res, 100);
lg = GetTextWidth(res, 0);
LoadString(TX_FULL_END1, res, 100);
lg = GetTextWidth(res);
pos.x = 320 - lg / 2;
pos.y = 26;
DrawTextLeft(m_pPixmap, pos, res, 1);
pos.y = 20;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
LoadString(TX_FULL_END2, res, 100);
lg = GetTextWidth(res);
pos.x = 320 - lg / 2;
pos.y = 40;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
LoadString(TX_FULL_END3, res, 100);
lg = GetTextWidth(res);
pos.x = 320 - lg / 2;
pos.y = 430;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
LoadString(TX_FULL_END4, res, 100);
lg = GetTextWidth(res);
pos.x = 320 - lg / 2;
pos.y = 450;
DrawTextLeft(m_pPixmap, pos, res, FONTGOLD);
}
if (m_phase == WM_PHASE_INSERT)
{
DrawTextCenter(TX_INSERT, LXIMAGE / 2, 20);
}
if (m_phase == WM_PHASE_STOP)
if (m_textToolTips[0] != '\0')
{
LoadString(TX_GAMEPAUSE, res, 100);
lg = GetTextWidth(res, 0);
pos.x = 319 - lg / 2;
pos.y = 103;
DrawTextLeft(m_pPixmap, pos, res, 1);
DrawTextLeft(m_pPixmap, m_posToolTips, m_textToolTips, FONTWHITE);
}
if (m_phase == WM_PHASE_LOST || m_phase == WM_PHASE_LOSTDESIGN || m_phase == WM_PHASE_LOSTMULTI)
// now that the decomp is looking convincingly like the retail game,
// we should clearly differentiate the two when sharing WIP screenshots/videos to reduce confusion.
{
LoadString(GetWorld() % 5 + 3100, res, 100);
pos.x = 50;
pos.y = 424;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
if (m_phase == WM_PHASE_WIN || m_phase == WM_PHASE_WINDESIGN || m_phase == WM_PHASE_WINMULTI)
{
LoadString(GetWorld() % 5 + 3000, res, 100);
pos.x = 50;
pos.y = 424;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
if (m_phase == WM_PHASE_LASTWIN)
{
int string;
if (m_bPrivate)
string = 3202;
POINT debugMousePos = GetMousePos();
int debugTextY;
if (debugMousePos.x > LXIMAGE - GetTextWidth("WORK IN PROGRESS") && debugMousePos.x < LXIMAGE && debugMousePos.y < 36 && debugMousePos.y >= 0)
{
debugTextY = 40;
}
else
string = 3201;
LoadString(string, res, 100);
pos.x = 60;
pos.y = 443;
DrawTextLeft(m_pPixmap, pos, res, 0);
}
{
debugTextY = 0;
}
for (i = 0; table[m_index].buttons[i].message != 0; i++)
{
m_buttons[i].Draw();
DrawTextLeft(m_pPixmap, POINT(LXIMAGE - GetTextWidth("DECOMPILATION"), debugTextY), "DECOMPILATION", FONTGOLD);
DrawTextLeft(m_pPixmap, POINT(LXIMAGE - GetTextWidth("WORK IN PROGRESS"), debugTextY + 11), "WORK IN PROGRESS", FONTGOLD);
DrawTextLeft(m_pPixmap, POINT(LXIMAGE - GetTextWidth(__DATE__ " " __TIME__), debugTextY + 22), __DATE__ " " __TIME__, FONTGOLD);
}
///////
return TRUE;
}
@ -3956,36 +4012,6 @@ BOOL CEvent::EventButtons(UINT message, WPARAM wParam, LPARAM lParam)
oldx = m_posToolTips.x;
m_posToolTips.x = -1;
if (m_phase != WM_PHASE_PLAY && m_phase != WM_PHASE_PLAYTEST && table[m_index].buttons[0].message)
{
/* // ????
for (i = 0; i < 2; i++)
{
if (!m_jauges[i].GetHide())
{
uid = 0xFFFFFFF;
if (uid < 0)
{
LoadString(TX_NOTINDEMO + i, m_textToolTips, 50);
lg = GetTextWidth(m_textToolTips);
test.x += (DIMJAUGEX - lg) / 2;
test.y += 4;
m_posToolTips = test;
break;
}
}
}
if (oldx != m_posToolTips.x)
{
for (i = 0; i < 2; i++)
{
m_jauges[i].Redraw();
}
}
*/
}
else
{
i = 0;
while (table[m_index].buttons[i].message != 0)
@ -4335,7 +4361,7 @@ BOOL CEvent::ChangePhase(UINT phase)
m_phase = phase;
m_index = SearchPhase(phase);
if (table[m_index].bUnk && !CheckWorld1())
if (table[m_index].bLocked && !CheckWorld1())
{
m_tryInsertCount = 40;
m_tryPhase = m_phase;
@ -4620,15 +4646,77 @@ BOOL CEvent::ChangePhase(UINT phase)
m_choicePageOffset = 0;
m_choiceIndex = 0;
SetHide(WM_BUTTON10, TRUE);
// ...
SetHide(WM_BUTTON11, m_choicePageOffset + 6 >= (m_nbChoices + 5) / 6 * 6);
for (i = 0; i < 6; ++i)
{
if (m_choicePageOffset + i >= m_nbChoices)
{
SetHide(WM_BUTTON1 + i, TRUE);
}
else
{
SetHide(WM_BUTTON1 + i, FALSE);
SetState(WM_BUTTON1 + i, m_choicePageOffset + i == m_choiceIndex);
}
}
SetEnable(WM_PHASE_DP_DOSERVICE, m_nbChoices != 0);
}
if (m_phase == WM_PHASE_SESSION)
{
// ...
m_nbChoices = m_pNetwork->GetNbSessions();
m_choicePageOffset = 0;
m_choiceIndex = 0;
SetHide(WM_BUTTON10, 1);
SetHide(WM_BUTTON11, m_choicePageOffset + 6 >= (m_nbChoices + 5) / 6 * 6);
for (i = 0; i < 6; ++i)
{
if (m_choicePageOffset + i >= m_nbChoices)
{
SetHide(WM_BUTTON1 + i, TRUE);
}
else
{
SetHide(WM_BUTTON1, FALSE);
SetState(WM_BUTTON1 + i, m_choicePageOffset + i == m_choiceIndex);
}
}
SetEnable(WM_PHASE_DP_JOIN, m_nbChoices != 0);
}
if (m_phase == WM_PHASE_MULTI)
{
// ...
m_bDrawMap = m_pDecor->Read(m_gamer, m_multi + 200, 0);
for (i = 0; i < MAXNETPLAYER; i++)
{
m_pNetwork->m_players[i].bIsPresent = FALSE;
}
if (m_pNetwork->IsHost())
{
m_pNetwork->m_players[0].bIsPresent = TRUE;
m_pNetwork->m_players[0].ready = FALSE;
m_pNetwork->m_players[0].dpid = m_pNetwork->m_dpid;
m_pNetwork->m_players[0].team = 0;
strncpy(m_pNetwork->m_players[0].name, m_gamerName, 20);
m_pNetwork->m_players[0].name[19] = '\0';
}
else
{
char data[28];
data[0] = 28;
data[1] = MESS_2;
*&data[4] = m_pNetwork->m_dpid;
strncpy(data + 8, m_gamerName, 20);
m_pNetwork->Send(data, 28, 1);
}
if (m_bDrawMap)
{
DrawMap();
}
NetAdjustLobbyButtons();
ChatFlush();
m_textHiliStart = 0;
m_textInput[0] = 0;
m_textCursorIndex = 0;
m_textHiliEnd = strlen(m_textInput);
}
if (m_phase == WM_PHASE_CREATE)
{

View File

@ -24,7 +24,7 @@ typedef struct
UINT phase;
char backName[36];
BOOL bCDrom;
BOOL bUnk;
BOOL bLocked;
Button buttons[MAXBUTTON];
}
Phase;
@ -310,7 +310,6 @@ protected:
int m_nbChoices;
int m_0008;
int m_6D30;
//BOOL m_b6D34;
int m_96B4;
int m_nbVies;
};

View File

@ -61,16 +61,6 @@ static short table_button_icon[] =
106, // fabarmure
};
void GetText(int rank, char *pBuffer, int lgBuffer)
{
LoadString(TX_ACTION_GO+rank, pBuffer, lgBuffer);
}
void GetErr(int rank, char *pBuffer, int lgBuffer)
{
LoadString(TX_ERROR_MISC+rank, pBuffer, lgBuffer);
}
/////////////////////////////////////////////////////////////////////////////
CMenu::CMenu()

View File

@ -38,7 +38,7 @@ static BOOL EnumProvidersCallback(LPGUID lpguidSP, LPSTR lpSPName,
NamedGUID* lpGuid;
if (lpContext->nb < MAXSESSION)
{
lpGuid = lpContext->pList[lpContext->nb];
lpGuid = &(*lpContext->pList)[lpContext->nb];
lpGuid->guid = *lpguidSP;
strcpy(lpGuid->name, lpSPName);
lpContext->nb++;
@ -73,7 +73,7 @@ int CNetwork::GetNbProviders()
char* CNetwork::GetProviderName(int index)
{
if (index >= m_providers.nb) return NULL;
return m_providers.pList[index]->name;
return (*m_providers.pList)[index].name;
}
BOOL CNetwork::CreateProvider(int index)
@ -112,7 +112,7 @@ static BOOL EnumSessionsCallback(LPDPSESSIONDESC2 lpThisSD,
if (lpContext->nb < MAXSESSION)
{
lpGuid = lpContext->pList[lpContext->nb];
lpGuid = &(*lpContext->pList)[lpContext->nb];
lpGuid->guid = lpThisSD->guidInstance;
strcpy(lpGuid->name, lpThisSD->lpszSessionNameA);
lpContext->nb++;
@ -144,10 +144,16 @@ BOOL CNetwork::EnumSessions()
return TRUE;
}
int CNetwork::GetNbSessions()
{
return m_sessions.nb;
}
char* CNetwork::GetSessionName(int index)
{
if (index >= m_sessions.nb) return NULL;
return m_sessions.pList[index]->name;
return (*m_sessions.pList)[index].name;
}
BOOL CNetwork::JoinSession(int index, char* pPlayerName)

View File

@ -41,11 +41,12 @@ public:
~CNetwork();
BOOL EnumProviders();
BOOL GetNbProviders();
int GetNbProviders();
char* GetProviderName(int index);
BOOL CreateProvider(int index);
void FreeProviderList();
BOOL EnumSessions();
int GetNbSessions();
char* GetSessionName(int index);
BOOL JoinSession(int index, char* pPlayerName);
void FreeSessionList();

View File

@ -953,7 +953,7 @@ BOOL CPixmap::CacheAll(BOOL cache, HWND hWnd, BOOL bFullScreen, BOOL bTrueColor,
return FALSE;
}
OutputDebug("Image:_init\n");
OutputDebug("Image: init\n");
if (BackgroundCache(0, "init.blp", totalDim, iconDim, TRUE) == FALSE)
{
return FALSE;

View File

@ -4,119 +4,7 @@
//
#pragma once
#define TX_ACTION_GO 1
#define TX_ACTION_STOP 2
#define TX_ACTION_MANGE 3
#define TX_ACTION_CARRY 4
#define TX_ACTION_DEPOSE 5
#define TX_ACTION_ABAT 6
#define TX_ACTION_ROC 7
#define TX_ACTION_CULTIVE 8
#define TX_ACTION_BUILD1 9
#define TX_ACTION_BUILD2 10
#define TX_ACTION_BUILD3 11
#define TX_ACTION_BUILD4 12
#define TX_ACTION_BUILD5 13
#define TX_ACTION_BUILD6 14
#define TX_ACTION_MUR 15
#define TX_ACTION_PALIS 16
#define TX_ACTION_ABATn 17
#define TX_ACTION_ROCn 18
#define TX_ACTION_PONT 19
#define TX_ACTION_TOUR 20
#define TX_ACTION_BOIT 21
#define TX_ACTION_LABO 22
#define TX_ACTION_FLEUR 23
#define TX_ACTION_FLEURn 24
#define TX_ACTION_DYNAMITE 25
#define TX_ACTION_BATEAU 26
#define TX_ACTION_DJEEP 27
#define TX_ACTION_DRAPEAU 28
#define TX_ACTION_EXTRAIT 29
#define TX_ACTION_FABJEEP 30
#define TX_ACTION_FABMINE 31
#define TX_ACTION_FABDISC 32
#define TX_ACTION_REPEAT 33
#define TX_ACTION_QARMURE 34
#define TX_ACTION_FABARMURE 35
#define TX_IONAMEEX 100
#define TX_IOFREE 101
#define TX_OWNMISSION 102
#define TX_TESTMISSION 103
#define TX_BUTTON_JOUER 104
#define TX_BUTTON_APPRENDRE 105
#define TX_BUTTON_QUITTER 106
#define TX_BUTTON_PREVP 107
#define TX_BUTTON_NEXTP 108
#define TX_BUTTON_PLAYP 109
#define TX_BUTTON_BUILDP 110
#define TX_BUTTON_TERM 111
#define TX_BUTTON_READP 112
#define TX_BUTTON_WRITEP 113
#define TX_BUTTON_CANCELP 114
#define TX_BUTTON_CONTP 115
#define TX_BUTTON_REPEAT 116
#define TX_CHOOSEPLAYER 117
#define TX_PLAYERSNAME 118
#define TX_BUTTON_TERMC 119
#define TX_CHOOSESIZE 120
#define TX_BUTTON_HVSCROLL 121
#define TX_BUTTON_ONLYHSCROLL 122
#define TX_BUTTON_ONLYVSCROLL 123
#define TX_BUTTON_TESTMISSION 124
#define TX_PAUSE 125
#define TX_CLEARPLAYER 127
#define TX_SETTINGS 128
#define TX_BUTTON_SETUP1 130
#define TX_BUTTON_SETUP2 131
#define TX_BUTTON_SETUP3 132
#define TX_BUTTON_SETUP4 133
#define TX_BUTTON_REGION 144
#define TX_DISCARDGAME 145
#define TX_DESIGNMISSION 147
#define TX_CHOOSEGAMER 148
#define TX_MUSIC 149
#define TX_BUTTON_SETUP5 154
#define TX_BUTTON_SETUP6 155
#define TX_BUTTON_SETUP7 156
#define TX_BUTTON_SETUP8 157
#define TX_READINFO 167
#define TX_CONFIRM 174
#define TX_CANCEL 175
#define TX_YES 176
#define TX_NO 177
#define TX_REGION 178
#define TX_BUTTON_SETUP 180
#define TX_INSERT 182
#define TX_DELETEMISSION 184
#define TX_NONAME 187
#define TX_DESIGN 188
#define TX_MISSIONNUM 189
#define TX_SINGLEPLAYER 195
#define TX_MUTLIPLAYER 196
#define TX_GAMEPAUSE 197
#define TX_FULL_END1 203
#define TX_FULL_END2 204
#define TX_FULL_END3 205
#define TX_FULL_END4 206
#define TX_BUTTON_SKILL 209
#define TX_BUTTON_DEMO 212
#define TX_DEMOREC 213
#define TX_DEMOPLAY 214
#define TX_SHOWNEXT 241
#define TX_SHOWCONNECTION 242
//#define TX_SHOWNEXT 245
#define TX_SHOWPREV 246
#define TX_GAMEJOIN 247
#define TX_CREATE_MULTIGAME 248
#define TX_UPDATELIST 249
#define TX_MULTI_CREATE 250
#define TX_MULTI_GNAME 251
#define TX_OPEN 264
#define TX_LOAD_CGAME 269
#define TX_SAVE_CGAME 270
#define TX_GAMESAVED 288
#define TX_NOTINDEMO 289
#define TX_IONAMEEX 100
#define TX_IOFREE 101
#define TX_OWNMISSION 102

View File

@ -74,7 +74,7 @@ int GetCharWidth(char c, int font)
}
// Affiche un texte.
/*
void DrawText(CPixmap *pPixmap, POINT pos, char *pText, int font)
{
int rank;
@ -100,36 +100,53 @@ void DrawText(CPixmap *pPixmap, POINT pos, char *pText, int font)
pos.x += GetCharWidth(*pText++, font);
}
}
}
}*/
void DrawTextLeft(CPixmap* pPixmap, POINT pos, char *text, int font)
void DrawText(CPixmap* pPixmap, POINT pos, char *pText, int font)
{
DrawText(pPixmap, pos, text, font);
return;
char c;
c = *pText;
while (c != '\0') {
pText ++;
DrawChar(pPixmap, &pos, c, font);
c = *pText;
}
}
void DrawTextLeft(CPixmap* pPixmap, POINT pos, char *pText, int font)
{
DrawText(pPixmap, pos, pText, font);
}
//Implement later
void DrawChar(CPixmap* pPixmap, POINT* pos, char c, int font)
{
POINT pos0;
POINT pos1;
int width;
UINT index;
index = (UINT)(BYTE)c;
unsigned index;
index = c;
pos0.y = table_char[index * 6 + 2] + pos->y;
pos0.x = table_char[index * 6 + 1] + pos->x;
DrawCharSingle(pPixmap, pos0, table_char[index * 6], font);
if (table_char[index * 6 + 3] != -1)
{
pos1.y = table_char[index * 6 + 4] + pos->y;
pos1.x = table_char[index * 6 + 5] + pos->x;
DrawCharSingle(pPixmap, pos1, table_char[index * 6 + 3], font);
}
pos->x += GetCharWidth(c, font);
}
void DrawCharSingle(CPixmap pPixmap, POINT pos, char* pText, int font)
void DrawCharSingle(CPixmap* pPixmap, POINT pos, int rank, int font)
{
if (font == FONTLITTLE)
{
pPixmap.DrawIcon(-1, CHLITTLE, (int)pText, pos, 0, FALSE);
pPixmap->DrawIcon(-1, CHLITTLE, rank, pos, 0, FALSE);
return;
}
pPixmap.DrawIcon(-1, CHTEXT, (int)(pText + font * 128), pos, 0, FALSE);
return;
pPixmap->DrawIcon(-1, CHTEXT, (int)(rank + font * 128), pos, 0, FALSE);
}
// Affiche un texte pench<63>.

View File

@ -4,7 +4,7 @@
#define FONTWHITE 0
#define FONTGOLD 1
#define FONTSLIM 2
#define FONTSELECTED 2
#define FONTLITTLE 10
typedef struct
@ -28,10 +28,10 @@ extern
void DrawTextNew(CPixmap *pPixmap, POINT pos, char* pText, int font);
extern
void DrawChar(CPixmap* pPixmap, POINT pos, char* pText, double size);
void DrawChar(CPixmap* pPixmap, POINT* pos, char c, int font);
extern
void DrawCharSingle(CPixmap* pPixmap, POINT pos, int rank, double size);
void DrawCharSingle(CPixmap* pPixmap, POINT pos, int rank, int font);
extern
void DrawTextNew(CPixmap* pPixmap, POINT pos, char* pText, int font);