From: Shamus Hammons Date: Tue, 21 Oct 2014 01:02:42 +0000 (-0500) Subject: Miscellaneous fixes, plus extra whitespace munging for good effect. X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=virtualjaguar;a=commitdiff_plain;h=1249f1ad7191432e9fb8b3162ebb1d66a94fdcb9 Miscellaneous fixes, plus extra whitespace munging for good effect. Fixed a bug in the TOM 16 bit LUTs, the red value mask was wrong. Fixed a typo in jaguar.cpp. Added feedback to user if they tried to pass in a filename to a piece of software that wasn't found. And some whitespace futzing, because that's how we roll. :-) --- diff --git a/res/vj-ico.o b/res/vj-ico.o deleted file mode 100644 index d8d5bf8..0000000 Binary files a/res/vj-ico.o and /dev/null differ diff --git a/src/gui/app.cpp b/src/gui/app.cpp index c0e434d..8cf3f1e 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -61,11 +61,11 @@ int main(int argc, char * argv[]) if (AttachConsole != NULL && AttachConsole(((DWORD)-1))) { if (_fileno(stdout) == -1) - freopen("CONOUT$","wb",stdout); + freopen("CONOUT$", "wb", stdout); if (_fileno(stderr) == -1) - freopen("CONOUT$","wb",stderr); + freopen("CONOUT$", "wb", stderr); if (_fileno(stdin) == -1) - freopen("CONIN$","rb",stdin); + freopen("CONIN$", "rb", stdin); // Fix C++ std::ios::sync_with_stdio(); @@ -123,7 +123,8 @@ int main(int argc, char * argv[]) fclose(ctt); #endif #endif - LogDone(); // Close logfile + // Close logfile + LogDone(); return retVal; } @@ -136,12 +137,18 @@ App::App(int & argc, char * argv[]): QApplication(argc, argv) mainWindow = new MainWin(loadAndGo); mainWindow->plzDontKillMyComputer = noUntunedTankPlease; - ParseOptions(argc, argv); // Override defaults with command line (if any) + // Override defaults with command line (if any) + ParseOptions(argc, argv); mainWindow->SyncUI(); if (loadAndGo) + { mainWindow->LoadFile(filename); + if (!mainWindow->cartridgeLoaded) + printf("Could not load file \"%s\"!\n", filename.toAscii().data()); + } + mainWindow->show(); } @@ -337,3 +344,4 @@ void ParseOptions(int argc, char * argv[]) char alpineROMPath[MAX_PATH]; char absROMPath[MAX_PATH]; #endif + diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index a87289d..4263cb1 100644 --- a/src/gui/mainwin.h +++ b/src/gui/mainwin.h @@ -92,7 +92,9 @@ class MainWin: public QMainWindow int zoomLevel; bool powerButtonOn; bool showUntunedTankCircuit; + public: bool cartridgeLoaded; + private: bool allowUnknownSoftware; bool CDActive; // bool alpineLoadSuccessful; diff --git a/src/jaguar.cpp b/src/jaguar.cpp index c717431..ac8a430 100644 --- a/src/jaguar.cpp +++ b/src/jaguar.cpp @@ -182,7 +182,7 @@ if (inRoutine) if (m68kPC & 0x01) // Oops! We're fetching an odd address! { - WriteLog("M68K: Attempted to execute from an odd adress!\n\nBacktrace:\n\n"); + WriteLog("M68K: Attempted to execute from an odd address!\n\nBacktrace:\n\n"); static char buffer[2048]; for(int i=0; i<0x400; i++) diff --git a/src/tom.cpp b/src/tom.cpp index 34d7696..dc44995 100644 --- a/src/tom.cpp +++ b/src/tom.cpp @@ -576,7 +576,8 @@ void TOMFillLookupTables(void) // | ((i & 0x07C0) << 13) | ((i & 0x0700) << 8) // | ((i & 0x003F) << 10) | ((i & 0x0030) << 4); RGB16ToRGB32[i] = 0x000000FF - | ((i & 0xF100) << 16) // Red +// | ((i & 0xF100) << 16) // Red + | ((i & 0xF800) << 16) // Red | ((i & 0x003F) << 18) // Green | ((i & 0x07C0) << 5); // Blue