From 0eabcebc46d2be131c560aa5aea6054ae4aad032 Mon Sep 17 00:00:00 2001 From: ugetab Date: Fri, 21 May 2010 23:43:39 +0000 Subject: [PATCH] Made it possible to compile this in VC++ 2008 Express. --- mednafen/src/file.cpp | 50 ++++++++++++++++++------------------ mednafen/src/mednafen.cpp | 8 +++--- mednafen/src/memory.cpp | 6 ++--- mednafen/src/mempatcher.cpp | 10 ++++---- mednafen/src/settings.cpp | 38 +++++++++++++-------------- mednafen/src/state.cpp | 20 +++++++-------- mednafen/src/vb/vb.cpp | 14 +++++----- mednafen/src/video/png.cpp | 2 +- mednafen/src/video/video.cpp | 4 +-- types.h | 4 ++- vbjin.vcproj | 12 +++++++-- vc10_vbjin.vcxproj | 6 ++--- 12 files changed, 92 insertions(+), 82 deletions(-) diff --git a/mednafen/src/file.cpp b/mednafen/src/file.cpp index af00d89..f38cd5a 100644 --- a/mednafen/src/file.cpp +++ b/mednafen/src/file.cpp @@ -81,12 +81,12 @@ bool MDFNFILE::ApplyIPS(MDFNFILE *ips) uint8 header[5]; uint32 count = 0; - //MDFN_printf(_("Applying IPS file \"%s\"...\n"), path); + //MDFN_printf("Applying IPS file \"%s\"...\n", path); MDFN_indent(1); if(ips->fread(header, 1, 5) != 5 || memcmp(header, "PATCH", 5)) { - MDFN_PrintError(_("IPS file \"%s\" is not valid!"), /*path*/ ""); // FIXME + MDFN_PrintError("IPS file \"%s\" is not valid!", /*path*/ ""); // FIXME MDFN_indent(-1); return(0); } @@ -120,7 +120,7 @@ bool MDFNFILE::ApplyIPS(MDFNFILE *ips) if(!memcmp(header, "EOF", 3)) { - MDFN_printf(_("IPS EOF: Did %d patches\n\n"),count); + MDFN_printf("IPS EOF: Did %d patches\n\n",count); MDFN_indent(-1); return(1); } @@ -147,7 +147,7 @@ bool MDFNFILE::ApplyIPS(MDFNFILE *ips) if((offset + patch_size) > MaxROMImageSize) { - MDFN_PrintError(_("ROM image will be too large after IPS patch; maximum size allowed is %llu bytes."), (unsigned long long)MaxROMImageSize); + MDFN_PrintError("ROM image will be too large after IPS patch; maximum size allowed is %llu bytes.", (unsigned long long)MaxROMImageSize); return(0); } @@ -195,8 +195,8 @@ bool MDFNFILE::ApplyIPS(MDFNFILE *ips) count++; } - MDFN_printf(_("Warning: IPS ended without an EOF chunk.\n")); - MDFN_printf(_("IPS EOF: Did %d patches\n\n"), count); + MDFN_printf("Warning: IPS ended without an EOF chunk.\n"); + MDFN_printf("IPS EOF: Did %d patches\n\n", count); MDFN_indent(-1); @@ -222,7 +222,7 @@ bool MDFNFILE::MakeMemWrap(void *tz, int type) if(size > MaxROMImageSize) { - MDFN_PrintError(_("ROM image is too large; maximum size allowed is %llu bytes."), (unsigned long long)MaxROMImageSize); + MDFN_PrintError("ROM image is too large; maximum size allowed is %llu bytes.", (unsigned long long)MaxROMImageSize); goto doret; } @@ -241,7 +241,7 @@ bool MDFNFILE::MakeMemWrap(void *tz, int type) else { #endif - if(!(f_data = (uint8*)MDFN_malloc(size, _("file read buffer")))) + if(!(f_data = (uint8*)MDFN_malloc(size, "file read buffer"))) { goto doret; } @@ -260,7 +260,7 @@ bool MDFNFILE::MakeMemWrap(void *tz, int type) uint32_t cur_alloced = 65536; int howmany; - if(!(f_data = (uint8*)MDFN_malloc(cur_alloced, _("file read buffer")))) + if(!(f_data = (uint8*)MDFN_malloc(cur_alloced, "file read buffer"))) { goto doret; } @@ -269,13 +269,13 @@ bool MDFNFILE::MakeMemWrap(void *tz, int type) { cur_size += howmany; cur_alloced <<= 1; - if(!(f_data = (uint8 *)MDFN_realloc(f_data, cur_alloced, _("file read buffer")))) + if(!(f_data = (uint8 *)MDFN_realloc(f_data, cur_alloced, "file read buffer"))) { goto doret; } } - if(!(f_data = (uint8 *)MDFN_realloc(f_data, cur_size, _("file read buffer")))) + if(!(f_data = (uint8 *)MDFN_realloc(f_data, cur_size, "file read buffer"))) { goto doret; } @@ -291,11 +291,11 @@ bool MDFNFILE::MakeMemWrap(void *tz, int type) if(size > MaxROMImageSize) { - MDFN_PrintError(_("ROM image is too large; maximum size allowed is %llu bytes."), (unsigned long long)MaxROMImageSize); + MDFN_PrintError("ROM image is too large; maximum size allowed is %llu bytes.", (unsigned long long)MaxROMImageSize); goto doret; } - if(!(f_data=(uint8 *)MDFN_malloc(ufo.uncompressed_size, _("file read buffer")))) + if(!(f_data=(uint8 *)MDFN_malloc(ufo.uncompressed_size, "file read buffer"))) { goto doret; } @@ -360,7 +360,7 @@ bool MDFNFILE::Open(const char *path, const FileExtensionSpecStruct *known_ext, if((errcode = unzGoToFirstFile(tz)) != UNZ_OK) { - MDFN_PrintError(_("Could not seek to first file in ZIP archive: %s"), unzErrorString(errcode)); + MDFN_PrintError("Could not seek to first file in ZIP archive: %s", unzErrorString(errcode)); unzClose(tz); return(NULL); @@ -376,7 +376,7 @@ bool MDFNFILE::Open(const char *path, const FileExtensionSpecStruct *known_ext, if((errcode = unzGetCurrentFileInfo(tz, 0, tempu, 1024, 0, 0, 0, 0)) != UNZ_OK) { - MDFN_PrintError(_("Could not get file information in ZIP archive: %s"), unzErrorString(errcode)); + MDFN_PrintError("Could not get file information in ZIP archive: %s", unzErrorString(errcode)); unzClose(tz); return(NULL); @@ -403,14 +403,14 @@ bool MDFNFILE::Open(const char *path, const FileExtensionSpecStruct *known_ext, { if(errcode != UNZ_END_OF_LIST_OF_FILE) { - MDFN_PrintError(_("Error seeking to next file in ZIP archive: %s"), unzErrorString(errcode)); + MDFN_PrintError("Error seeking to next file in ZIP archive: %s", unzErrorString(errcode)); unzClose(tz); return(NULL); } if((errcode = unzGoToFirstFile(tz)) != UNZ_OK) { - MDFN_PrintError(_("Could not seek to first file in ZIP archive: %s"), unzErrorString(errcode)); + MDFN_PrintError("Could not seek to first file in ZIP archive: %s", unzErrorString(errcode)); unzClose(tz); return(NULL); } @@ -422,7 +422,7 @@ bool MDFNFILE::Open(const char *path, const FileExtensionSpecStruct *known_ext, if((errcode = unzOpenCurrentFile(tz)) != UNZ_OK) { - MDFN_PrintError(_("Could not open file in ZIP archive: %s"), unzErrorString(errcode)); + MDFN_PrintError("Could not open file in ZIP archive: %s", unzErrorString(errcode)); unzClose(tz); return(NULL); } @@ -448,7 +448,7 @@ bool MDFNFILE::Open(const char *path, const FileExtensionSpecStruct *known_ext, } if(ene.Errno() != ENOENT || !suppress_notfound_pe) - MDFN_PrintError(_("Error opening \"%s\": %s"), path, ene.StrError()); + MDFN_PrintError("Error opening \"%s\": %s", path, ene.StrError()); return(0); } @@ -644,7 +644,7 @@ static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const { ErrnoHolder ene(errno); - MDFN_PrintError(_("Error opening \"%s\": %s"), filename, ene.StrError()); + MDFN_PrintError("Error opening \"%s\": %s", filename, ene.StrError()); return(0); } @@ -657,7 +657,7 @@ static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const { int errnum; - MDFN_PrintError(_("Error writing to \"%s\": %s"), filename, gzerror(gp, &errnum)); + MDFN_PrintError("Error writing to \"%s\": %s", filename, gzerror(gp, &errnum)); gzclose(gp); return(0); } @@ -665,7 +665,7 @@ static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const if(gzclose(gp) != Z_OK) // FIXME: Huhm, how should we handle this? { - MDFN_PrintError(_("Error closing \"%s\""), filename); + MDFN_PrintError("Error closing \"%s\"", filename); return(0); } } @@ -676,7 +676,7 @@ static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const { ErrnoHolder ene(errno); - MDFN_PrintError(_("Error opening \"%s\": %s"), filename, ene.StrError()); + MDFN_PrintError("Error opening \"%s\": %s", filename, ene.StrError()); return(0); } @@ -689,7 +689,7 @@ static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const { ErrnoHolder ene(errno); - MDFN_PrintError(_("Error writing to \"%s\": %s"), filename, ene.StrError()); + MDFN_PrintError("Error writing to \"%s\": %s", filename, ene.StrError()); fclose(fp); return(0); } @@ -699,7 +699,7 @@ static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const { ErrnoHolder ene(errno); - MDFN_PrintError(_("Error closing \"%s\": %s"), filename, ene.StrError()); + MDFN_PrintError("Error closing \"%s\": %s", filename, ene.StrError()); return(0); } } diff --git a/mednafen/src/mednafen.cpp b/mednafen/src/mednafen.cpp index ccd6344..883e4a2 100644 --- a/mednafen/src/mednafen.cpp +++ b/mednafen/src/mednafen.cpp @@ -29,7 +29,7 @@ MDFNGI *MDFNI_LoadGame(const char *force_module, const char *name) MDFNGameInfo = NULL; - MDFN_printf(_("Loading %s...\n"),name); + MDFN_printf("Loading %s...\n",name); //MDFN_indent(1); @@ -62,7 +62,7 @@ MDFNGI *MDFNI_LoadGame(const char *force_module, const char *name) valid_iae.push_back(tmpext); } #endif - if(!GameFile.Open(name, NULL, _("game")))//&valid_iae[0] + if(!GameFile.Open(name, NULL, "game"))//&valid_iae[0] { MDFNGameInfo = NULL; return 0; @@ -118,13 +118,13 @@ extern MDFNGI EmulatedVB; { GameFile.Close(); - MDFN_PrintError(_("Unrecognized file format. Sorry.")); + MDFN_PrintError("Unrecognized file format. Sorry."); // MDFN_indent(-1); MDFNGameInfo = NULL; return 0; } - MDFN_printf(_("Using module: %s(%s)\n\n"), MDFNGameInfo->shortname, MDFNGameInfo->fullname); + MDFN_printf("Using module: %s(%s)\n\n", MDFNGameInfo->shortname, MDFNGameInfo->fullname); //MDFN_indent(1); assert(MDFNGameInfo->soundchan != 0); diff --git a/mednafen/src/memory.cpp b/mednafen/src/memory.cpp index c089e32..ad68a70 100644 --- a/mednafen/src/memory.cpp +++ b/mednafen/src/memory.cpp @@ -34,7 +34,7 @@ void *MDFN_calloc_real(uint32 nmemb, uint32 size, const char *purpose, const cha if(!ret) { - MDFN_PrintError(_("Error allocating(calloc) %u bytes for \"%s\" in %s(%d)!"), size, purpose, _file, _line); + MDFN_PrintError("Error allocating(calloc) %u bytes for \"%s\" in %s(%d)!", size, purpose, _file, _line); return(0); } return ret; @@ -48,7 +48,7 @@ void *MDFN_malloc_real(uint32 size, const char *purpose, const char *_file, cons if(!ret) { - MDFN_PrintError(_("Error allocating(malloc) %u bytes for \"%s\" in %s(%d)!"), size, purpose, _file, _line); + MDFN_PrintError("Error allocating(malloc) %u bytes for \"%s\" in %s(%d)!", size, purpose, _file, _line); return(0); } return ret; @@ -62,7 +62,7 @@ void *MDFN_realloc_real(void *ptr, uint32 size, const char *purpose, const char if(!ret) { - MDFN_PrintError(_("Error allocating(realloc) %u bytes for \"%s\" in %s(%d)!"), size, purpose, _file, _line); + MDFN_PrintError("Error allocating(realloc) %u bytes for \"%s\" in %s(%d)!", size, purpose, _file, _line); return(0); } return ret; diff --git a/mednafen/src/mempatcher.cpp b/mednafen/src/mempatcher.cpp index 86b23ee..ed9a90c 100644 --- a/mednafen/src/mempatcher.cpp +++ b/mednafen/src/mempatcher.cpp @@ -163,7 +163,7 @@ void MDFNMP_RemoveReadPatches(void) static void CheatMemErr(void) { - MDFN_PrintError(_("Error allocating memory for cheat data.")); + MDFN_PrintError("Error allocating memory for cheat data."); } /* This function doesn't allocate any memory for "name" */ @@ -228,14 +228,14 @@ void MDFN_LoadGameCheats(FILE *override) std::string fn = MDFN_MakeFName(MDFNMKF_CHEAT,0,0).c_str(); MDFN_printf("\n"); - MDFN_printf(_("Loading cheats from %s...\n"), fn.c_str()); + MDFN_printf("Loading cheats from %s...\n", fn.c_str()); // MDFN_indent(1); if(!(fp = fopen(fn.c_str(),"rb"))) { // ErrnoHolder ene(errno); - // MDFN_printf(_("Error opening file: %s\n"), ene.StrError()); + // MDFN_printf("Error opening file: %s\n", ene.StrError()); // MDFN_indent(-1); return; } @@ -262,7 +262,7 @@ void MDFN_LoadGameCheats(FILE *override) if(tbuf[0] != 'R' && tbuf[0] != 'C' && tbuf[0] != 'S') { - MDFN_printf(_("Invalid cheat type: %c\n"), tbuf[0]); + MDFN_printf("Invalid cheat type: %c\n", tbuf[0]); break; } type = tbuf[0]; @@ -310,7 +310,7 @@ void MDFN_LoadGameCheats(FILE *override) if(!override) { - MDFN_printf(_("%lu cheats loaded.\n"), (unsigned long)cheats.size()); + MDFN_printf("%lu cheats loaded.\n", (unsigned long)cheats.size()); // MDFN_indent(-1); fclose(fp); } diff --git a/mednafen/src/settings.cpp b/mednafen/src/settings.cpp index 692baeb..04abca0 100644 --- a/mednafen/src/settings.cpp +++ b/mednafen/src/settings.cpp @@ -137,7 +137,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) if(!TranslateSettingValueUI(value, ullvalue)) { - MDFN_PrintError(_("Setting \"%s\", value \"%s\", is not set to a valid unsigned integer."), setting->name, value); + MDFN_PrintError("Setting \"%s\", value \"%s\", is not set to a valid unsigned integer.", setting->name, value); return(0); } if(setting->minimum) @@ -147,7 +147,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) TranslateSettingValueUI(setting->minimum, minimum); if(ullvalue < minimum) { - MDFN_PrintError(_("Setting \"%s\" is set too small(\"%s\"); the minimum acceptable value is \"%s\"."), setting->name, value, setting->minimum); + MDFN_PrintError("Setting \"%s\" is set too small(\"%s\"); the minimum acceptable value is \"%s\".", setting->name, value, setting->minimum); return(0); } } @@ -158,7 +158,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) TranslateSettingValueUI(setting->maximum, maximum); if(ullvalue > maximum) { - MDFN_PrintError(_("Setting \"%s\" is set too large(\"%s\"); the maximum acceptable value is \"%s\"."), setting->name, value, setting->maximum); + MDFN_PrintError("Setting \"%s\" is set too large(\"%s\"); the maximum acceptable value is \"%s\".", setting->name, value, setting->maximum); return(0); } } @@ -169,7 +169,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) if(!TranslateSettingValueI(value, llvalue)) { - MDFN_PrintError(_("Setting \"%s\", value \"%s\", is not set to a valid signed integer."), setting->name, value); + MDFN_PrintError("Setting \"%s\", value \"%s\", is not set to a valid signed integer.", setting->name, value); return(0); } if(setting->minimum) @@ -179,7 +179,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) TranslateSettingValueI(setting->minimum, minimum); if(llvalue < minimum) { - MDFN_PrintError(_("Setting \"%s\" is set too small(\"%s\"); the minimum acceptable value is \"%s\"."), setting->name, value, setting->minimum); + MDFN_PrintError("Setting \"%s\" is set too small(\"%s\"); the minimum acceptable value is \"%s\".", setting->name, value, setting->minimum); return(0); } } @@ -190,7 +190,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) TranslateSettingValueI(setting->maximum, maximum); if(llvalue > maximum) { - MDFN_PrintError(_("Setting \"%s\" is set too large(\"%s\"); the maximum acceptable value is \"%s\"."), setting->name, value, setting->maximum); + MDFN_PrintError("Setting \"%s\" is set too large(\"%s\"); the maximum acceptable value is \"%s\".", setting->name, value, setting->maximum); return(0); } } @@ -204,7 +204,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) if(!endptr || *endptr != 0) { - MDFN_PrintError(_("Setting \"%s\", value \"%s\", is not set to a floating-point(real) number."), setting->name, value); + MDFN_PrintError("Setting \"%s\", value \"%s\", is not set to a floating-point(real) number.", setting->name, value); return(0); } if(setting->minimum) @@ -214,7 +214,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) // minimum = world_strtod(setting->minimum, NULL); if(dvalue < minimum) { - MDFN_PrintError(_("Setting \"%s\" is set too small(\"%s\"); the minimum acceptable value is \"%s\"."), setting->name, value, setting->minimum); + MDFN_PrintError("Setting \"%s\" is set too small(\"%s\"); the minimum acceptable value is \"%s\".", setting->name, value, setting->minimum); return(0); } } @@ -225,7 +225,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) // maximum = world_strtod(setting->maximum, NULL); if(dvalue > maximum) { - MDFN_PrintError(_("Setting \"%s\" is set too large(\"%s\"); the maximum acceptable value is \"%s\"."), setting->name, value, setting->maximum); + MDFN_PrintError("Setting \"%s\" is set too large(\"%s\"); the maximum acceptable value is \"%s\".", setting->name, value, setting->maximum); return(0); } } @@ -234,7 +234,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) { if(strlen(value) != 1 || (value[0] != '0' && value[0] != '1')) { - MDFN_PrintError(_("Setting \"%s\", value \"%s\", is not a valid boolean value."), setting->name, value); + MDFN_PrintError("Setting \"%s\", value \"%s\", is not a valid boolean value.", setting->name, value); return(0); } } @@ -257,7 +257,7 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) } while((++enum_list)->string); if(!found) { - MDFN_PrintError(_("Setting \"%s\", value \"%s\", is not a recognized string. Recognized strings: %s"), setting->name, value, valid_string_list.c_str()); + MDFN_PrintError("Setting \"%s\", value \"%s\", is not a recognized string. Recognized strings: %s", setting->name, value, valid_string_list.c_str()); return(0); } } @@ -266,9 +266,9 @@ static bool ValidateSetting(const char *value, const MDFNSetting *setting) if(setting->validate_func && !setting->validate_func(setting->name, value)) { if(base_type == MDFNST_STRING) - MDFN_PrintError(_("Setting \"%s\" is not set to a valid string: \"%s\""), setting->name, value); + MDFN_PrintError("Setting \"%s\" is not set to a valid string: \"%s\"", setting->name, value); else - MDFN_PrintError(_("Setting \"%s\" is not set to a valid unsigned integer: \"%s\""), setting->name, value); + MDFN_PrintError("Setting \"%s\" is not set to a valid unsigned integer: \"%s\"", setting->name, value); return(0); } @@ -292,14 +292,14 @@ bool MFDN_LoadSettings(const char *basedir) // fname += PSS; fname += "mednafen-09x.cfg"; - MDFN_printf(_("Loading settings from \"%s\"..."), fname.c_str()); + MDFN_printf("Loading settings from \"%s\"...", fname.c_str()); //printf("%s\n", fname.c_str()); if(!(fp = fopen(fname.c_str(), "rb"))) { //// ErrnoHolder ene(errno); -// MDFN_printf(_("Failed: %s\n"), ene.StrError()); +// MDFN_printf("Failed: %s\n", ene.StrError()); // if(ene.Errno() == ENOENT) // Don't return failure if the file simply doesn't exist. return(1); @@ -432,8 +432,8 @@ bool MDFN_SaveSettings(void) // trio_fprintf(fp, ";VERSION %s\n", MEDNAFEN_VERSION); - trio_fprintf(fp, _(";Edit this file at your own risk!\n")); - trio_fprintf(fp, _(";File format: \n\n")); + trio_fprintf(fp, ";Edit this file at your own risk!\n"); + trio_fprintf(fp, ";File format: \n\n"); for(sit = CurrentSettings.begin(); sit != CurrentSettings.end(); sit++) { @@ -447,7 +447,7 @@ bool MDFN_SaveSettings(void) for(lit = SortedList.begin(); lit != SortedList.end(); lit++) { - trio_fprintf(fp, ";%s\n%s %s\n\n", _((*lit)->desc->description), (*lit)->name, (*lit)->value); + trio_fprintf(fp, ";%s\n%s %s\n\n", (*lit)->desc->description, (*lit)->name, (*lit)->value); free((*lit)->name); free((*lit)->value); } @@ -682,7 +682,7 @@ bool MDFNI_SetSetting(const char *name, const char *value, bool NetplayOverride) } } - MDFN_PrintError(_("Unknown setting \"%s\""), name); + MDFN_PrintError("Unknown setting \"%s\"", name); return(0); } diff --git a/mednafen/src/state.cpp b/mednafen/src/state.cpp index 872c8c8..c81b8e2 100644 --- a/mednafen/src/state.cpp +++ b/mednafen/src/state.cpp @@ -656,7 +656,7 @@ int MDFNSS_Save(const char *fname, const char *suffix, const MDFN_Surface *surfa if(!MDFNGameInfo->StateAction) { - MDFN_DispMessage(_("Module \"%s\" doesn't support save states."), MDFNGameInfo->shortname); + MDFN_DispMessage("Module \"%s\" doesn't support save states.", MDFNGameInfo->shortname); return(0); } @@ -665,7 +665,7 @@ int MDFNSS_Save(const char *fname, const char *suffix, const MDFN_Surface *surfa if(st.data) free(st.data); if(!fname && !suffix) - MDFN_DispMessage(_("State %d save error."), CurrentState); + MDFN_DispMessage("State %d save error.", CurrentState); return(0); } @@ -675,7 +675,7 @@ int MDFNSS_Save(const char *fname, const char *suffix, const MDFN_Surface *surfa free(st.data); if(!fname && !suffix) - MDFN_DispMessage(_("State %d save error."),CurrentState); + MDFN_DispMessage("State %d save error.",CurrentState); return(0); } @@ -689,7 +689,7 @@ int MDFNSS_Save(const char *fname, const char *suffix, const MDFN_Surface *surfa RecentlySavedState = CurrentState; if(!fname && !suffix) - MDFN_DispMessage(_("State %d saved."),CurrentState); + MDFN_DispMessage("State %d saved.",CurrentState); return(1); } @@ -831,7 +831,7 @@ int MDFNSS_Load(const char *fname, const char *suffix) if(!MDFNGameInfo->StateAction) { - MDFN_DispMessage(_("Module \"%s\" doesn't support save states."), MDFNGameInfo->shortname); + MDFN_DispMessage("Module \"%s\" doesn't support save states.", MDFNGameInfo->shortname); return(0); } @@ -846,7 +846,7 @@ int MDFNSS_Load(const char *fname, const char *suffix) { if(!fname && !suffix) { - MDFN_DispMessage(_("State %d load error."),CurrentState); + MDFN_DispMessage("State %d load error.",CurrentState); SaveStateStatus[CurrentState]=0; } return(0); @@ -860,7 +860,7 @@ int MDFNSS_Load(const char *fname, const char *suffix) { LoadStateMovie((char*)MDFN_MakeFName(MDFNMKF_STATE,CurrentState,suffix).c_str()); SaveStateStatus[CurrentState]=1; - MDFN_DispMessage(_("State %d loaded."),CurrentState); + MDFN_DispMessage("State %d loaded.",CurrentState); SaveStateStatus[CurrentState]=1; } gzclose(st); @@ -869,7 +869,7 @@ int MDFNSS_Load(const char *fname, const char *suffix) else { SaveStateStatus[CurrentState]=1; - MDFN_DispMessage(_("State %d read error!"),CurrentState); + MDFN_DispMessage("State %d read error!",CurrentState); gzclose(st); return(0); } @@ -923,7 +923,7 @@ void MDFNSS_GetStateInfo(const char *filename, StateStatusStruct *status) if(width > 1024) width = 1024; if(height > 1024) height = 1024; - if(!(previewbuffer = (uint8 *)MDFN_malloc(3 * width * height, _("Save state preview buffer")))) + if(!(previewbuffer = (uint8 *)MDFN_malloc(3 * width * height, "Save state preview buffer"))) { StateShowPBWidth = 0; StateShowPBHeight = 0; @@ -970,7 +970,7 @@ void MDFNI_SelectState(int w) // MDFN_ResetMessages(); - StateStatusStruct *status = (StateStatusStruct*)MDFN_calloc(1, sizeof(StateStatusStruct), _("Save state status")); + StateStatusStruct *status = (StateStatusStruct*)MDFN_calloc(1, sizeof(StateStatusStruct), "Save state status"); memcpy(status->status, SaveStateStatus, 10 * sizeof(int)); diff --git a/mednafen/src/vb/vb.cpp b/mednafen/src/vb/vb.cpp index 7784d34..1e104c4 100644 --- a/mednafen/src/vb/vb.cpp +++ b/mednafen/src/vb/vb.cpp @@ -493,17 +493,17 @@ static int Load(const char *name, MDFNFILE *fp) else*/ game_title[0] = 0; - MDFN_printf(_("Title: %s\n"), game_title); - MDFN_printf(_("Game ID Code: %u\n"), MDFN_de32lsb(fp->data + (0xFFFFFDFB & (fp->size - 1)))); - MDFN_printf(_("Manufacturer Code: %d\n"), MDFN_de16lsb(fp->data + (0xFFFFFDF9 & (fp->size - 1)))); - MDFN_printf(_("Version: %u\n"), fp->data[0xFFFFFDFF & (fp->size - 1)]); + MDFN_printf("Title: %s\n", game_title); + MDFN_printf("Game ID Code: %u\n", MDFN_de32lsb(fp->data + (0xFFFFFDFB & (fp->size - 1)))); + MDFN_printf("Manufacturer Code: %d\n", MDFN_de16lsb(fp->data + (0xFFFFFDF9 & (fp->size - 1)))); + MDFN_printf("Version: %u\n", fp->data[0xFFFFFDFF & (fp->size - 1)]); - MDFN_printf(_("ROM: %dKiB\n"), (int)(fp->size / 1024)); - MDFN_printf(_("ROM MD5: 0x%s\n"), md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); + MDFN_printf("ROM: %dKiB\n", (int)(fp->size / 1024)); + MDFN_printf("ROM MD5: 0x%s\n", md5_context::asciistr(MDFNGameInfo->MD5, 0).c_str()); MDFN_printf("\n"); - MDFN_printf(_("V810 Emulation Mode: %s\n"), (cpu_mode == V810_EMU_MODE_ACCURATE) ? _("Accurate") : _("Fast")); + MDFN_printf("V810 Emulation Mode: %s\n", (cpu_mode == V810_EMU_MODE_ACCURATE) ? "Accurate" : "Fast"); VB_V810 = new V810(); VB_V810->Init(cpu_mode, true); diff --git a/mednafen/src/video/png.cpp b/mednafen/src/video/png.cpp index 1e20a88..eac21fd 100644 --- a/mednafen/src/video/png.cpp +++ b/mednafen/src/video/png.cpp @@ -64,7 +64,7 @@ int MDFN_SavePNGSnapshot(const char *fname, const MDFN_Surface *src, const MDFN_ uint8 *compmem = NULL; uLongf compmemsize = (uLongf)( (rect->h * (rect->w + 1) * 3 * 1.001 + 1) + 12 ); - if(!(compmem=(uint8 *)MDFN_malloc(compmemsize, _("PNG compression buffer")))) + if(!(compmem=(uint8 *)MDFN_malloc(compmemsize, "PNG compression buffer"))) return 0; if(!(pp=fopen(fname, "wb"))) diff --git a/mednafen/src/video/video.cpp b/mednafen/src/video/video.cpp index 3e6bbf0..d4fcfc7 100644 --- a/mednafen/src/video/video.cpp +++ b/mednafen/src/video/video.cpp @@ -57,11 +57,11 @@ void MDFNI_SaveSnapshot(const MDFN_Surface *src, const MDFN_Rect *DisplayRect) if(!MDFN_SavePNGSnapshot(fn.c_str(), src, DisplayRect)) throw(0); - MDFN_DispMessage(_("Screen snapshot %d saved."), u); + MDFN_DispMessage("Screen snapshot %d saved.", u); } catch(int x) { - MDFN_DispMessage(_("Error saving screen snapshot.")); + MDFN_DispMessage("Error saving screen snapshot."); } } #include "GPU_osd.h" diff --git a/types.h b/types.h index 72f49f0..029e808 100644 --- a/types.h +++ b/types.h @@ -35,7 +35,9 @@ typedef uint32_t uint32; #define lseek _lseek #define read _read -#define _ +//WTF? Just who in the FUCK would do this? +//Prevents VC2008 from compiling VBJin. Fix involved stripping _() tags from several items. +//#define _ #define MDFN_printf printf diff --git a/vbjin.vcproj b/vbjin.vcproj index bb00aa4..e31692e 100644 --- a/vbjin.vcproj +++ b/vbjin.vcproj @@ -629,11 +629,11 @@ > + + + + diff --git a/vc10_vbjin.vcxproj b/vc10_vbjin.vcxproj index 8999ecf..41dd328 100644 --- a/vc10_vbjin.vcxproj +++ b/vc10_vbjin.vcxproj @@ -46,13 +46,13 @@ <_ProjectFileVersion>10.0.30319.1 $(SolutionDir)\__bins\ - Debug\ + Debug_vc10\ true $(SolutionDir)\__bins\ - Release\ + Release_vc10\ $(SolutionDir)\__bins\ - ReleaseFastBuild\ + ReleaseFastBuild_vc10\ vbjin vbjin_debug