-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
dr.c
17292 lines (16142 loc) · 544 KB
/
dr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include <SDL.h>
#include <SDL_joystick.h>
#include <SDL_stdinc.h>
#include <SDL_opengl.h>
#include <math.h>
#include "ui/util/anim.h"
#include "ui/mainScreen.h"
#include "ui/startGameScreen.h"
#include "ui/endGameScreen.h"
#include "ui/creditsScreen.h"
#include "ui/prevRaceScreen.h"
#include "ui/raceResultsScreen.h"
#include "ui/shopScreen.h"
#include "asset/bpaUtil.h"
#include "ui/util/menus.h"
#include "imageUtil.h"
#include "graphics.h"
#include "ui/util/raceResults.h"
#include "race/pedestrian.h"
#include "defs.h"
#include "race/powerup.h"
#include "sfx/sound.h"
#include "race/terrain.h"
#include "race/3dSystem.h"
#include "race/leftBar.h"
#include "race/endFlag.h"
#include "i18n/i18n.h"
#include "i18n/i18n.h"
#include "mod/mod.h"
#include "config.h"
#include "cars.h"
#include "drivers.h"
#include "circuit.h"
#include "variables.h"
#include "ui/util/popup.h"
#include <stdio.h>
#include <stdlib.h>
#include "util.h"
#include "savegame.h"
#include "raceParticipant.h"
#include "sfx/soundEffects.h"
#include "ui/hallOfFame.h"
#include "ui/blackMarketScreen.h"
#include "race/3dSystem.h"
#include "race/lightSystem.h"
#include "dr.h"
#include <string.h>
//-------------------------------------------------------------------------
// Function declarations
int debug=1;
void *Memory;
int dword_456B9C;
int dword_456730;
const int INITIAL_MONEY=495; ///cambiar a 495
//char letterSpacing_4458B0 = '\x10'; // weak
//int screenSurface; // weak
int palette[256]; // weak //dword_45E600
SDL_Surface * screenSurface; // weak
int dword_45F054; // idb
int dword_45F050; // idb
char byte_462D50=2; // weak //CHECK INTRO LO SETEA A 2
float arrayDamageMultiplier[7] ={0.2,0.35,0.5,0.65,0.8,0.95,0.95};
__int16 word_461ED4; // weak
#define ADS 256;
#define __thiscall // Test compile in C mode
int drawTransparentBlock(int a1, int a2, int a3, int a4);
int initParticipantValues_401060();
void allocateMemory(size_t Size);
void free(void* Memory);
int updateRacePositions();
int sub_4022A0();
unsigned int writeTextInRace_402510(int a1, const char* a2);
int drawSprite_402590(int a1, int a2, int a3, signed int a4, int a5, int a6, int a7, int a8);
//void __noreturn errorExitScreen(int a1);
signed int loadCircuitPalette();
void loadCircuitImages1();
int loadCarsImages();
//void parseCircuitSceFile_403190();
int loadCircuitTabFiles();
int loadCircuitDatFiles();
void loadCircuitShadows();
void loadEngineGraphics();
void loadEngineGraphics2();
int noMemExitScreen();
char* sub_404730();
int drawToBlackScreen();
int setCircuitPalette_4B4020();
int setCircuitPaletteBis_4B4020();
int setCircuitPaletteTransitionToBlack_4B4020();
int sub_404C30();
int sub_405430();
int sub_4055A0();
char drawRacepopupEffect_406100();
int sub_406330();
unsigned int drawTextInRaceScreen(int a1, int a2, const char* a3);
signed int racePauseMenu_4064A0(int a1);
unsigned int drawInRaceMenuText_4072C0(int a1, const char* a2);
int keyMenuInRace_407330();
void __noreturn exitCtrlAltDel();
int makeSnapshot_4092B0();
int initRaceValues_409A90();
signed int loadCircuitInfFile();
unsigned __int64 setCircuitPaletteValues(int a1, float a2, float a3, float a4);
int* initRaceValues_409F90();
//int processSceFile_40A360();
//int calculateSceTextureStructure_40A880();
int calculateCircuitReversed_40A9A0();
int calculateIAMovements_40AFC0();
int balanceIAEngineInRace_40B920();
void calculateUserMovements_40BAB0();
int recalculateRaceCarWithOrientation();
int recalculateCircuitImageOffset_40D560();
//void recalculatePolygonsInScreeenPosition_40D6B0();
int drawCarInRace_40D920();
int shotAction_40E180();
int drawGunFlames_40E960();
int drawShots_40EBC0();
// int __usercall showSmoke_40F070@<eax>(int result@<eax>);
int drawRocket_40F450();
int drawMine_40F6A0();
int drawExplosion_40FE20();
int killPedestrian_410FA0();
//char drawShotPedestrian_4111F0();
//int sub_411530();
//void draw3dElements_4116D0();
int recalculateCarBoundary_411D10();
int checkVaiZones_412DF0();
void refreshRacePositions_413300();
int recalculateRacePositions_413380();
int sub_413500();
signed int checkPokes_4136C0();
void sub_4138A0();
int drawDebugInfo();
int raceSemaphore_414FC0();
void loadRaceImagesHUD();
//int sub_4156B0();
void startRace(int a1, int a2);
int configJoystick(void); // weak
char eventDetected();
char sub_418090();
int transformJoystickReadValue_418150();
int setPaletteValueWithFloats(double, double, double); // idb
int sub_418B00(float, float, float); // idb
int loadPaletteMenu();
signed int isVesaCompatible();
void refreshBottomScreen();
void refreshAllScreen();
char sub_41E8D0();
int sub_41ED20(float, float, float); // idb
void loadGraphics3();
void freeMemoryGraphics3();
int drawBorder_421980(int a1, int a2, int a3, int a4);
signed int hasInsuficientMoneyToBuy(int a1);
int sub_4220D0();
signed int autoLoadSave();
int sub_4224E0();
int copyPalette1toPalette(void); // weak
int sub_423C90(int a1, int a2);
void recalcRank(int a1);
int sub_424510(int a1, int a2, int a3);
signed int drawCircuitPreviewImage();
int sub_426460(unsigned __int8 a1, unsigned __int8 a2);
int transitionToCurrentImage();
int transitionToBlack();
//int checkIntro(void); // weak
int sub_429CF0(unsigned __int8* a1, signed int a2);
int makeSnapshot_429DC0();
void __noreturn exitGame();
int sub_42A480();
void refreshAndCheckConnection_42A570();
char sub_42C4A0();
char sub_42C560(int a1);
char drawPopupCursor_42C780();
int sub_42C7F0(int a1, int a2, int a3, int a4, int a5, int a6);
void showEndAnim_4312D0();
// int __usercall adversaryPreviewScreen@<eax>(const char **a1@<ebx>);
void __noreturn exitGame_43ACB0();
int sub_43AE80(int a1, int a2, int a3, int a4);
char drawCarSprite_43AEC0(int a1, int a2, int a3);
//char drawPedestrian_43AF30(int a1, int a2, int a3);
char drawCarFire_43AFC0(int a1, int a2, int a3);
int sub_43B030(int a1, int a2);
int sub_43B050(int a1, signed int a2);
int sub_43B080(int a1, int a2, int a3, int a4, int a5);
void copyBuffer2Screen(void* a1, const void* a2, int a3);
int extractBits(int a1, signed int a2, int a3);
int drawInRaceImageToBuffer_43B160(int a1, int a2, int a3, int a4);
int drawRaceCharInMenu_43B1A0(int a1, int a2, int a3, int a4);
int drawCharInRaceScreen(int a1, int a2, int a3, int a4);
int drawImageInRace_43B240(int a1, int a2, int a3, int a4);
int colorToPaletteEntry(int a1, signed int a2);
int convertColorToPaletteColor(int a1, int a2);
int sub_43B2D0();
int sub_43B2E0();
//int draw3dTexture_43B2F0(int a1, int a2, int a3, int textureId);
int sub_43B370(int a1, int a2, int a3);
void SetVideoMode(int fullScreen);
int refreshScreen(int a1);
int setWindowCaption3(int a1);
int setWindowCaption2();
int setWindowCaption();
int setRaceWindowCaption();
int sub_43BFE0(int a1, int a2);
int setPaletteValue(int a1, int a2, int a3, int a4);
int setPaletteAndGetValue(unsigned __int8 a1, unsigned __int8 a2, char a3, unsigned __int8 a4);
int regenerateRacePalette(int a1);
int generateSnapshotData_43C160(int a1);
#ifndef PORTABILITY
int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
#endif
#ifdef PORTABILITY
int main(int argc, char* argv[]);
#endif
int sub_43C450(int a1);
__int16 convert320to320_43C470(int a1, int a2);
__int16 conver512to320_43C490(int a1, int a2);
int sub_43C4B0();
//void operator delete(size_t Size);
void free(void* Memory);
void logJoystickClose();
// int __usercall inicializeScreen@<eax>(double a1@<st0>);
signed int SDLCheckJoystick();
void nullsub_1();
void removeBackgroundRefreshFunction_43C730();
signed __int64 recalculateSDLTicks_43C740();
int refreshScreenWithDelay();
int (*setBackgroundRefreshFunction_43C7B0(int (*a1)(void)))(void);
int updateScreenPtr(int a1);
int sub_43C7E0(int a1, int a2, int a3, signed int a4, char a5);
int refreshOrExecuteBackgroundFunction_43C850(void); // weak
int callRefreshOrExecuteBackgroundFunction_43C8F0();
SDL_Joystick* SDLConfigureJoystick();
void decryptTexture(int a1, int a2, int a3, int a4);
void copyImageToBuffer(int a1, int a2);
unsigned int waitTwoSeconsAndExecFunc_43CBB0();
int sub_43D050(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9);
//int iluminateTriangle_43D530(int a1, int a2, int a3, int a4, int a5, int a6, int a7);
int waitWithRefresh();
void sub_43FC72();
void sub_43FCB6();
int sub_43FD12();
// int __usercall initSystem@<eax>(double st7_0@<st0>, int a1, const char **a2);
int logError(int a1, int a2);
int outOfMemoryError(void); // weak
void generateExitError();
#ifndef PORTABILITY
int sub_43FF90(int* a1, int a2);
#endif
//-------------------------------------------------------------------------
// Data declarations
FILE iob[1024];
const unsigned __int16 pctype[256];
int _mb_cur_max;
char dukeNukemName[12] = "DUKE NUKEM"; // weak //DUKE
char a12000[7] = "$12000"; // weak
char a750[5] = "$750"; // weak
//int dword_443798 = 1768841587; // weak
//char dword_443798[10] = "SANIM.haf"; // weak //cambiado porque es este el nombre del fichero
char aStartANewGame[17] = "Start A New Game"; // weak
char aIswaitingForYo[43] = " is waiting for you to join the next race.";
//int dword_443C34 = 1633971813; // weak
BYTE unk_443C40[] = { 0x7f,0,0,0 }; // weak
//_UNKNOWN unk_443C40; // weak
int initialVelocity = 55; //
//int dword_443FB8 = 1633971813; // weak
char aCRemedyEnterta[57] = " (c)Remedy Entertainment - http://www.remedygames.com"; // weak
_UNKNOWN unk_444540; // weak
_UNKNOWN unk_444548; // weak
int raceEffectiveWidth_445010 = 320; // weak
int raceEffectiveHalfWidth_445014 = 100; // weak
int raceEffectiveHeight_445018 = 200; // weak
int raceEffectiveHalfHeight_44501C = 100; // weak
int raceMusicEnabled_445020 = 1; // weak
int raceEffectsEnabled_445024 = 1; // weak
int raceShowLeftPanel_445028 = 1; // weak
int raceShowTextures_44502C = 1; // weak
int raceShowShadows_445030 = 1; // weak
int dword_445034 = 163840; // weak
int dword_4AA924 = 0;
/*char dword_4A9160[]= { '\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0',
'\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0','\x0',
'\x0','\x0','\x0','\x0','\x0','\x0','\x0E','\x0A','\x0','\x0','\x0','\x0','\x0D','\x8','\x0','\x0',
'\x0','\x0','\x0D','\x8','\x0','\x0','\x0','\x0','\x7','\x5','\x0','\x0','\x0','\x0','\x0E','\x8'
};*/
/***contiene los nomrbe de los coches para los ficheros bpk*/
//char aKupla[6] = "KUPLA"; // weak
int dword_44509C = 1063675494; // weak
int dword_4450A0 = 1065353216; // weak
_UNKNOWN unk_4450A8; // weak
char byte_44512A = '\x03'; // weak
//para efectos de sonido
int dword_44518C = 152832; // weak
int dword_445190 = 163840; // weak
int dword_445194 = 163840; // weak
int dword_445198 = 163840; // weak
int dword_4451A0 = 163840; // weak
int dword_4451A4 = 163840; // weak
int dword_4A6AD0;
//_UNKNOWN unk_4455B0; // weak
int useWeapons = 1; // weak
int dword_4456E8 = 10000; // weak
int dword_445724 = 0; // weak
//contiene para cada menu de 9 posiciones si esta activa o no la entrada
//char byte_4457EF[] = { '\0' }; // weak
//char menuActive_4457F0[] = { '\x01' }; // weak
//todo esto sobra pero hay referencias que tunear
//char byte_4457F1 = '\0'; // weak
//char byte_4457F9[] = { '\x01' }; // weak
//char byte_4457FA = '\0'; // weak
//char byte_4457FB = '\0'; // weak
//char byte_4457FD = '\0'; // weak
//char byte_445802 = '\0'; // weak 18
//char byte_445803 = '\0'; // weak
//char byte_445804 = '\x01'; // weak 20
///char byte_445805 = '\x01'; // weak
//char byte_445806 = '\x01'; // weak
//char byte_445807 = '\x01'; // weak
//char byte_445808 = '\x01'; // weak//24
//char byte_44580B[] = { '\x01' }; // weak ///27 10 es 32, 1a 42,1d 45
//char byte_44581D[] = { '\x01' }; // weak
//char byte_445826[] = { '\x01' }; // weak 20 es 48 26 54
//char byte_44582A[] = { '\x01' }; // weak //2a es 58
//char byte_445838[] = { '\x01' }; // weak //38 es 72
//char byte_4458B1 = '\x10'; // weak
//char byte_4458E7[] = { '\v' }; // weak
//char byte_44590A[] = { '\n' }; // weak
//char byte_445911 = '\v'; // weak
//char byte_445914 = '\x10'; // weak
//char byte_445915 = '\r'; // weak
//char byte_445916 = '\x0E'; // weak
// esto sirve para hall of fame_UNKNOWN unk_445928; // weak
char aStartRacing[13] = "Start Racing"; // weak
char aStartANewGam_0[17] = "Start A New Game"; // weak
char aGamepadDisable[50] = "Gamepad Disabled"; // weak
//int dword_4A7DC0;//este no venia
//int dword_4A7DBC;//este no venia
//_UNKNOWN unk_446DC2; // weak
//aqui empiezan los datos de los coches :)
//int dword_44E5F0[] = { 1 }; // weak
//int dword_44E5F4[] = { 2 }; // weak
//int dword_44E5F8[] = { 1 }; // weak
//int dword_44E5FC = 1000; // idb
//int dword_44E600 = 0; // idb
//int dword_44E60C = 500; // idb
//int dword_44E610 = 1000; // idb
//int dword_44E61C = 200; // idb
//int dword_44E620 = 0; // idb
//int dword_44E62C[] = { 45 }; // weak
///hasta aqui son datos de los coches :)
//int dword_44DF5C[440 * 6];
//int dword_44DF5C = 500; // idb //puntero al precio del coche +440 para el siguiente
//char byte_45673D = '\a'; // weak/
//char byte_45673E[] = { '\x05' }; // weak
//char byte_45673F = '\x03'; // weak
//char byte_456741[] = { '\x02' }; // weak
int dword_456754 = 511; // weak
int raceDrivers_456758 = 2; // idb
/*int dword_456780 = 4294967295; // weak
int dword_456784 = 4294967295; // weak
int dword_456788 = 4294967295; // weak*/
char aTshape01[9] = "TSHAPE01"; // weak
_UNKNOWN unk_456848; // weak
_UNKNOWN unk_4568D8; // weak
char aSanim_haf[10] = "SANIM.HAF"; // weak
_UNKNOWN unk_4569F0; // weak
GLfloat x = 1.0; // idb
GLfloat y = 1.0; // idb
char aWinmainError[16] = "WinMain() error"; // weak
char aSS[] = "%s: %s\n"; // idb
char aFatalError[12] = "Fatal Error"; // weak
char aOutOfMemoryAbo[25] = "Out of memory - aborting"; // weak
char LibFileName[] = "DDRAW.DLL"; // idb
int leftMenuInRaceWidth_456AA0 = 0; // weak
int mushroomTaken_456AA4 = 0; // weak
int isCircuitReversed_456AA8 = 0; // weak
int consecutiveFramesUsingRocket_456AAC = 0; // weak
int pokeDamageSelected_456AB0 = 0; // weak
int pokeWeaponsSelected_456AB4 = 0; // weak
int pokeTurboSelected_456AB8 = 0; // weak
int circuitImageOffsetX_456ABC = 0; // weak //offest x del a imagen del circuito
int circuitImageOffsetY_456AC0 = 0; // weak //offset y de la imagen del circuito
int isRaceFinish_456AC8 = 0; // weak
int totalRacesFrame_456ACC = 0; // weak
int dword_456AD0 = 0; // weak
int raceSemaphorePosition_456AD4 = 0; // weak
int rallyGoSoundPlayed_456AD8 = 0; // weak
int criticalDamageSoundPlayed_456ADC = 0; // weak
int criticalDamage2SoundPlayed_456AE0 = 0; // weak
int isLapRecord_456AE4 = 0; // weak
int dukeNukemEndRaceSoundPlayed_456AE8 = 0; // weak
int dword_456AF4 = 0; // weak
int dword_456AF8 = 0; // weak
int dword_456AFC = 0; // weak
char byte_456B00 = '\0'; // weak
char byte_456B01 = '\0'; // weak
int dword_456B04 = 0; // weak
int dword_456B08 = 0; // weak
int dword_456B0C = 0; // weak
int isDemo_456B10 = 0; // weak
int dword_456B1C = 0; // weak
int dword_456B28 = 0; // weak
int dword_456B2C = 0; // weak
int dword_456B30 = 0; // weak
int dword_456B34 = 0; // weak
int userRacePosition_456B50 = 0; // weak
int dword_456B58 = 0; // weak
int dword_456B60 = 0; // weak
int dword_456B64 = 0; // weak
int dword_456B6C = 0; // weak
int framesToWaitAfterBuy_456B70 = 0; // weak
int showWelcomePopup_456B74 = 0; // weak
int showUndergroundPopup_456B78 = 0; // weak
int showMediumWarningRace = 0; // weak
int showHardWarningRace = 0; // weak
int undergroundPricesSet_456B84 = 0; // weak
//circuito seleccionado de los tres
int selectedRaceId = 0; // weak
int consecutiveWins_456BA8 = 0; // weak
int noPaintJob_456BAC = 0; // weak
int allCarsCrash_456BB0 = 0; // weak
int drugQuest_456BB4 = 0; // weak
int killOneQuest_456BB8 = 0; // weak
int killQuestDriverId_456BBC = 0; // weak
int lapped_456BC0 = 0; // weak
int useHasMorePoints_456BC4 = 0; // weak
int dword_456BD0 = 0; // weak
int dword_456BD4 = 0; // weak
int dword_456BD8 = 0; // weak
int userLasRacePriceIncome_456BDC = 0; // weak
int userLastRaceIncomeNoPrice_456BE0 = 0; // weak
int screenPtr = 0; // weak dword_456BF0
int screenPtr_456BF4 = 0; // weak
int dword_456BF8 = 0; // weak
int dword_456BFC = 0; // weak
int (*dword_456C00)(void) = NULL; // weak
int glResolution_456C14 = 0; // weak
int lastDrawSDLTick_456C18 = 0; // weak
GLvoid *pixels = NULL; // idb
SDL_Joystick *sldJoystick_456C20; // weak
int dword_456C28 = 0; // weak
int sdlTicks14 = 0; // weak
//int dword_456C44 = 0; // weak
//int dword_456C48 = 0; // weak
//int dword_456C4C = 0; // weak
//int dword_456C50 = 0; // weak
//int dword_456C54 = 0; // weak
//int dword_456C58 = 0; // weak
//int dword_456C5C = 0; // weak
int dword_456BA0 = 0; // weak
int dword_456BA4 = 0; // weak
//int mix_volumerampsteps_456C94 = 0; // weak
//float mix_1overvolumerampsteps_456C98 = 0.0; // weak
//FSOUND_CHANNEL FSOUND_Channel_456CC0; // weak
//_UNKNOWN unk_456CC0; // wea
_UNKNOWN unk_456CF4; // weak
_UNKNOWN unk_4582C0; // weak
//int FSOUND_Software_RealBlock; // weak
//FMUSIC_CHANNEL FMUSIC_Channel_45C4E0; // weak
//int dword_45C4E4[256]; // weak //esto tiene la direccion de memoria 456CC0
_UNKNOWN unk_45C4F4; // weak
_UNKNOWN unk_45C546; // weak
_UNKNOWN unk_45DAC0; // weak
int screenColors; // weak ///dword_45DC28
int screenHeight; // weak // dword_45E060
int screenWidth; // weak //dword_45E068
//son los caracteres pulsados en el teclado
char keysRead_45E0C0[256]; // weak//
//char keysRead_45E0C0[KEY_TAB]; // weak //parece cuando tocas tab
//char keysRead_45E0C0[KEY_Y]; // weak
//char keysRead_45E0C0[KEY_P]; // weak
//char keysRead_45E0C0[KEY_ENTER]; // weak
//char keysRead_45E0C0[KEY_N]; // weak
//char byte_45E0FB; // weak//f1/
//char keysRead_45E0C0[KEY_F2]; // weak
//char keysRead_45E0C0[KEY_F3]; // weak
//char keysRead_45E0C0[KEY_F4]; // weak
//char keysRead_45E0C0[KEY_F5]; // weak
//char keysRead_45E0C0[KEY_UP]; // weak
//char keysRead_45E0C0[KEY_LEFT]; // weak
//char keysRead_45E0C0[KEY_RIGHT]; // weak
//char keysRead_45E0C0[KEY_DOWN]; // weak
//char keysRead_45E0C0[KEY_F12]; // weak
char byte_45E15C; // weak
char byte_45E188; // weak
char byte_45E18B; // weak
char byte_45E18D; // weak
char byte_45E190; // weak
//creo que define si es multiplayer o no
int isMultiplayerGame; // weak
//dword_45EA04
int dword_45EA0C; // weak
char *Str2; // idb
/*int dword_45EA24; // weak
int dword_45EA28; // weak
int dword_45EA2C; // weak
int dword_45EA30; // weak
int dword_45EA34; // weak
int dword_45EA38; // weak
int dword_45EA3C; // weak
int dword_45EA40; // weak
int dword_45EA44; // weak*/
char raceFilePrefix_45EA50[8]; // weak
void *slidcop2Bpk; // idb
int currentLapMinutes_45EA64; // weak
int participantInRaceById_45EA80[20]; // weak
/*int dword_45EA84; // weak
int dword_45EA88; // weak
int dword_45EA8C; // weak
int dword_45EA90; // weak*/
size_t Size; // idb
int dword_45EAA4; // weak
int currentRaceBestLapSeconds_45EB48; // idb
void *Str; // idb
int dword_45EB50[256]; // weak
//int dword_45EB54; // weak
//int dword_45EB58; // weak
void *tsahpeBpk_45EB5C; // idb
void *repaaniBpk; // idb
void *reaperxBpk; // idb
void *carbas2Bpk; // idb
void *slidmus2Bpk; // idb
int totalRaceSeconds_45EEBC; // weak
int totalRaceMinutes_45EEC0; // weak
int dword_45F000; // weak
int dword_45F004; // weak
int dword_45F008; // weak
int dword_45F00C; // weak
__int16 word_45F010; // weak
char byte_45F012; // weak
void *bases42Bpk; // idb
void *statbas7Bpk; // idb
//void *screenBuffer; // idb //dword_45F038
int dword_45F04C; // idb
//int dword_45F110; // weak
//int dword_45F114; // weak
_UNKNOWN unk_45F8B0; // weak
_UNKNOWN unk_45F8BC; // weak
void *engi1Bpk; // idb
void *engi2Bpk; // idb
void *engi3Bpk; // idb
void *engi4Bpk; // idb
int dword_45FA74; // weak
int dword_45FA78; // weak
void *blacktx2Bpk; // idb
char byte_45FAA0[256]; // weak
void *fsma3fBpk; // idb
FILE *File; // idb
void *arrows1dBpk; // idb
char byte_45FB84; // weak
void *scenecar1Bpk; // idb
void *scenecar2Bpk; // idb
void *scenecar3Bpk; // idb
void *scenecar4Bpk; // idb
void *scenecar5Bpk; // idb
void *scenecar6Bpk; // idb
int cursorBpkFrame; // weak
int dword_45FC00; // weak
void *bases45Bpk; // idb
//char byte_45FC11; // weak
//char byte_45FC12; // weak
//char byte_45FC13; // weak
int currentLapMilliseconds_45FC1C; // weak
//si es cero es que en el listado sales primero en la carrera y asi.Contra adversary eres el 1 porque adversary es el 0 siempre
int userRaceOrder_45FC20; // weak
//coche seleccionado
int actualCarSelected; // weak
///todo estos son paletas!!!!!!!
int palette1[768];
int palette2[768];//trasformo esos datos separados por colores en una paleta continua
int palette3[768];
/*int dword_45FC40[768]; // weak
int dword_45FC44[768]; // weak
int dword_45FC48[768]; // weak*/
/*int dword_45FD00[256]; // weak
int dword_45FD04[256]; // weak
int dword_45FD08[256]; // weak*/
_UNKNOWN unk_45FF44; // weak
_UNKNOWN unk_460000; // weak
_UNKNOWN unk_460004; // weak
_UNKNOWN unk_4600C4; // weak
_UNKNOWN unk_460244; // weak
//paleta
_UNKNOWN unk_460484; // weak
_UNKNOWN unk_4604D8; // weak
_UNKNOWN unk_460544; // weak
_UNKNOWN unk_4606C4; // weak
int maxPaletteEntries=768; // weak
//CREO QUE ES DRIVERS
char byte_460840[2160]; // weak
//int dword_46084C[256]; // weak
//int dword_460850[256]; // weak
//int dword_460854[256]; // weak
//int dword_460858[256]; // weak
//int dword_46085C[256]; // weak
//int dword_46086C[256]; // weak
//int dword_460870[256]; // weak
//int dword_460874[256]; // weak
//int dword_460878[256]; // weak
//int dword_46087C[256]; // weak
//int dword_460880[256]; // weak
//int dword_460884[256]; // weak
//int dword_460888[256]; // weak
//int dword_46088C[256]; // weak
//int dword_460890[256]; // weak
//int dword_460894[256]; // weak
//int dword_460898[256]; // weak
//int dword_46089C[256]; // weak
//int dword_4608A0[256]; // weak
//int dword_4608A4[256]; // weak
//int dword_4608A8[256]; // weak
//int dword_4608C8; // weak
int dword_4608F0[256]; // weak
//int dword_460904[256]; // weak
//int dword_460934; // weak
//int dword_4609A0; // weak
//int dword_460A0C; // weak
//int dword_460A78; // weak
//int dword_460AE4; // weak
//int dword_460B50; // weak
//int dword_460BBC; // weak
//int dword_460C28; // weak
//int dword_460C94; // weak
//int dword_460D00; // weak
//int dword_460D6C; // weak
//int dword_460DD8; // weak
//int dword_460E44; // weak
//int dword_460EB0; // weak
//int dword_460F1C; // weak
//int dword_460F88; // weak
//int dword_460FF4; // weak
//int dword_461060; // weak
_UNKNOWN unk_461094; // weak
_UNKNOWN unk_4610BC; // weak
_UNKNOWN unk_461110; // weak
void *prepw1Bpk; // idb
void *statpop4Bpk; // idb
_UNKNOWN unk_4611E0; // weak
int dword_461250; // weak
void *bases44Bpk; // idb
char circuitsToSelect_46126C[3];
//estos dos no se usan contiene los 3 circuitos que se muestran en la pantalla de seleccion
//char byte_46126C[3]; // weak
//char byte_46126D; // weak
//char byte_46126E; // weak
void *contaniBpk; // idb
//todo estos son paleta!!!!
//int dword_4612A0[768]; // weak
//int dword_4612A4[768]; // weak
//int dword_4612A8[768]; // weak
//int dword_461360[256]; // weak
//int dword_461364[256]; // weak
//int dword_461368[256]; // weak
_UNKNOWN unk_461424; // weak
void *dealer2bBpk; // idb
void *dword_461EA4; // idb
int participantsRace[3];
//__int16 word_461EB4; // weak
//char byte_461EB6; // weak
char unk_461EC0[256]; // idb
_UNKNOWN unk_461EC1; // weak
_UNKNOWN unk_461EC2; // weak
_UNKNOWN unk_461EC3; // weak
__int16 word_461EC4; // weak
_UNKNOWN unk_461EC6; // weak
_UNKNOWN unk_461EC7; // weak
__int16 word_461EC8; // weak
_UNKNOWN unk_461ECA; // weak
_UNKNOWN unk_461ECB; // weak
__int16 word_461ECC; // weak
_UNKNOWN unk_461ECE; // weak
_UNKNOWN unk_461ECF; // weak
__int16 word_461ED0; // weak
_UNKNOWN unk_461ED2; // weak
_UNKNOWN unk_461ED3; // weak
void *dword_461ED8; // idb
int dword_461EEC; // weak
void *tire1Bpk; // idb
void *tire2Bpk; // idb
void *tire3Bpk; // idb
void *tire4Bpk; // idb
void *slidcur3Bpk; // idb
int currentRaceBestLapMilliseconds_461FEC; // idb
void *bases43Bpk; // idb
void *event2Bpk; // idb
_UNKNOWN unk_462000; // weak
_UNKNOWN unk_462096; // weak
_UNKNOWN unk_462960; // weak
char byte_4629F6[256]; // weak
char byte_462A8C[256]; // weak
char byte_462B22[256]; // weak
char byte_462BB8[256]; // weak
void *blacktx1Bpk; // idb
int selectedRace_462CE8; // weak
void *volcur2Bpk; // idb
void *maxi1fBpk; // idb
void *maret1eBpk; // idb
void *kuplaBpk; // idb
void *pickupBpk; // idb
void *sedanBpk; // idb
void *camaroBpk; // idb
void *porscheBpk; // idb
void *lotusBpk; // idb
void *carnameBpk; // idb
int totalRaceMilliseconds_462D74; // weak
int dword_462D7C; // weak
void *drugdealBpk; // idb
int numberOfLaps; // idb
int currentRaceBestLapMinutes_463CAC; // idb
void *armor1Bpk; // idb
void *armor2Bpk; // idb
void *armor3Bpk; // idb
void *armor4Bpk; // idb
int currentLapSeconds_463CD4; // weak
void *DstBuf; // idb
void *bases41Bpk; // idb
void *spons1bBpk; // idb
int menuOptionSelected_463DF0; // weak
void *choo2Bpk; // idb
char byte_463E00[256]; // weak
int dword_463E08; // weak
int dword_464F14; // weak
int dword_464F18; // weak
int dword_464F1C; // weak
int dword_464F20; // weak
int circuitWidth_464F40; // weak
int firstRacePlayed_464F44; // weak
char circuitSelectedTR_464F50[8]; // idb
//char byte_464F50
int deployedMines_464F60; // weak parece que son las minas desplegadas
int raceSemaphoreWidth_464F64; // weak
int dword_464F68; // weak
int dword_464F6C; // weak
float flt_464F70; // weak
void *pedestrBpk; // idb
int circuitLR1Bpk_height_467000; // weak
//int dword_467020[7504]; // weak
int racePositionUserFirst_46E8D0[4]; // weak
//int dword_46E8D4; // weak
//int dword_46E8D8; // weak
//int dword_46E8DC; // weak
void *mines1aBpk; // idb
int dword_46ECE4; // weak// valor mezclado entre sombras y texturas pero parece que se puede separar
int dword_46ECE8; // weak
//_UNKNOWN unk_46ED00; // weak
int trxOHIDat_46EE00[256]; // weak
int dword_46F200; // weak
void *dword_46F204; // idb
int dword_46F208; // weak
//int dword_46F21C[256]; // weak
//int dword_46F220[1000][100]; // weak
int trxSHA5Bpk_478E60[1024]; // weak
void *rocket1Bpk; // idb
void *rocket2Bpk; // idb
int dword_479268; // weak
void *dword_47926C; // idb
int dword_479270; // weak
void *genlamBpk; // idb
int dword_479684; // weak
void *genmesBpk; // idb
int dword_47968C; // weak
void *inRaceMessagePopup_479690; // idb
float drvdat_4796A0[256]; // weak
/*_UNKNOWN unk_479AA0; // weak
_UNKNOWN unk_479AA4[256]; // weak
_UNKNOWN unk_479AAC; // weak*/
//_UNKNOWN unk_479AB8; // weak
//_UNKNOWN unk_479D24; // weak
//_UNKNOWN unk_479D2C; // weak
//_UNKNOWN unk_479D38; // weak
char trxBLOTab_479D40[257]; // weak
_UNKNOWN unk_479E40; // weak