Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/game/admin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
{
char sc = 0;
int i, now, done, BarB, temp;
FILE *fout;
// FILE *fout;
SaveGameType saveType = SAVEGAME_Normal;

//sp. case -> no regular save off mail/modem game
Expand Down Expand Up @@ -925,7 +925,7 @@
*/
void autosave_game(const char *name)
{
FILE *outf;
// FILE *outf;
SaveFileHdr hdr;

memset(&hdr, 0, sizeof hdr);
Expand Down Expand Up @@ -956,7 +956,7 @@
{
const int maxLength = sizeof(SaveFileHdr().Name) - 1;
display::LegacySurface local(164, 77);
local.copyFrom(display::graphics.legacyScreen(), 39, 50, 202, 126);

Check warning on line 959 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 959 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 959 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 959 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 959 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 959 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]
ShBox(39, 50, 202, 126);

// TODO: Move this to wherever disk space should actually be
Expand All @@ -977,7 +977,7 @@
display::graphics.setForegroundColor(11);
draw_string(60, 74, "NOT ENOUGH DISK SPACE");
delay(2000);
local.copyTo(display::graphics.legacyScreen(), 39, 50);

Check warning on line 980 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 980 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 980 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 980 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 980 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 980 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]
throw IOException("Not enough disk space");
}

Expand Down Expand Up @@ -1018,7 +1018,7 @@
}
}

local.copyTo(display::graphics.legacyScreen(), 39, 50);

Check warning on line 1021 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1021 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1021 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1021 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1021 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1021 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]
if (key == K_ENTER && name.length()) {
return name;
} else {
Expand All @@ -1032,16 +1032,16 @@
void BadFileType()
{
display::LegacySurface local(164, 77);
local.copyFrom(display::graphics.legacyScreen(), 39, 50, 202, 126);

Check warning on line 1035 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1035 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1035 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1035 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1035 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1035 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]
ShBox(39, 50, 202, 126);
InBox(43, 67, 197, 77);
fill_rectangle(44, 68, 196, 76, 13);
display::graphics.setForegroundColor(11);
draw_string(73, 74, "CORRUPT SAVE FILE");
delay(2000);
local.copyTo(display::graphics.legacyScreen(), 39, 50);

Check warning on line 1042 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1042 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1042 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1042 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1042 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-release

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]

Check warning on line 1042 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-linux-vcpkg

‘display::LegacySurface* display::Graphics::legacyScreen()’ is deprecated [-Wdeprecated-declarations]
PauseMouse();
local.copyTo(display::graphics.legacyScreen(), 39, 50);

Check warning on line 1044 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1044 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]
}


Expand All @@ -1067,7 +1067,7 @@
return;
}

fread(&header, sizeof(header), 1, fin);
// fread(&header, sizeof(header), 1, fin);

fclose(fin);

Expand Down Expand Up @@ -1620,12 +1620,12 @@
*/
void LoadGame(const char *filename)
{
LEGACY_REPLAY *load_buffer = NULL;
// LEGACY_REPLAY *load_buffer = NULL;
SaveFileHdr header;
unsigned char magic[2];
unsigned char *cbuf, *buf;
uLongf usize = 0;
int i, ok, offset;
int i, ok;

FILE *fin = sOpen(filename, "rb", FT_SAVE);

Expand Down Expand Up @@ -1785,7 +1785,7 @@
display::LegacySurface local(196, 84);

if (md == 1) { // Save Buffer
local.copyFrom(display::graphics.legacyScreen(), 85, 52, 280, 135);

Check warning on line 1788 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]

Check warning on line 1788 in src/game/admin.cpp

View workflow job for this annotation

GitHub Actions / CI-macos-vcpkg

'legacyScreen' is deprecated [-Wdeprecated-declarations]
}

i = strlen(s) >> 1;
Expand Down Expand Up @@ -1842,7 +1842,7 @@
void write_save_file(const char *Name, SaveFileHdr header)
{
FILE *fin;
int i, offset, size;
int i, size;
long unsigned int csize;
unsigned char *cbuf;

Expand Down Expand Up @@ -1928,7 +1928,7 @@
int SaveGame(const std::vector<SFInfo> savegames)
{
int done = 0, temp, i;
FILE *fin;
// FILE *fin;
SaveFileHdr header;
std::string title;

Expand Down
4 changes: 2 additions & 2 deletions src/game/aipur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void CheckAdv(char plr);
*/
void DrawStatistics(char Win)
{
char AImg[7] = {8, 9, 10, 11, 13, 14, 0};
// char AImg[7] = {8, 9, 10, 11, 13, 14, 0};
int starty, qty, i;
helpText = "i145";
keyHelpText = "k045";
Expand Down Expand Up @@ -462,7 +462,7 @@ void AIRandomizeNauts()
void SelectBest(char plr, int pos)
{
int count = 0, now, MaxMen = 0, Index, AIMaxSel = 0, i, j;
FILE *fin;
// FILE *fin;
char tot, done;
struct BuzzData *pData = &Data->P[plr];

Expand Down
4 changes: 2 additions & 2 deletions src/game/ast1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,9 @@ void Recruit(const char plr, const uint8_t pool, const uint8_t candidate)

void AstSel(char plr)
{
int i, j, k, BarA, BarB, MaxMen, Index, now, now2, max, change, min, count,
int i, BarA, BarB, MaxMen, Index, now, now2, max, min, count,
ksel = 0;
FILE *fin;
// FILE *fin;

bool femaleAstronautsAllowed =
(options.feat_female_nauts ||
Expand Down
10 changes: 5 additions & 5 deletions src/game/bzanim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ size_t ImportAnimType(FILE *fin, struct AnimType &target)
*/
size_t ImportBlockHead(FILE *fin, struct BlockHead &target)
{
int32_t position = ftell(fin);
// int32_t position = ftell(fin);
bool success =
fread(&target.cType, sizeof(target.cType), 1, fin) &&
fread(&target.fSize, sizeof(target.fSize), 1, fin);
Expand Down Expand Up @@ -259,7 +259,7 @@ uint8_t *ReadFrame(FILE *fin, int width, int height)

assert(header.fSize < 128 * 1024);
uint8_t *buf = (uint8_t *)alloca(header.fSize);
fread(buf, header.fSize, 1, fin);
// fread(buf, header.fSize, 1, fin);

uint8_t *frame = new uint8_t[width * height];

Expand Down Expand Up @@ -339,9 +339,9 @@ void SeekAnimation(FILE *fin, const char *name)
// TODO: Add a check to make sure fname is found in file, else
// this becomes an infinite loop.
do {
fread(&indexEntry.ID[0], sizeof(indexEntry.ID), 1, fin);
fread(&indexEntry.offset, sizeof(indexEntry.offset), 1, fin);
fread(&indexEntry.size, sizeof(indexEntry.size), 1, fin);
// fread(&indexEntry.ID[0], sizeof(indexEntry.ID), 1, fin);
// fread(&indexEntry.offset, sizeof(indexEntry.offset), 1, fin);
// fread(&indexEntry.size, sizeof(indexEntry.size), 1, fin);
} while (strncmp(indexEntry.ID, name, 4) != 0);

Swap32bit(indexEntry.offset);
Expand Down
6 changes: 3 additions & 3 deletions src/game/fireworks.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class Fireworks
Fireworks(int player);
~Fireworks();

void step();
void advance();
void clear();
void step();
private:
struct Burst {
uint8_t color;
Expand All @@ -42,11 +42,11 @@ class Fireworks
};

const unsigned int mParticles;
const int mPlayer;
int mBombAge;
const int mPlayer;
int mMinInitSpeed;
int mMaxBombLife;
int mMaxInitSpeed;
int mMinInitSpeed;
Burst *mBomb;
display::LegacySurface *mBackground;

Expand Down
2 changes: 1 addition & 1 deletion src/game/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

LOG_DEFAULT_CATEGORY(filesys)

static DIR *save_dir;
//static DIR *save_dir;

/** used internally to find and open files */
typedef struct file {
Expand Down
6 changes: 3 additions & 3 deletions src/game/legacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void LegacyLoad(SaveFileHdr header, FILE *fin, size_t fileLength)
{
LEGACY_REPLAY *load_buffer = NULL;
uint16_t dataSize, compSize;
int i, j;
int i;
const int legacySize = 38866;
struct LegacyPlayers *legacyData;

Expand Down Expand Up @@ -221,7 +221,7 @@ void LegacyLoad(SaveFileHdr header, FILE *fin, size_t fileLength)
}

size_t readLen = compSize;
load_buffer = (LEGACY_REPLAY *)malloc(readLen);
// load_buffer = (LEGACY_REPLAY *)malloc(readLen);
fread(load_buffer, 1, readLen, fin);
RLED((char *) load_buffer, (char *)legacyData, compSize);
free(load_buffer);
Expand Down Expand Up @@ -288,7 +288,7 @@ void LegacyLoad(SaveFileHdr header, FILE *fin, size_t fileLength)

// Read the Event Data
load_buffer = (LEGACY_REPLAY *)malloc(eventSize);
fread(load_buffer, 1, eventSize, fin);
// fread(load_buffer, 1, eventSize, fin);
fclose(fin);

if (endianSwap) {
Expand Down
18 changes: 9 additions & 9 deletions src/game/mis_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ void DoPack(char plr, FILE *ffin, char mode, char *cde, char *fName,
while (attempt < NORM_TABLE && attempt < Mob.size()) {
strncpy(Val2, &Mob[attempt].Code[0],
sizeof(Mob[attempt].Code));
int maxlength = MIN(strlen(Val2), sizeof(Val2));
// int maxlength = MIN(strlen(Val2), sizeof(Val2));

if (strncmp(Val1, Val2, strlen(Val2)) == 0) {
break;
Expand Down Expand Up @@ -832,9 +832,9 @@ void DoPack(char plr, FILE *ffin, char mode, char *cde, char *fName,
fseek(ffin, location_in_file, SEEK_SET);
{
display::AutoPal p(display::graphics.legacyScreen());
fread(&p.pal[off * 3], 48, 1, ffin);
// fread(&p.pal[off * 3], 48, 1, ffin);
}
fread(boob.pixels(), 1564, 1, ffin);
// fread(boob.pixels(), 1564, 1, ffin);

for (int i = 0; i < 782; i++) {
bot[i + 782] = ((bot[i] & 0xF0F0) >> 4);
Expand Down Expand Up @@ -894,7 +894,7 @@ void GuyDisp(int xa, int ya, Astros* Guy)
* \param text description of the problem encountered.
* \return 0 to continue the mission, 1 to scrub.
*/
char FailureMode(char plr, int prelim, const char* text)
char FailureMode(char plr, int prelim, char *text)
{
display::LegacySurface saveScreen(display::graphics.screen()->width(), display::graphics.screen()->height());
FadeOut(2, 10, 0, 0);
Expand Down Expand Up @@ -1433,9 +1433,9 @@ int ImportInfin(FILE* fin, Infin& target)
// char Code[9], Qty;
// int16_t List[10];
// };
fread(&target.Code[0], sizeof(target.Code), 1, fin);
fread(&target.Qty, sizeof(target.Qty), 1, fin);
fread(&target.List[0], sizeof(target.List), 1, fin);
// fread(&target.Code[0], sizeof(target.Code), 1, fin);
// fread(&target.Qty, sizeof(target.Qty), 1, fin);
// fread(&target.List[0], sizeof(target.List), 1, fin);

for (int i = 0; i < 10; i++) {
Swap16bit(target.List[i]);
Expand All @@ -1458,8 +1458,8 @@ int ImportOF(FILE* fin, OF& target)
// char Name[8];
// int16_t idx;
// };
fread(&target.Name[0], sizeof(target.Name), 1, fin);
fread(&target.idx, sizeof(target.idx), 1, fin);
// fread(&target.Name[0], sizeof(target.Name), 1, fin);
// fread(&target.idx, sizeof(target.idx), 1, fin);
Swap16bit(target.idx);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/news.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void GoNews(char plr)
// Open News Constructs a complete event array.
void OpenNews(char plr, char *buf, int bud)
{
int size = 250;
// int size = 250;
//size = (plr == 0) ? 232 : 177;

LoadEventData(plr);
Expand Down Expand Up @@ -211,7 +211,7 @@ void OpenNews(char plr, char *buf, int bud)
char old[120];

if (messages != NULL) {
fread(&old, sizeof(old), 1, messages);
// fread(&old, sizeof(old), 1, messages);

if (old[0] != 0x00) {
if (Option == 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/game/place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,9 +1063,9 @@ void Draw_Mis_Stats(int plr, int index, int mode)
tin = sOpen("REPL.TMP", "rb", FT_SAVE);
{
display::AutoPal p(display::graphics.legacyScreen());
fread(p.pal, 768, 1, tin);
// fread(p.pal, 768, 1, tin);
}
fread(display::graphics.legacyScreen()->pixels(), 64000, 1, tin);
// fread(display::graphics.legacyScreen()->pixels(), 64000, 1, tin);
fclose(tin);
FadeIn(2, 10, 0, 0);
key = 0;
Expand Down
Loading
Loading