- volatile all memory buffer addresses

This commit is contained in:
Ilya Shurumov 2021-04-04 15:24:16 +06:00
parent 32194a7f88
commit 1d182b0cc6
29 changed files with 125 additions and 125 deletions

View File

@ -130,7 +130,7 @@ void FadeInHiresScreen(char *filename)
PutDispEnv(&disp);
PutDrawEnv(&draw);
LoadfileSeg(filename, _overlay_buffer, 20, 0x4ff80);
LoadfileSeg(filename, (char*)_overlay_buffer, 20, 0x4ff80);
LoadClut((u_long*)_overlay_buffer, 640, 511);
DrawSync(0);
@ -259,7 +259,7 @@ void ShowBonusGallery()
else
sprintf(filename, "GFX\\GAL\\IMG%d.TIM", currentImage-1);
LoadfileSeg(filename, _other_buffer, 20, 0x4ff80);
LoadfileSeg(filename, (char*)_other_buffer, 20, 0x4ff80);
LoadClut((u_long*)_other_buffer, 640, 511);
DrawSync(0);

View File

@ -42,7 +42,7 @@ int TannerCanEnterCar(CAR_DATA *cp, int distToCarSq)
return 0;
}
// [D]
// [D] [T]
int TannerStuckInCar(int doSpeedCheck, int player_id)
{
short *playerFelony;

View File

@ -1159,7 +1159,7 @@ void MangleWheelModels(void)
}
}
// [D]
// [D] [T]
void ProcessPalletLump(char *lump_ptr, int lump_size)
{
ushort clutValue;

View File

@ -65,8 +65,8 @@ void ProcessCosmeticsLump(char *lump_ptr, int lump_size)
// [D] [T]
void LoadCosmetics(int level)
{
LoadfileSeg(CosmeticFiles[level], _other_buffer, 0, 3120);
ProcessCosmeticsLump(_other_buffer, 0);
LoadfileSeg(CosmeticFiles[level], (char*)_other_buffer, 0, 3120);
ProcessCosmeticsLump((char*)_other_buffer, 0);
}
#define REVERSELIGHT_SIZE 14
@ -117,10 +117,10 @@ void SetupSpecCosmetics(char *loadbuffer)
// [A] always load cosmetics from file
// fixes limo cosmetics as well
LoadfileSeg(CosmeticFiles[GameLevel], _other_buffer, 0, 3120);
LoadfileSeg(CosmeticFiles[GameLevel], (char*)_other_buffer, 0, 3120);
offset = *(int*)(_other_buffer + model * sizeof(int));
memcpy((char*)&car_cosmetics[4], _other_buffer + offset, sizeof(CAR_COSMETICS));
memcpy((char*)&car_cosmetics[4], (char*)_other_buffer + offset, sizeof(CAR_COSMETICS));
#else
memcpy((char*)&car_cosmetics[4], loadbuffer, sizeof(CAR_COSMETICS));
#endif

View File

@ -971,7 +971,7 @@ int LoadCutsceneToBuffer(int subindex)
leadAILoaded = 0;
pathAILoaded = 0;
CutsceneBuffer.currentPointer = _other_buffer2;
CutsceneBuffer.currentPointer = (char*)_other_buffer2;
CutsceneBuffer.bytesFree = 0xC000;
}
@ -1065,7 +1065,7 @@ void FreeCutsceneBuffer(void)
ClearMem(CutsceneBuffer.buffer, sizeof(CutsceneBuffer.buffer));
#ifndef PSX
gCustomCutsceneBuffer = _other_buffer2;
gCustomCutsceneBuffer = (char*)_other_buffer2;
#endif
}

View File

@ -430,7 +430,7 @@ char* LoadCarDentingFromFile(char* dest, int modelNumber)
sprintf(filename, "LEVELS\\%s\\CARMODEL_%d.DEN", LevelNames[GameLevel], modelNumber);
if(FileExists(filename))
{
mem = dest ? dest : (_other_buffer + modelNumber * 0x1000);
mem = dest ? dest : ((char*)_other_buffer + modelNumber * 4096);
// get model from file
Loadfile(filename, mem);
@ -510,8 +510,8 @@ void SetupSpecDenting(char *loadbuffer)
// [D] [T]
void LoadDenting(int level)
{
LoadfileSeg(DentingFiles[level], _other_buffer, 0, 12727);
ProcessDentLump(_other_buffer, 0);
LoadfileSeg(DentingFiles[level], (char*)_other_buffer, 0, 12727);
ProcessDentLump((char*)_other_buffer, 0);
}

View File

@ -171,7 +171,7 @@ void SetSmashedCone(int cone, VECTOR *velocity, int player, int side)
}
// [D]
// [D] [T]
void MoveSmashedCones(void)
{
TRAILBLAZER_DATA *tbd;

View File

@ -87,7 +87,7 @@ char GetCarDirectionOfTravel(CAR_DATA *cp)
return direction;
}
// [D]
// [D] [T]
void NoteFelony(FELONY_DATA *pFelonyData, char type, short scale)
{
int felonyTooLowForRoadblocks;

View File

@ -890,7 +890,7 @@ void ControlSpeech(SPEECH_QUEUE* pSpeechQueue)
}
}
// [D]
// [D] [T]
void CopSay(int phrase, int direction)
{
if (!gDoCopSpeech)
@ -2243,7 +2243,7 @@ void IdentifyZone(envsound* ep, envsoundinfo* E, int pl)
}
// [D] [A] unprocessed arrays
// [D] [T]
void CalcEffPos(envsound* ep, envsoundinfo* E, int pl)
{
int minX, maxX;
@ -2331,7 +2331,7 @@ void CalcEffPos(envsound* ep, envsoundinfo* E, int pl)
}
}
// [D] [A] unprocessed arrays
// [D] [T]
void CalcEffPos2(envsound* ep, envsoundinfo* E, int pl)
{
int snd;

View File

@ -127,13 +127,13 @@ void LoadCurrentProfile()
fileSize = ftell(fp);
fseek(fp, 0, SEEK_SET);
fread(_other_buffer, 1, fileSize, fp);
fread((char*)_other_buffer, 1, fileSize, fp);
fclose(fp);
if (fileSize <= CalcConfigDataSize())
{
LoadConfigData(_other_buffer);
LoadConfigData((char*)_other_buffer);
error = 0;
}
}
@ -171,7 +171,7 @@ void SaveCurrentProfile()
ShowSavingWaitMessage(G_LTXT(GTXT_SavingConfiguration), 0);
dataSize = 0;
if (SaveConfigData(_other_buffer))
if (SaveConfigData((char*)_other_buffer))
dataSize = CalcConfigDataSize();
error = 1;
@ -180,7 +180,7 @@ void SaveCurrentProfile()
FILE* fp = fopen(filePath, "wb");
if (fp)
{
fwrite(_other_buffer, 1, dataSize, fp);
fwrite((char*)_other_buffer, 1, dataSize, fp);
fclose(fp);
error = 0;
@ -218,13 +218,13 @@ int LoadCurrentGame()
fileSize = ftell(fp);
fseek(fp, 0, SEEK_SET);
fread(_other_buffer, 1, fileSize, fp);
fread((char*)_other_buffer, 1, fileSize, fp);
fclose(fp);
if (fileSize <= CalcGameDataSize())
{
LoadGameData(_other_buffer);
LoadGameData((char*)_other_buffer);
return 1;
}
}
@ -246,14 +246,14 @@ void SaveCurrentGame()
ShowSavingWaitMessage(G_LTXT(GTXT_SavingProgress), 0);
dataSize = 0;
if (SaveGameData(_other_buffer))
if (SaveGameData((char*)_other_buffer))
dataSize = CalcGameDataSize();
// load config
FILE* fp = fopen(filePath, "wb");
if (fp)
{
fwrite(_other_buffer, 1, dataSize, fp);
fwrite((char*)_other_buffer, 1, dataSize, fp);
fclose(fp);
}
}
@ -270,10 +270,10 @@ int LoadReplayFromFile(char* fileName)
replay_size = ftell(fp);
fseek(fp, 0, SEEK_SET);
fread(_other_buffer, replay_size, 1, fp);
fread((char*)_other_buffer, replay_size, 1, fp);
fclose(fp);
if (LoadReplayFromBuffer(_other_buffer))
if (LoadReplayFromBuffer((char*)_other_buffer))
{
char* sub, *tmp;
@ -310,12 +310,12 @@ int LoadReplayFromFile(char* fileName)
int SaveReplayToFile(char* filename)
{
int size = SaveReplayToBuffer(_other_buffer);
int size = SaveReplayToBuffer((char*)_other_buffer);
FILE* fp = fopen(filename, "wb");
if (fp)
{
fwrite(_other_buffer, 1, size, fp);
fwrite((char*)_other_buffer, 1, size, fp);
fclose(fp);
return 1;
}

View File

@ -172,7 +172,7 @@ void ShowLoadingScreen(char *screen_name, int effect, int loading_steps)
PutDispEnv(&load_disp);
PutDrawEnv(&load_draw);
Loadfile(screen_name, _frontend_buffer);
Loadfile(screen_name, (char*)_frontend_buffer);
LoadClut((u_long*)&_frontend_buffer[20], 320, 511);
DrawSync(0);

View File

@ -418,13 +418,13 @@ void LoadGameLevel(void)
loadsectors(_frontend_buffer, sector, nsectors);
#else
extern char g_CurrentLevelFileName[64];
loadsectorsPC(g_CurrentLevelFileName, _frontend_buffer, sector, nsectors);
loadsectorsPC(g_CurrentLevelFileName, (char*)_frontend_buffer, sector, nsectors);
#endif // PSX
sector += nsectors;
// CITYLUMP_DATA1 - load-time lump
ProcessLumps(_frontend_buffer + 8, nsectors * CDSECTOR_SIZE);
ProcessLumps((char*)_frontend_buffer + 8, nsectors * CDSECTOR_SIZE);
// CITYLUMP_TPAGE is right next after DATA1
LoadPermanentTPages(&sector);
@ -816,7 +816,7 @@ int leadCarId = 0;
VECTOR leadcar_pos;
// [D]
// [D] [T]
void StepSim(void)
{
static u_int t0; // offset 0x0
@ -1697,7 +1697,7 @@ void EndGame(GAMEMODE mode)
}
// [D]
// [D] [T]
void EnablePause(PAUSEMODE mode)
{
if (quick_replay == 0 && NoPlayerControl && mode == PAUSEMODE_GAMEOVER)
@ -1999,10 +1999,10 @@ int redriver2_main(int argc, char** argv)
replay_size = ftell(fp);
fseek(fp, 0, SEEK_SET);
fread(_other_buffer, replay_size, 1, fp);
fread((char*)_other_buffer, replay_size, 1, fp);
fclose(fp);
if (LoadReplayFromBuffer(_other_buffer))
if (LoadReplayFromBuffer((char*)_other_buffer))
{
CurrentGameMode = GAMEMODE_REPLAY;
gLoadedReplay = 1;

View File

@ -761,7 +761,7 @@ void SetMSoundVar(intptr_t var, VECTOR* V)
bodgevar = var;
}
// [D]
// [D] [T]
char SilenceThisCar(int car)
{
if (gInGameCutsceneActive == 0)
@ -926,7 +926,7 @@ char SilenceThisCar(int car)
}
// [D]
// [D] [T]
void AdjustPlayerCarVolume(void)
{
if (gInGameCutsceneID != 0)

View File

@ -206,7 +206,7 @@ void DrawFullscreenTarget(MS_TARGET *target)
DrawTargetArrow(&tv, 4);
}
// [D]
// [D] [T]
void DrawWorldTarget(MS_TARGET *target)
{
uint flags;

View File

@ -3080,7 +3080,7 @@ void SetMissionOver(PAUSEMODE mode)
Mission.ChaseTarget = NULL;
}
// [D]
// [D] [T]
void ActivateNextFlag(void)
{
int j;
@ -3128,7 +3128,7 @@ int CalcLapTime(int player, int time, int lap)
return time - ptime;
}
// [D]
// [D] [T]
void MakePhantomCarEqualPlayerCar(void)
{
// store player car id
@ -3136,7 +3136,7 @@ void MakePhantomCarEqualPlayerCar(void)
Mission.PhantomCarId = player[0].playerCarId;
}
// [D]
// [D] [T]
void SetCarToBeStolen(MS_TARGET *target, int player)
{
if (target->car.flags & CARTARGET_FLAG_SET_PLAYERCAR)

View File

@ -196,7 +196,7 @@ int ProcessCarModelLump(char *lump_ptr, int lump_size)
gCarLowModelPtr[i] = NULL;
if (i == 4)
specmallocptr = mallocptr;
specmallocptr = (char*)mallocptr;
model_number = MissionHeader->residentModels[i];
@ -221,7 +221,7 @@ int ProcessCarModelLump(char *lump_ptr, int lump_size)
if (cleanOfs != -1)
{
D_MALLOC_BEGIN();
model = GetCarModel(models_offset + cleanOfs, &mallocptr, 1, model_number, CAR_MODEL_CLEAN);
model = GetCarModel(models_offset + cleanOfs, (char**)&mallocptr, 1, model_number, CAR_MODEL_CLEAN);
gCarCleanModelPtr[i] = model;
D_MALLOC_END();
}
@ -229,7 +229,7 @@ int ProcessCarModelLump(char *lump_ptr, int lump_size)
if (damOfs != -1)
{
D_MALLOC_BEGIN();
model = GetCarModel(models_offset + damOfs, &mallocptr, 0, model_number, CAR_MODEL_DAMAGED);
model = GetCarModel(models_offset + damOfs, (char**)&mallocptr, 0, model_number, CAR_MODEL_DAMAGED);
gCarDamModelPtr[i] = model;
D_MALLOC_END();
}
@ -237,7 +237,7 @@ int ProcessCarModelLump(char *lump_ptr, int lump_size)
if (lowOfs != -1)
{
D_MALLOC_BEGIN();
model = GetCarModel(models_offset + lowOfs, &mallocptr, 1, model_number, CAR_MODEL_LOWDETAIL);
model = GetCarModel(models_offset + lowOfs, (char**)&mallocptr, 1, model_number, CAR_MODEL_LOWDETAIL);
gCarLowModelPtr[i] = model;
D_MALLOC_END();
}
@ -271,7 +271,7 @@ char* LoadCarModelFromFile(char* dest, int modelNumber, int type)
sprintf(filename, "LEVELS\\%s\\CARMODEL_%d_%s.DMODEL", LevelNames[GameLevel], modelNumber, CarModelTypeNames[type-1]);
if(FileExists(filename))
{
mem = dest ? dest : (_other_buffer + modelNumber * 0x10000 + (type-1) * 0x4000);
mem = (char*)(dest ? dest : (_other_buffer + modelNumber * 0x10000 + (type-1) * 0x4000));
// get model from file
Loadfile(filename, mem);

View File

@ -232,7 +232,7 @@ void ClearPad(int pad)
Pads[pad].mapnew = 0;
}
// [D]
// [D] [T]
void HandleDualShock(void)
{
PAD* pPad;
@ -363,7 +363,7 @@ void HandleDualShock(void)
}
}
// [D]
// [D] [T]
void HandlePadVibration(int pad)
{
int speed;
@ -372,7 +372,7 @@ void HandlePadVibration(int pad)
pPad = &Pads[pad];
speed = 0;
if (NoPlayerControl != 0 || gDualShockMax == 0 || gDrawPauseMenus != 0 || (game_over != 0 || gInGameCutsceneActive != 0))
if (NoPlayerControl || gDualShockMax == 0 || gDrawPauseMenus || (game_over || gInGameCutsceneActive))
{
StopPadVibration(pad);
return;

View File

@ -503,7 +503,7 @@ char* WaitForTextEntry(char* textBufPtr, int maxLength)
char* username;
unsigned short npad, dpad;
username = textBufPtr ? textBufPtr : _overlay_buffer;
username = textBufPtr ? textBufPtr : (char*)_overlay_buffer;
delay = 0;
toggle = 0;
co = 1;

View File

@ -2287,7 +2287,7 @@ void add_seated(SEATED_PEDESTRIANS* seatedptr, int seat_index)
CAR_COLLISION_BOX collision_box[8];
CAR_DATA* collision_car_ptr[8];
// [D]
// [D] [T]
void set_coll_box(int index, CAR_DATA* cp, int offset)
{
int isPlayerCar;

View File

@ -109,7 +109,7 @@ int PrintStringRightAligned(char *pString, int x, int y)
return PrintString(pString, x - StringWidth(pString), y);
}
// [D] [T
// [D] [T]
void PrintStringCentred(char *pString, short y)
{
PrintString(pString, (320 - StringWidth(pString)) / 2, y);
@ -132,7 +132,7 @@ void LoadFont(char *buffer)
if (buffer != NULL)
file = buffer;
else
file = _frontend_buffer; // 0x11b400; // [A] FIXME: this font address might be used somewhere else
file = (char*)_frontend_buffer; // 0x11b400; // [A] FIXME: this font address might be used somewhere else
Loadfile("GFX\\FONT2.FNT",file);

View File

@ -60,7 +60,7 @@ void InitPadRecording(void)
{
NumReplayStreams = 0;
ReplayStart = _replay_buffer;
ReplayStart = (char*)_replay_buffer;
ReplayParameterPtr = (REPLAY_PARAMETER_BLOCK *)ReplayStart;
PlayerWayRecordPtr = (SXYPAIR *)(ReplayParameterPtr + 1);
@ -275,9 +275,9 @@ int LoadCutsceneAsReplay(int subindex)
printWarning("cutscene size: %d\n", size);
LoadfileSeg(filename, _other_buffer, offset, size);
LoadfileSeg(filename, (char*)_other_buffer, offset, size);
int result = LoadReplayFromBuffer(_other_buffer);
int result = LoadReplayFromBuffer((char*)_other_buffer);
return result;
}
@ -384,7 +384,7 @@ int LoadReplayFromBuffer(char *buffer)
if (header->magic != DRIVER2_REPLAY_MAGIC)
return 0;
ReplayStart = replayptr = _replay_buffer;
ReplayStart = replayptr = (char*)_replay_buffer;
GameLevel = header->GameLevel;
GameType = (GAMETYPE)header->GameType;
@ -512,8 +512,8 @@ int LoadUserAttractReplay(int mission, int userId)
if (FileExists(customFilename))
{
if (Loadfile(customFilename, _other_buffer))
return LoadReplayFromBuffer(_other_buffer);
if (Loadfile(customFilename, (char*)_other_buffer))
return LoadReplayFromBuffer((char*)_other_buffer);
}
}
@ -550,10 +550,10 @@ int LoadAttractReplay(int mission)
if (!FileExists(filename))
return 0;
if (!Loadfile(filename, _other_buffer))
if (!Loadfile(filename, (char*)_other_buffer))
return 0;
return LoadReplayFromBuffer(_other_buffer);
return LoadReplayFromBuffer((char*)_other_buffer);
}
// [D] [T]

View File

@ -278,7 +278,7 @@ void LoadSky(void)
}
sprintf(name, "DATA\\SKY%d.RAW", skyNum);
LoadfileSeg(name, _frontend_buffer, offset, 0x10000);
LoadfileSeg(name, (char*)_frontend_buffer, offset, 0x10000);
rect.x = 320;
rect.y = 0;

View File

@ -323,7 +323,7 @@ int CalculateVolume(int channel)
int gSurround = 0;
// [D]
// [D] [T]
void UpdateVolumeAttributesS(int channel, int proximity)
{
int volume;
@ -575,7 +575,7 @@ int Start3DTrackingSound(int channel, int bank, int sample, VECTOR *position, LO
return channel;
}
// [D]
// [D] [T]
int Start3DSoundVolPitch(int channel, int bank, int sample, int x, int y, int z, int volume, int pitch)
{
if (channel < 0)

View File

@ -22,28 +22,28 @@
#ifdef PSX
char* _overlay_buffer = 0x801C0000;
char* _frontend_buffer = 0x800FB400;
char* _other_buffer = 0x800F3000;
char* _other_buffer2 = 0x800E7000;
OTTYPE* _OT1 = 0x800F3000;
OTTYPE* _OT2 = 0x800F7200;
char* _primTab1 = 0x800FB400;
char* _primTab2 = 0x80119400;
char* _replay_buffer = 0x801FABBC;
volatile char* _frontend_buffer = 0x800FB400;
volatile char* _other_buffer = 0x800F3000;
volatile char* _other_buffer2 = 0x800E7000;
volatile OTTYPE* _OT1 = 0x800F3000;
volatile OTTYPE* _OT2 = 0x800F7200;
volatile char* _primTab1 = 0x800FB400;
volatile char* _primTab2 = 0x80119400;
volatile char* _overlay_buffer = 0x801C0000;
volatile char* _replay_buffer = 0x801FABBC;
#else
// Initialized in redriver2_main
char* _overlay_buffer = NULL; // 0x1C0000
char* _frontend_buffer = NULL; // 0xFB400
char* _other_buffer = NULL; // 0xF3000
char* _other_buffer2 = NULL; // 0xE7000
OTTYPE* _OT1 = NULL; // 0xF3000
OTTYPE* _OT2 = NULL; // 0xF7200
char* _primTab1 = NULL; // 0xFB400
char* _primTab2 = NULL; // 0x119400
char* _replay_buffer = NULL; // 0x1FABBC
volatile char* _frontend_buffer = NULL; // 0xFB400
volatile char* _other_buffer = NULL; // 0xF3000
volatile char* _other_buffer2 = NULL; // 0xE7000
volatile OTTYPE* _OT1 = NULL; // 0xF3000
volatile OTTYPE* _OT2 = NULL; // 0xF7200
volatile char* _primTab1 = NULL; // 0xFB400
volatile char* _primTab2 = NULL; // 0x119400
volatile char* _overlay_buffer = NULL; // 0x1C0000
volatile char* _replay_buffer = NULL; // 0x1FABBC
#endif
@ -52,7 +52,7 @@ char gDataFolder[32] = "DRIVER2\\";
#ifdef USE_CRT_MALLOC
char* mallocptr = NULL;
const char* malloctab = NULL;
volatile const char* malloctab = NULL;
void* g_dynamicAllocs[1024] = { 0 };
int g_numDynamicAllocs = 0;
@ -110,14 +110,14 @@ void sys_tempfree()
}
#elif defined(PSX)
char* mallocptr;
const char* malloctab = 0x800137400;
volatile char* mallocptr;
volatile const char* malloctab = 0x800137400;
#else
char g_allocatedMem[0x200000]; // 0x137400 (_ramsize). TODO: use real malloc size: 870332
char* mallocptr = g_allocatedMem;
const char* malloctab = g_allocatedMem;
volatile char* mallocptr = g_allocatedMem;
volatile const char* malloctab = g_allocatedMem;
#endif

View File

@ -1,24 +1,24 @@
#ifndef SYSTEM_H
#define SYSTEM_H
extern char* _overlay_buffer; // 0x1C0000
extern char* _frontend_buffer; // 0xFB400
extern char* _other_buffer; // 0xF3000
extern char* _other_buffer2; // 0xE7000
extern volatile char* _overlay_buffer; // 0x1C0000
extern volatile char* _frontend_buffer; // 0xFB400
extern volatile char* _other_buffer; // 0xF3000
extern volatile char* _other_buffer2; // 0xE7000
extern OTTYPE* _OT1; // 0xF3000
extern OTTYPE* _OT2; // 0xF7200
extern volatile OTTYPE* _OT1; // 0xF3000
extern volatile OTTYPE* _OT2; // 0xF7200
extern char* _primTab1; // 0xFB400
extern char* _primTab2; // 0x119400
extern char* _replay_buffer; // 0x1FABBC
extern volatile char* _primTab1; // 0xFB400
extern volatile char* _primTab2; // 0x119400
extern volatile char* _replay_buffer; // 0x1FABBC
extern char gDataFolder[32];
#define PSX_MALLOC_SIZE 870332
extern const char* malloctab;
extern char* mallocptr;
extern volatile const char* malloctab;
extern volatile char* mallocptr;
#ifdef USE_CRT_MALLOC
@ -39,14 +39,14 @@ extern void sys_freeall();
#endif
#else
#define D_MALLOC(size) mallocptr; mallocptr += (size)
#define D_TEMPALLOC(size) mallocptr
#define D_MALLOC(size) (char*)mallocptr; mallocptr += (size)
#define D_TEMPALLOC(size) (char*)mallocptr
#define D_TEMPFREE()
#endif
#define D_MALLOC_BEGIN() \
{ \
const char* _oldmalloc = mallocptr;
volatile const char* _oldmalloc = mallocptr;
#ifdef __GNUC__
#define D_MALLOC_END() \

View File

@ -182,7 +182,7 @@ void LoadTPageFromTIMs(int tpage2send)
if(!FileExists(filename))
continue;
Loadfile(filename, _other_buffer);
Loadfile(filename, (char*)_other_buffer);
// get TIM data
timClut = (TIMIMAGEHDR*)(_other_buffer + sizeof(TIMHDR));
@ -258,7 +258,7 @@ int LoadTPageAndCluts(RECT16 *tpage, RECT16 *cluts, int tpage2send, char *tpagea
temptpage.w = tpage->w;
temptpage.h = 256;
decomp_asm(_other_buffer, tpageaddress);
decomp_asm((char*)_other_buffer, tpageaddress);
LoadImage(&temptpage, (u_long *)_other_buffer);
texture_pages[tpage2send] = GetTPage(0, 0, tpage->x, tpage->y);
@ -428,7 +428,7 @@ void load_civ_palettes(RECT16 *cluts)
return;
}
// [D]
// [D] [T]
void LoadPermanentTPages(int *sector)
{
int nsectors;
@ -475,7 +475,7 @@ void LoadPermanentTPages(int *sector)
load_civ_palettes(&clutpos);
tpagebuffer = mallocptr;
tpagebuffer = (char*)mallocptr;
nsectors = 0;
for (i = 0; i < nperms; i++)
@ -501,7 +501,7 @@ void LoadPermanentTPages(int *sector)
tpagebuffer += (permlist[i].y + 2047) & -CDSECTOR_SIZE;
}
tpagebuffer = mallocptr;
tpagebuffer = (char*)mallocptr;
slot_clutpos[slotsused].vx = clutpos.x;
slot_clutpos[slotsused].vy = clutpos.y;

View File

@ -2311,7 +2311,7 @@ void DoDolbySS(void)
int dd = 0;
int de = 0;
// [D]
// [D] [T]
int GetEmpty(int old)
{
unsigned char bVar1;
@ -2781,7 +2781,7 @@ CurrentKeyStat
Stops processing of any dead channels
*****************************************************************************/
// [D]
// [D] [T]
void CurrentKeyStat(void)
{
int t;

View File

@ -991,7 +991,7 @@ void SetupExtraPoly(char *fileName, int offset, int offset2)
RECT16 rect = extraRect;
FEDrawCDicon();
Loadfile(fileName, _frontend_buffer + offset2);
Loadfile(fileName, (char*)_frontend_buffer + offset2);
rect.x = 896;
rect.y = 256;
@ -1064,7 +1064,7 @@ void LoadBackgroundFile(char* name)
{
FEDrawCDicon();
LoadfileSeg(name, _overlay_buffer, i * 0x8000, 0x8000);
LoadfileSeg(name, (char*)_overlay_buffer, i * 0x8000, 0x8000);
FEDrawCDicon();
rect.y = (i / 6);
@ -1075,7 +1075,7 @@ void LoadBackgroundFile(char* name)
FEDrawCDicon();
}
LoadfileSeg(name, _overlay_buffer, iTpage * 0x8000, 0x800);
LoadfileSeg(name, (char*)_overlay_buffer, iTpage * 0x8000, 0x800);
FEDrawCDicon();
rect.h = 1;
@ -1103,9 +1103,9 @@ void LoadFrontendScreens(int full)
#ifndef USE_EMBEDDED_FRONTEND_SCREENS
if (full)
{
Loadfile("DATA\\SCRS.BIN", _frontend_buffer);
Loadfile("DATA\\SCRS.BIN", (char*)_frontend_buffer);
ptr = _frontend_buffer + 20; // skip header and number of screens
ptr = (char*)_frontend_buffer + 20; // skip header and number of screens
iNumScreens = (int)_frontend_buffer[16];
for (int i = 0; i < iNumScreens; i++)
@ -1143,7 +1143,7 @@ void LoadFrontendScreens(int full)
for (int i = 0; i < 2; i++)
{
ShowLoading();
LoadfileSeg("DATA\\GFX.RAW", _frontend_buffer, 0x30000 + (i * 0x8000), 0x8000);
LoadfileSeg("DATA\\GFX.RAW", (char*)_frontend_buffer, 0x30000 + (i * 0x8000), 0x8000);
rect.x = 640 + (i * 64);
rect.y = 256;
@ -1153,7 +1153,7 @@ void LoadFrontendScreens(int full)
}
ShowLoading();
LoadfileSeg("DATA\\GFX.RAW", _frontend_buffer, 0x58000, 0x8000);
LoadfileSeg("DATA\\GFX.RAW", (char*)_frontend_buffer, 0x58000, 0x8000);
rect.x = 960;
rect.y = 256;
@ -1164,7 +1164,7 @@ void LoadFrontendScreens(int full)
if (full)
{
Loadfile("DATA\\FEFONT.BNK", _frontend_buffer);
Loadfile("DATA\\FEFONT.BNK", (char*)_frontend_buffer);
memcpy((u_char*)&feFont, (u_char*)_frontend_buffer, sizeof(feFont));
}
}
@ -1573,17 +1573,17 @@ void SetFEDrawMode(void)
MPBuff[0][0].disp.isinter = 1;
MPBuff[0][0].draw.dfe = 1;
MPBuff[0][0].disp.screen.h = 256;
MPBuff[0][0].primtab = _primTab1;
MPBuff[0][0].primptr = _primTab1;
MPBuff[0][0].ot = _OT1;
MPBuff[0][0].primtab = (char*)_primTab1;
MPBuff[0][0].primptr = (char*)_primTab1;
MPBuff[0][0].ot = (OTTYPE*)_OT1;
MPBuff[0][1].draw.isbg = 0;
MPBuff[0][1].disp.isinter = 1;
MPBuff[0][1].draw.dfe = 1;
MPBuff[0][1].disp.screen.h = 256;
MPBuff[0][1].primtab = _primTab2;
MPBuff[0][1].primptr = _primTab2;
MPBuff[0][1].ot = _OT2;
MPBuff[0][1].primtab = (char*)_primTab2;
MPBuff[0][1].primptr = (char*)_primTab2;
MPBuff[0][1].ot = (OTTYPE*)_OT2;
last = &MPBuff[0][1];
current = &MPBuff[0][0];

View File

@ -52,7 +52,7 @@ int InitStringMng()
char table[256];
char* file;
file = _frontend_buffer;
file = (char*)_frontend_buffer;
Loadfile("GFX\\FONT2.FNT", file);