// by James L. Hammons
//
+#include "gui.h"
+
#include <stdarg.h>
#include <sys/types.h> // For MacOS <dirent.h> dependency
#include <dirent.h>
#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
int mouseX = 0, mouseY = 0;
uint32 background[1280 * 256]; // GUI background buffer
-char separator[] = "--------------------------------------------------------";
+const char separator[] = "--------------------------------------------------------";
//
// Case insensitive string compare function
// 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()) // Don�t 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
{
// 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));
{
// 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));
}
}*/
}
else if (key == SDLK_BACKSPACE)
{
-
+
}
else if (key == SDLK_DELETE)
{
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
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,
//"000011112222333344445555"
//"000011112222333344445555"
//"000011112222333344445555"
-};//*/
+};//*/
uint32 * overlayPixels = (uint32 *)sdlemuGetOverlayPixels();
uint32 count = 2;
DrawStringTrans(backbuffer, 8, 27*8, 0xFF1FFF3F, transparency, "CRC: %08X", jaguar_mainRom_crc32);
if (showMsgFrames == 0)
- {
+ {
transparency++;
if (transparency == 33)
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)
DrawString2(overlayPixels, 8, 27*FONT_HEIGHT, 0x001FFF3F, transparency, "CRC: %08X", jaguar_mainRom_crc32);
if (showMsgFrames == 0)
- {
+ {
transparency--;
if (transparency == 0)
{
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 !!!