]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui.cpp
Small change: CVS -> SVN in About dialog.
[virtualjaguar] / src / gui.cpp
index 38fc12841d44b027a41acaa994319eeb1a6a91ba..9c8ec59e80f39f6678d9016dc74875d5e5f0f52b 100644 (file)
@@ -5,6 +5,8 @@
 // by James L. Hammons
 //
 
+#include "gui.h"
+
 #include <stdarg.h>
 #include <sys/types.h>                                                         // For MacOS <dirent.h> dependency
 #include <dirent.h>
@@ -24,7 +26,9 @@
 #include "zlib.h"
 #include "unzip.h"
 #include "sdlemu_opengl.h"
-#include "gui.h"
+#include "log.h"
+#include "jaguar.h"
+#include "eeprom.h"
 
 using namespace std;                                                           // For STL stuff
 
@@ -68,7 +72,7 @@ bool exitGUI = false;                                                         // GUI (emulator) done variable
 int mouseX = 0, mouseY = 0;
 uint32 background[1280 * 256];                                         // GUI background buffer
 
-char separator[] = "--------------------------------------------------------";
+const char separator[] = "--------------------------------------------------------";
 
 //
 // Case insensitive string compare function
@@ -80,7 +84,7 @@ int stringCmpi(const string &s1, const string &s2)
        // Select the first element of each string:
        string::const_iterator p1 = s1.begin(), p2 = s2.begin();
 
-       while (p1 != s1.end() && p2 != s2.end())                // Don\92t run past the end
+       while (p1 != s1.end() && p2 != s2.end())                // Dont run past the end
        {
                if (toupper(*p1) != toupper(*p2))                       // Compare upper-cased chars
                        return (toupper(*p1) < toupper(*p2) ? -1 : 1);// Report which was lexically greater
@@ -216,7 +220,7 @@ void Button::Draw(uint32 offsetX/*= 0*/, uint32 offsetY/*= 0*/)
                        {
                                // Doesn't clip in y axis! !!! FIX !!!
                                if (extents.x + x < pitch)
-                                       screenBuffer[addr + x + (y * pitch)] 
+                                       screenBuffer[addr + x + (y * pitch)]
 //                                     = (clicked && inside ? fgColor : (inside ? 0x43F0 : bgColor));
 //43F0 -> 010000 11111 10000 -> 0100 0001 1111 1111 1000 0100 -> 41 FF 84
                                                = (clicked && inside ? fgColor : (inside ? 0xFF84FF41 : bgColor));
@@ -329,7 +333,7 @@ void PushButton::Draw(uint32 offsetX/*= 0*/, uint32 offsetY/*= 0*/)
                {
                        // Doesn't clip in y axis! !!! FIX !!!
                        if (extents.x + x < pitch)
-                               screenBuffer[addr + x + (y * pitch)] 
+                               screenBuffer[addr + x + (y * pitch)]
                                        = (clicked && inside ? fgColor : (inside ? 0x43F0 : bgColor));
                }
        }*/
@@ -625,7 +629,7 @@ void TextEdit::HandleKey(SDLKey key)
        }
        else if (key == SDLK_BACKSPACE)
        {
-               
+
        }
        else if (key == SDLK_DELETE)
        {
@@ -947,14 +951,14 @@ FileList::FileList(uint32 x, uint32 y, uint32 w, uint32 h): Window(x, y, w, h)
                while ((de = readdir(dp)) != NULL)
                {
                        char * ext = strrchr(de->d_name, '.');
-       
+
                        if (ext != NULL)
                                if (strcasecmp(ext, ".zip") == 0 || strcasecmp(ext, ".j64") == 0
                                        || strcasecmp(ext, ".abs") == 0 || strcasecmp(ext, ".jag") == 0
                                        || strcasecmp(ext, ".rom") == 0)
                                        files->AddItem(string(de->d_name));
                }
-       
+
                closedir(dp);
        }
        else
@@ -1043,7 +1047,7 @@ class MenuItems
 class Menu: public Element
 {
        public:
-// 1CFF -> 0 001 11 00  111 1 1111 
+// 1CFF -> 0 001 11 00  111 1 1111
 // 421F -> 0 100 00 10  000 1 1111
                Menu(uint32 x = 0, uint32 y = 0, uint32 w = 0, uint32 h = FONT_HEIGHT,
 /*                     uint16 fgc = 0x1CFF, uint16 bgc = 0x000F, uint16 fgch = 0x421F,
@@ -1685,7 +1689,7 @@ Bitmap ptr = { 6, 8, 4,
 //"000011112222333344445555"
 //"000011112222333344445555"
 //"000011112222333344445555"
-};//*/ 
+};//*/
        uint32 * overlayPixels = (uint32 *)sdlemuGetOverlayPixels();
        uint32 count = 2;
 
@@ -1998,7 +2002,7 @@ return NULL;//*/
                        DrawStringTrans(backbuffer, 8, 27*8, 0xFF1FFF3F, transparency, "CRC: %08X", jaguar_mainRom_crc32);
 
                        if (showMsgFrames == 0)
-                       {                       
+                       {
                                transparency++;
 
                                if (transparency == 33)
@@ -2070,7 +2074,7 @@ Window * RunEmu(void)
        else if (jaguar_mainRom_crc32 == 0x55A0669C)
                cartType = 3;
 
-       char * cartTypeName[5] = { "2M Cartridge", "4M Cartridge", "CD BIOS", "CD Dev BIOS", "Homebrew" };
+       const char * cartTypeName[5] = { "2M Cartridge", "4M Cartridge", "CD BIOS", "CD Dev BIOS", "Homebrew" };
        uint32 elapsedTicks = SDL_GetTicks(), frameCount = 0, framesPerSecond = 0;
 
        while (!finished)
@@ -2109,7 +2113,7 @@ else
                        DrawString2(overlayPixels, 8, 27*FONT_HEIGHT, 0x001FFF3F, transparency, "CRC: %08X", jaguar_mainRom_crc32);
 
                        if (showMsgFrames == 0)
-                       {                       
+                       {
                                transparency--;
 
                                if (transparency == 0)
@@ -2160,7 +2164,7 @@ Window * About(void)
 {
        char buf[512];
 //     sprintf(buf, "Virtual Jaguar CVS %s", __DATE__);
-       sprintf(buf, "CVS %s", __DATE__);
+       sprintf(buf, "SVN %s", __DATE__);
 //fprintf(fp, "VirtualJaguar v1.0.8 (Last full build was on %s %s)\n", __DATE__, __TIME__);
 //VirtualJaguar v1.0.8 (Last full build was on Dec 30 2004 20:01:31)
 //Hardwired, bleh... !!! FIX !!!