From 7d670af6da2675c4de9fd915ef6fa952782447d9 Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Thu, 28 May 2009 14:02:56 +0000 Subject: [PATCH] core: - many changes & fixes in OSD; winport: - fixed HUD editor for scaled window size; --- desmume/src/GPU.cpp | 66 +++--- desmume/src/GPU.h | 2 + desmume/src/GPU_osd.cpp | 131 +++++++++--- desmume/src/GPU_osd.h | 30 ++- desmume/src/MMU.cpp | 4 - desmume/src/NDSSystem.cpp | 3 +- desmume/src/saves.cpp | 31 ++- desmume/src/softrender.h | 27 ++- desmume/src/softrender_desmumefont.h | 267 +++++++++++++++++++++++- desmume/src/softrender_v3sysfont.h | 1 + desmume/src/windows/DeSmuME_2008.vcproj | 12 +- desmume/src/windows/aviout.cpp | 5 +- desmume/src/windows/hotkey.cpp | 13 +- desmume/src/windows/main.cpp | 102 +++------ desmume/src/windows/main.h | 2 - 15 files changed, 519 insertions(+), 177 deletions(-) diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index 267b0487f..1b3d61969 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -76,8 +76,6 @@ CACHE_ALIGN u8 *GPU_tempScanline; CACHE_ALIGN u8 sprWin[256]; OSDCLASS *osd = NULL; -OSDCLASS *osdA = NULL; -OSDCLASS *osdB = NULL; u16 gpu_angle = 0; @@ -609,6 +607,8 @@ GPU * GPU_Init(u8 l) g->setFinalColor3d_funcNum = 0; g->setFinalColorSpr = setFinalOBJColorSpecialNone; + + return g; } @@ -636,8 +636,6 @@ void GPU_Reset(GPU *g, u8 l) g->sprMem = ARM9MEM_BOBJ; // GPU core B g->dispx_st = (REG_DISPx*)(&ARM9Mem.ARM9_REG[REG_DISPB]); - delete osdB; - osdB = new OSDCLASS(1); } else { @@ -645,26 +643,12 @@ void GPU_Reset(GPU *g, u8 l) g->sprMem = ARM9MEM_AOBJ; // GPU core A g->dispx_st = (REG_DISPx*)(&ARM9Mem.ARM9_REG[0]); - delete osdA; - osdA = new OSDCLASS(0); } - - delete osd; - osd = new OSDCLASS(-1); - //DISP_FIFOclear(&g->disp_fifo); - memset(GPU_screen, 0, sizeof(GPU_screen)); - memset(GPU_tempScreen, 0, sizeof(GPU_tempScreen)); - - for(int i = 0; i < (256*192*2); i++) - ((u16*)GPU_screen)[i] = 0x7FFF; } void GPU_DeInit(GPU * gpu) { - delete osd; osd=NULL; - delete osdA; osdA=NULL; - delete osdB; osdB=NULL; - free(gpu); + free(gpu); } static void GPU_resortBGs(GPU *gpu) @@ -2439,24 +2423,44 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) // SCREEN FUNCTIONS /*****************************************************************************/ -int Screen_Init(int coreid) { - MainScreen.gpu = GPU_Init(0); - SubScreen.gpu = GPU_Init(1); +int Screen_Init(int coreid) +{ + MainScreen.gpu = GPU_Init(0); + SubScreen.gpu = GPU_Init(1); - return GPU_ChangeGraphicsCore(coreid); + memset(GPU_tempScreen, 0, sizeof(GPU_tempScreen)); + for(int i = 0; i < (256*192*2); i++) + ((u16*)GPU_screen)[i] = 0x7FFF; + disp_fifo.head = disp_fifo.tail = 0; + + if (osd) {delete osd; osd =NULL; } + osd = new OSDCLASS(-1); + + return GPU_ChangeGraphicsCore(coreid); } -void Screen_Reset(void) { - GPU_Reset(MainScreen.gpu, 0); - GPU_Reset(SubScreen.gpu, 1); +void Screen_Reset(void) +{ + GPU_Reset(MainScreen.gpu, 0); + GPU_Reset(SubScreen.gpu, 1); + + memset(GPU_tempScreen, 0, sizeof(GPU_tempScreen)); + for(int i = 0; i < (256*192*2); i++) + ((u16*)GPU_screen)[i] = 0x7FFF; + + disp_fifo.head = disp_fifo.tail = 0; + osd->clear(); } -void Screen_DeInit(void) { - GPU_DeInit(MainScreen.gpu); - GPU_DeInit(SubScreen.gpu); +void Screen_DeInit(void) +{ + GPU_DeInit(MainScreen.gpu); + GPU_DeInit(SubScreen.gpu); - if (GFXCore) - GFXCore->DeInit(); + if (GFXCore) + GFXCore->DeInit(); + + if (osd) {delete osd; osd =NULL; } } /*****************************************************************************/ diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index 863ba2634..d0f3c4ac4 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -978,5 +978,7 @@ void gpu_SetRotateScreen(u16 angle); //#undef FORCEINLINE //#define FORCEINLINE __forceinline +extern OSDCLASS *osd; + #endif diff --git a/desmume/src/GPU_osd.cpp b/desmume/src/GPU_osd.cpp index 8d8a98ce3..4e261aba9 100644 --- a/desmume/src/GPU_osd.cpp +++ b/desmume/src/GPU_osd.cpp @@ -41,31 +41,34 @@ OSDCLASS::OSDCLASS(u8 core) { memset(screen, 0, sizeof(screen)); memset(name,0,7); - //memset(line, 0, sizeof(line)); - memset(timer, 0, sizeof(timer)); - memset(color, 0, sizeof(color)); - old_msg = new char[512]; - memset(old_msg, 0, 512); - - current_color = 0x8F; mode=core; offset=0; - startline=0; - lastline=0; + + lastLineText=0; + lineText_x = 5; + lineText_y = 120; + lineText_color = render51.MakeColor(255, 255, 255); + for (int i=0; i < OSD_MAX_LINES+1; i++) + { + lineText[i] = new char[1024]; + memset(lineText[i], 0, 1024); + lineTimer[i] = OSD_TIMER_SIZE; + lineColor[i] = lineText_color; + } rotAngle = 0; needUpdate = false; if (core==0) - memcpy(name,"Core A",6); + strcpy(name,"Core A"); else if (core==1) - memcpy(name,"Core B",6); + strcpy(name,"Core B"); else { - memcpy(name,"Main",6); + strcpy(name,"Main"); mode=255; } @@ -80,6 +83,8 @@ OSDCLASS::OSDCLASS(u8 core) screenshell.cy1 = 0; screenshell.cy2 = 384-1; + border(false); + LOG("OSD_Init (%s)\n",name); } @@ -87,7 +92,12 @@ OSDCLASS::~OSDCLASS() { LOG("OSD_Deinit (%s)\n",name); - delete[] old_msg; + for (int i=0; i < OSD_MAX_LINES+1; i++) + { + if (lineText[i]) + delete [] lineText[i]; + lineText[i] = NULL; + } } void OSDCLASS::setOffset(u16 ofs) @@ -131,19 +141,52 @@ void OSDCLASS::setRotate(u16 angle) void OSDCLASS::clear() { memset(screen, 0, sizeof(screen)); - memset(line, 0, sizeof(line)); - memset(timer, 0, sizeof(timer)); needUpdate=false; } -void OSDCLASS::setColor(u16 col) +bool OSDCLASS::checkTimers() { - current_color = col; + if (lastLineText == 0) return false; + + for (int i=0; i < lastLineText; i++) + { + if (lineTimer[i] > 0) lineTimer[i]--; + + if (lineTimer[i] == 0) + { + if (i < lastLineText) + { + for (int j=i; j < lastLineText; j++) + { + strcpy(lineText[j], lineText[j+1]); + lineTimer[j] = lineTimer[j+1]; + lineColor[j] = lineColor[j+1]; + } + } + lastLineText--; + if (lastLineText == 0) return false; + } + } + return true; } -void OSDCLASS::update() // don't optimized +void OSDCLASS::update() { - if (!needUpdate) return; // don't update if buffer empty (speed up) + if ( (!needUpdate) && (!lastLineText) ) return; // don't update if buffer empty (speed up) + if (lastLineText) + { + if (checkTimers()) + { + for (int i=0; i < lastLineText; i++) + { + render51.PrintString(1,lineText_x,lineText_y+(i*16),lineColor[i],lineText[i],&screenshell); + } + } + else + { + if (!needUpdate) return; + } + } u16 *dst = (u16*)GPU_screen; @@ -157,9 +200,45 @@ void OSDCLASS::update() // don't optimized } } +void OSDCLASS::setListCoord(u16 x, u16 y) +{ + lineText_x = x; + lineText_y = y; +} + +void OSDCLASS::setLineColor(u8 r=255, u8 b=255, u8 g=255) +{ + lineText_color = render51.MakeColor(r, g, b); +} + void OSDCLASS::addLine(const char *fmt, ...) { + va_list list; + if (lastLineText > OSD_MAX_LINES) lastLineText = OSD_MAX_LINES; + if (lastLineText == OSD_MAX_LINES) // full + { + lastLineText--; + for (int j=0; j < lastLineText; j++) + { + strcpy(lineText[j], lineText[j+1]); + lineTimer[j] = lineTimer[j+1]; + lineColor[j] = lineColor[j+1]; + } + } + + va_start(list,fmt); +#if defined(_MSC_VER) || defined(__INTEL_COMPILER) + _vsnprintf(lineText[lastLineText],1023,fmt,list); +#else + vsnprintf(lineText[lastLineText],1023,fmt,list); +#endif + va_end(list); + lineColor[lastLineText] = lineText_color; + lineTimer[lastLineText] = OSD_TIMER_SIZE; + needUpdate = true; + + lastLineText++; } void OSDCLASS::addFixed(u16 x, u16 y, const char *fmt, ...) @@ -167,24 +246,20 @@ void OSDCLASS::addFixed(u16 x, u16 y, const char *fmt, ...) va_list list; char msg[1024]; -// memset(msg,0,1024); - va_start(list,fmt); #if defined(_MSC_VER) || defined(__INTEL_COMPILER) _vsnprintf(msg,1023,fmt,list); #else vsnprintf(msg,1023,fmt,list); #endif - va_end(list); - if (strcmp(msg, old_msg) == 0) return; - - render51.PrintString(1,x-1,y-1,render51.MakeColor(0,0,0),msg,&screenshell); - render51.PrintString(1,x+1,y-1,render51.MakeColor(0,0,0),msg,&screenshell); - render51.PrintString(1,x-1,y+1,render51.MakeColor(0,0,0),msg,&screenshell); - render51.PrintString(1,x+1,y+1,render51.MakeColor(0,0,0),msg,&screenshell); render51.PrintString(1,x,y,render51.MakeColor(255,255,255),msg,&screenshell); needUpdate = true; } + +void OSDCLASS::border(bool enabled) +{ + render51.setTextBoxBorder(enabled); +} \ No newline at end of file diff --git a/desmume/src/GPU_osd.h b/desmume/src/GPU_osd.h index 06527acce..e6d4d213d 100644 --- a/desmume/src/GPU_osd.h +++ b/desmume/src/GPU_osd.h @@ -27,7 +27,8 @@ #include #include "types.h" -#define OSD_MAX_LINES 10 +#define OSD_MAX_LINES 4 +#define OSD_TIMER_SIZE 5000 class OSDCLASS { @@ -38,20 +39,18 @@ private: u16 rotAngle; - u8 startline; - u8 lastline; - - u8 *line[OSD_MAX_LINES]; - u8 timer[OSD_MAX_LINES]; - u8 color[OSD_MAX_LINES]; - - char *old_msg; - - u16 current_color; + u16 lineText_x; + u16 lineText_y; + u32 lineText_color; + u8 lastLineText; + char *lineText[OSD_MAX_LINES+1]; + u8 lineTimer[OSD_MAX_LINES+1]; + u32 lineColor[OSD_MAX_LINES+1]; bool needUpdate; - void printChar(u16 x, u16 y, u8 c); + //void printChar(u16 x, u16 y, u8 c); + bool checkTimers(); public: char name[7]; // for debuging OSDCLASS(u8 core); @@ -61,13 +60,12 @@ public: void setRotate(u16 angle); void update(); void clear(); - void setColor(u16 col); + void setListCoord(u16 x, u16 y); + void setLineColor(u8 r, u8 b, u8 g); void addLine(const char *fmt, ...); void addFixed(u16 x, u16 y, const char *fmt, ...); + void border(bool enabled); }; extern OSDCLASS *osd; -extern OSDCLASS *osdA; -extern OSDCLASS *osdB; - #endif diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index 76db69c2f..784a57744 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -1007,8 +1007,6 @@ void MMU_clearMem() MainScreen.offset = 0; SubScreen.offset = 192; - osdA->setOffset(MainScreen.offset); - osdB->setOffset(SubScreen.offset); MMU_VRAM_unmap_all(); @@ -1772,8 +1770,6 @@ void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val) MainScreen.offset = 192; SubScreen.offset = 0; } - osdA->setOffset(MainScreen.offset); - osdB->setOffset(SubScreen.offset); T1WriteWord(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x304, val); } diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 6554e694f..aeee702ec 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -1064,8 +1064,7 @@ void NDS_Reset(BOOL resetBySavestate) delete header; - GPU_Reset(MainScreen.gpu, 0); - GPU_Reset(SubScreen.gpu, 1); + Screen_Reset(); gfx3d_reset(); gpu3D->NDS_3D_Reset(); SPU_Reset(); diff --git a/desmume/src/saves.cpp b/desmume/src/saves.cpp index af6ea2fcf..521574812 100644 --- a/desmume/src/saves.cpp +++ b/desmume/src/saves.cpp @@ -32,6 +32,7 @@ #include "NDSSystem.h" #include "render3D.h" #include "cp15.h" +#include "GPU_OSD.h" #include "memorystream.h" #include "readwrite.h" @@ -471,7 +472,18 @@ void savestate_slot(int num) strncpy(filename, pathFilenameToROMwithoutExt, MAX_PATH); if (strlen(filename) + strlen(".dsx") + strlen("-2147483648") /* = biggest string for num */ >MAX_PATH) return ; sprintf(filename+strlen(filename), ".ds%d", num); - savestate_save(filename); + + if (savestate_save(filename)) + { + osd->setLineColor(255, 255, 255); + osd->addLine("Saved to %i slot", num); + } + else + { + osd->setLineColor(255, 0, 0); + osd->addLine("Error save to %i slot", num); + return; + } savestates[num-1].exists = TRUE; if( stat(filename,&sbuf) == -1 ) return; @@ -484,7 +496,16 @@ void loadstate_slot(int num) strncpy(filename, pathFilenameToROMwithoutExt, MAX_PATH); if (strlen(filename) + strlen(".dsx") + strlen("-2147483648") /* = biggest string for num */ >MAX_PATH) return ; sprintf(filename+strlen(filename), ".ds%d", num); - savestate_load(filename); + if (savestate_load(filename)) + { + osd->setLineColor(255, 255, 255); + osd->addLine("Loaded from %i slot", num); + } + else + { + osd->setLineColor(255, 0, 0); + osd->addLine("Error from load %i slot", num); + } } u8 sram_read (u32 address) { @@ -519,6 +540,9 @@ int sram_load (const char *file_name) { fclose ( file ); + osd->setLineColor(255, 255, 255); + osd->addLine("Loaded SRAM"); + return 1; } @@ -536,6 +560,9 @@ int sram_save (const char *file_name) { fclose ( file ); + osd->setLineColor(255, 255, 255); + osd->addLine("Saved SRAM"); + return 1; } diff --git a/desmume/src/softrender.h b/desmume/src/softrender.h index fa68b7389..3d948008a 100644 --- a/desmume/src/softrender.h +++ b/desmume/src/softrender.h @@ -63,23 +63,40 @@ public: void GrabRegion(int sx1, int sy1, int sx2, int sy2, int dx, int dy, image *s, image *d); private: + bool textBoxBorder; template void print_char(int scale, int x, int y, int color, char c, image *dest) { int height = FONT::height(); int width = FONT::width(c); + int ofs = FONT::haveContour()?1:0; + + if (FONT::haveContour()) + { + for (int yc=0; yc void PrintString(int scale, int x, int y, int color, char *str, image *dest) { @@ -87,6 +104,11 @@ public: int yc = y; int height = FONT::height(); + int boxSize= 0; + if (FONT::haveContour()) + boxSize = ((FONT::width(*str)*scale+scale+1)*strlen(str)); + else + boxSize = ((FONT::width(*str)*scale+scale)*strlen(str)); int x1 = x; // Remember where x where the line should start. -- Overkill 2005-12-28. for (; *str; ++str) @@ -108,8 +130,11 @@ public: } else { print_char(scale, xc, yc, color, *str, dest); xc += FONT::width(*str)*scale + scale; + if (FONT::haveContour()) xc += 1; } } + if (textBoxBorder) + Box(x, y, x+boxSize, y+height, MakeColor(0, 0, 0), dest); } diff --git a/desmume/src/softrender_desmumefont.h b/desmume/src/softrender_desmumefont.h index 8942caf60..a6eb8f2d8 100644 --- a/desmume/src/softrender_desmumefont.h +++ b/desmume/src/softrender_desmumefont.h @@ -27,7 +27,6 @@ #define OSD_FONT_WIDTH 8 #define OSD_FONT_HEIGHT 16 - namespace softrender { class DesmumeFont { @@ -35,6 +34,7 @@ namespace softrender { static int height() { return OSD_FONT_HEIGHT; } static int width(char c) { return OSD_FONT_WIDTH; } static bool valid(char c) { return true; } + static bool haveContour() { return true; } static int pixel(char c, int x, int y) { @@ -301,6 +301,271 @@ namespace softrender { return (font_eng[(int)c*OSD_FONT_HEIGHT + y] >> (7-x))&1; } //pixel() + static int contour(char c, int x, int y) { + + static const u16 font_eng_contour[256*(OSD_FONT_HEIGHT+2)] = + { +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 00 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 01 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 02 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 03 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 04 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 05 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 06 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 07 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 08 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 09 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 0A */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 0B */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 0C */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 0D */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 0E */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 0F */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 10 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 11 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 12 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 13 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 14 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 15 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 16 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 17 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 18 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 19 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 1A */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 1B */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 1C */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 1D */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 1E */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 1F */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 20 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 21 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 22 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 23 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 24 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 25 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 26 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 27 */ +0x000,0x000,0x03C,0x064,0x0CC,0x198,0x198,0x198,0x198,0x198,0x198,0x0CC,0x064,0x03C,0x000,0x000,0x000,0x000, /* 28 */ +0x000,0x000,0x0F0,0x098,0x0CC,0x066,0x066,0x066,0x066,0x066,0x066,0x0CC,0x098,0x0F0,0x000,0x000,0x000,0x000, /* 29 */ +0x000,0x000,0x000,0x000,0x000,0x0CC,0x132,0x186,0x201,0x186,0x132,0x0CC,0x000,0x000,0x000,0x000,0x000,0x000, /* 2A */ +0x000,0x000,0x000,0x000,0x000,0x030,0x048,0x0CC,0x102,0x0CC,0x048,0x030,0x000,0x000,0x000,0x000,0x000,0x000, /* 2B */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x078,0x048,0x048,0x0C8,0x098,0x0F0,0x000,0x000,0x000, /* 2C */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x3FE,0x202,0x3FE,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 2D */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x030,0x048,0x048,0x030,0x000,0x000,0x000,0x000, /* 2E */ +0x000,0x000,0x000,0x000,0x00E,0x01A,0x032,0x066,0x0CC,0x198,0x330,0x260,0x2C0,0x380,0x000,0x000,0x000,0x000, /* 2F */ +0x000,0x000,0x0FC,0x186,0x333,0x249,0x279,0x201,0x201,0x279,0x249,0x333,0x186,0x0FC,0x000,0x000,0x000,0x000, /* 30 */ +0x000,0x000,0x078,0x0C8,0x188,0x308,0x3C8,0x048,0x048,0x048,0x048,0x1CE,0x102,0x1FE,0x000,0x000,0x000,0x000, /* 31 */ +0x000,0x000,0x1FC,0x304,0x272,0x3D2,0x024,0x048,0x090,0x120,0x25E,0x272,0x202,0x3FE,0x000,0x000,0x000,0x000, /* 32 */ +0x000,0x000,0x1FC,0x306,0x272,0x3D2,0x0F2,0x086,0x0F2,0x012,0x3D2,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 33 */ +0x000,0x000,0x03C,0x064,0x0C4,0x184,0x324,0x266,0x202,0x3E6,0x024,0x066,0x042,0x07E,0x000,0x000,0x000,0x000, /* 34 */ +0x000,0x000,0x3FE,0x202,0x27E,0x240,0x27C,0x206,0x3F2,0x012,0x3D2,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 35 */ +0x000,0x000,0x0F8,0x188,0x338,0x260,0x27C,0x206,0x272,0x252,0x252,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 36 */ +0x000,0x000,0x3FE,0x202,0x272,0x3F2,0x032,0x064,0x0C8,0x090,0x090,0x090,0x090,0x0F0,0x000,0x000,0x000,0x000, /* 37 */ +0x000,0x000,0x1FC,0x306,0x272,0x252,0x272,0x306,0x272,0x252,0x252,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 38 */ +0x000,0x000,0x1FC,0x306,0x272,0x252,0x272,0x302,0x1F2,0x012,0x012,0x1E6,0x10C,0x1F8,0x000,0x000,0x000,0x000, /* 39 */ +0x000,0x000,0x000,0x000,0x078,0x048,0x048,0x078,0x000,0x078,0x048,0x048,0x078,0x000,0x000,0x000,0x000,0x000, /* 3A */ +0x000,0x000,0x000,0x000,0x078,0x048,0x048,0x078,0x000,0x078,0x048,0x0C8,0x098,0x0F0,0x000,0x000,0x000,0x000, /* 3B */ +0x000,0x000,0x000,0x01E,0x012,0x024,0x048,0x090,0x120,0x090,0x048,0x024,0x012,0x01E,0x000,0x000,0x000,0x000, /* 3C */ +0x000,0x000,0x000,0x000,0x000,0x1FE,0x102,0x1FE,0x1FE,0x102,0x1FE,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 3D */ +0x000,0x000,0x000,0x1E0,0x120,0x090,0x048,0x024,0x012,0x024,0x048,0x090,0x120,0x1E0,0x000,0x000,0x000,0x000, /* 3E */ +0x000,0x000,0x1FC,0x306,0x272,0x272,0x3E6,0x04C,0x048,0x048,0x078,0x048,0x048,0x078,0x000,0x000,0x000,0x000, /* 3F */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 40 */ +0x000,0x000,0x070,0x0D8,0x18C,0x326,0x252,0x272,0x202,0x272,0x252,0x252,0x252,0x3DE,0x000,0x000,0x000,0x000, /* 41 */ +0x000,0x000,0x3FC,0x206,0x332,0x132,0x132,0x106,0x132,0x132,0x132,0x332,0x206,0x3FC,0x000,0x000,0x000,0x000, /* 42 */ +0x000,0x000,0x0FC,0x186,0x332,0x27A,0x24E,0x240,0x240,0x24E,0x27A,0x332,0x186,0x0FC,0x000,0x000,0x000,0x000, /* 43 */ +0x000,0x000,0x3F8,0x20C,0x326,0x132,0x132,0x132,0x132,0x132,0x132,0x326,0x20C,0x3F8,0x000,0x000,0x000,0x000, /* 44 */ +0x000,0x000,0x3FE,0x202,0x332,0x13A,0x12E,0x108,0x128,0x13E,0x13A,0x332,0x202,0x3FE,0x000,0x000,0x000,0x000, /* 45 */ +0x000,0x000,0x3FE,0x202,0x332,0x13A,0x12E,0x108,0x128,0x138,0x120,0x330,0x210,0x3F0,0x000,0x000,0x000,0x000, /* 46 */ +0x000,0x000,0x0FC,0x184,0x332,0x27A,0x24E,0x27E,0x242,0x272,0x252,0x332,0x18A,0x0FE,0x000,0x000,0x000,0x000, /* 47 */ +0x000,0x000,0x3DE,0x252,0x252,0x252,0x272,0x202,0x272,0x252,0x252,0x252,0x252,0x3DE,0x000,0x000,0x000,0x000, /* 48 */ +0x000,0x000,0x0FC,0x084,0x0CC,0x048,0x048,0x048,0x048,0x048,0x048,0x0CC,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 49 */ +0x000,0x000,0x07E,0x042,0x066,0x024,0x024,0x024,0x3E4,0x264,0x264,0x264,0x30C,0x1F8,0x000,0x000,0x000,0x000, /* 4A */ +0x000,0x000,0x3FE,0x232,0x332,0x132,0x126,0x10C,0x10C,0x126,0x132,0x332,0x232,0x3FE,0x000,0x000,0x000,0x000, /* 4B */ +0x000,0x000,0x3F0,0x210,0x330,0x120,0x120,0x120,0x120,0x12E,0x13A,0x332,0x202,0x3FE,0x000,0x000,0x000,0x000, /* 4C */ +0x000,0x000,0x3CF,0x279,0x231,0x201,0x201,0x249,0x279,0x249,0x249,0x249,0x249,0x3CF,0x000,0x000,0x000,0x000, /* 4D */ +0x000,0x000,0x3DE,0x252,0x232,0x212,0x202,0x242,0x262,0x272,0x252,0x252,0x252,0x3DE,0x000,0x000,0x000,0x000, /* 4E */ +0x000,0x000,0x1FC,0x306,0x272,0x252,0x252,0x252,0x252,0x252,0x252,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 4F */ +0x000,0x000,0x3FC,0x206,0x332,0x132,0x132,0x106,0x13C,0x120,0x120,0x330,0x210,0x3F0,0x000,0x000,0x000,0x000, /* 50 */ +0x000,0x000,0x1FC,0x306,0x272,0x252,0x252,0x252,0x252,0x272,0x252,0x242,0x306,0x1E6,0x022,0x03E,0x000,0x000, /* 51 */ +0x000,0x000,0x3FC,0x206,0x332,0x132,0x132,0x106,0x126,0x132,0x132,0x332,0x232,0x3FE,0x000,0x000,0x000,0x000, /* 52 */ +0x000,0x000,0x1FC,0x306,0x272,0x272,0x33E,0x18C,0x0E6,0x3F2,0x272,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 53 */ +0x000,0x000,0x3FF,0x201,0x201,0x2CD,0x3CF,0x048,0x048,0x048,0x048,0x0CC,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 54 */ +0x000,0x000,0x3DE,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 55 */ +0x000,0x000,0x3CF,0x249,0x249,0x249,0x249,0x249,0x249,0x279,0x333,0x186,0x0CC,0x078,0x000,0x000,0x000,0x000, /* 56 */ +0x000,0x000,0x3CF,0x249,0x249,0x249,0x249,0x279,0x249,0x249,0x201,0x333,0x132,0x1FE,0x000,0x000,0x000,0x000, /* 57 */ +0x000,0x000,0x3CF,0x249,0x279,0x333,0x086,0x0CC,0x0CC,0x186,0x333,0x279,0x249,0x3CF,0x000,0x000,0x000,0x000, /* 58 */ +0x000,0x000,0x3CF,0x249,0x249,0x279,0x333,0x186,0x0CC,0x048,0x048,0x0CC,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 59 */ +0x000,0x000,0x3FF,0x201,0x279,0x2F3,0x3E6,0x0CC,0x198,0x337,0x26D,0x279,0x201,0x3FF,0x000,0x000,0x000,0x000, /* 5A */ +0x000,0x000,0x0FC,0x084,0x09C,0x090,0x090,0x090,0x090,0x090,0x090,0x09C,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 5B */ +0x000,0x000,0x000,0x380,0x2C0,0x260,0x230,0x318,0x18C,0x0C6,0x062,0x032,0x01A,0x00E,0x000,0x000,0x000,0x000, /* 5C */ +0x000,0x000,0x0FC,0x084,0x0E4,0x024,0x024,0x024,0x024,0x024,0x024,0x0E4,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 5D */ +0x070,0x0D8,0x18C,0x326,0x272,0x3DE,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 5E */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x3FF,0x201,0x3FF,0x000,0x000, /* 5F */ +0x0F0,0x090,0x098,0x0C8,0x078,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 60 */ +0x000,0x000,0x000,0x000,0x000,0x1F8,0x10C,0x1E4,0x304,0x264,0x264,0x266,0x312,0x1FE,0x000,0x000,0x000,0x000, /* 61 */ +0x000,0x000,0x3E0,0x220,0x320,0x138,0x10C,0x126,0x132,0x132,0x132,0x132,0x106,0x1FC,0x000,0x000,0x000,0x000, /* 62 */ +0x000,0x000,0x000,0x000,0x000,0x1FC,0x306,0x272,0x25E,0x240,0x25E,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 63 */ +0x000,0x000,0x07C,0x044,0x064,0x0E4,0x184,0x324,0x264,0x264,0x264,0x266,0x312,0x1FE,0x000,0x000,0x000,0x000, /* 64 */ +0x000,0x000,0x000,0x000,0x000,0x1FC,0x306,0x272,0x202,0x27E,0x25E,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 65 */ +0x000,0x000,0x0F8,0x18C,0x124,0x134,0x33C,0x210,0x330,0x120,0x120,0x330,0x210,0x3F0,0x000,0x000,0x000,0x000, /* 66 */ +0x000,0x000,0x000,0x000,0x000,0x1FE,0x312,0x266,0x264,0x264,0x264,0x264,0x304,0x3E4,0x264,0x30C,0x1F8,0x000, /* 67 */ +0x000,0x000,0x3E0,0x220,0x320,0x13C,0x126,0x112,0x132,0x132,0x132,0x332,0x232,0x3FE,0x000,0x000,0x000,0x000, /* 68 */ +0x000,0x000,0x078,0x048,0x048,0x0F8,0x088,0x0C8,0x048,0x048,0x048,0x0CC,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 69 */ +0x000,0x000,0x01E,0x012,0x012,0x03E,0x022,0x032,0x012,0x012,0x012,0x012,0x1F2,0x132,0x132,0x186,0x0FC,0x000, /* 6A */ +0x000,0x000,0x3E0,0x220,0x320,0x13E,0x132,0x126,0x10C,0x10C,0x126,0x332,0x232,0x3FE,0x000,0x000,0x000,0x000, /* 6B */ +0x000,0x000,0x0F8,0x088,0x0C8,0x048,0x048,0x048,0x048,0x048,0x048,0x0CC,0x084,0x0FC,0x000,0x000,0x000,0x000, /* 6C */ +0x000,0x000,0x000,0x000,0x000,0x3FE,0x233,0x201,0x249,0x249,0x249,0x249,0x249,0x3FF,0x000,0x000,0x000,0x000, /* 6D */ +0x000,0x000,0x000,0x000,0x000,0x3FC,0x246,0x332,0x132,0x132,0x132,0x132,0x132,0x1FE,0x000,0x000,0x000,0x000, /* 6E */ +0x000,0x000,0x000,0x000,0x000,0x1FC,0x306,0x272,0x252,0x252,0x252,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 6F */ +0x000,0x000,0x000,0x000,0x000,0x3FC,0x246,0x332,0x132,0x132,0x132,0x132,0x106,0x13C,0x330,0x210,0x3F0,0x000, /* 70 */ +0x000,0x000,0x000,0x000,0x000,0x1FE,0x312,0x266,0x264,0x264,0x264,0x264,0x304,0x1E4,0x066,0x042,0x07E,0x000, /* 71 */ +0x000,0x000,0x000,0x000,0x000,0x3FC,0x246,0x312,0x132,0x13E,0x120,0x330,0x210,0x3F0,0x000,0x000,0x000,0x000, /* 72 */ +0x000,0x000,0x000,0x000,0x000,0x1FC,0x306,0x272,0x33E,0x088,0x3E6,0x272,0x306,0x1FC,0x000,0x000,0x000,0x000, /* 73 */ +0x000,0x000,0x070,0x0D0,0x090,0x39C,0x204,0x39C,0x090,0x090,0x09E,0x092,0x0C6,0x07C,0x000,0x000,0x000,0x000, /* 74 */ +0x000,0x000,0x000,0x000,0x000,0x3FC,0x264,0x264,0x264,0x264,0x264,0x266,0x312,0x1FE,0x000,0x000,0x000,0x000, /* 75 */ +0x000,0x000,0x000,0x000,0x000,0x3CF,0x249,0x249,0x249,0x279,0x333,0x186,0x0CC,0x078,0x000,0x000,0x000,0x000, /* 76 */ +0x000,0x000,0x000,0x000,0x000,0x3CF,0x249,0x249,0x279,0x249,0x249,0x201,0x333,0x1FE,0x000,0x000,0x000,0x000, /* 77 */ +0x000,0x000,0x000,0x000,0x000,0x3CF,0x279,0x333,0x084,0x0CC,0x084,0x333,0x279,0x3CF,0x000,0x000,0x000,0x000, /* 78 */ +0x000,0x000,0x000,0x000,0x000,0x3DE,0x252,0x252,0x252,0x252,0x252,0x272,0x302,0x1F2,0x3E6,0x20C,0x3F8,0x000, /* 79 */ +0x000,0x000,0x000,0x000,0x000,0x3FE,0x202,0x264,0x3C8,0x090,0x13E,0x272,0x202,0x3FE,0x000,0x000,0x000,0x000, /* 7A */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 7B */ +0x000,0x000,0x078,0x048,0x048,0x048,0x048,0x078,0x048,0x048,0x048,0x048,0x048,0x078,0x000,0x000,0x000,0x000, /* 7C */ +0x000,0x000,0x0E0,0x110,0x0C8,0x048,0x04C,0x022,0x04C,0x048,0x048,0x0C8,0x110,0x0E0,0x000,0x000,0x000,0x000, /* 7D */ +0x000,0x000,0x1EE,0x312,0x246,0x3BC,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 7E */ +0x000,0x000,0x000,0x000,0x020,0x050,0x088,0x124,0x252,0x252,0x272,0x202,0x1FC,0x000,0x000,0x000,0x000,0x000, /* 7F */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 80 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 81 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 82 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 83 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 84 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 85 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 86 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 87 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 88 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 89 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 8A */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 8B */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 8C */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 8D */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 8E */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 8F */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 90 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 91 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 92 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 93 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 94 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 95 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 96 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 97 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 98 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 99 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 9A */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 9B */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 9C */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 9D */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 9E */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* 9F */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A0 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A1 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A2 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A3 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A4 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A5 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A6 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A7 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A8 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* A9 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* AA */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* AB */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* AC */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* AD */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* AE */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* AF */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B0 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B1 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B2 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B3 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B4 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B5 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B6 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B7 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B8 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* B9 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* BA */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* BB */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* BC */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* BD */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* BE */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* BF */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C0 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C1 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C2 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C3 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C4 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C5 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C6 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C7 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C8 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* C9 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* CA */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* CB */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* CC */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* CD */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* CE */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* CF */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D0 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D1 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D2 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D3 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D4 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D5 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D6 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D7 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D8 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* D9 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* DA */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* DB */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* DC */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* DD */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* DE */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* DF */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E0 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E1 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E2 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E3 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E4 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E5 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E6 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E7 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E8 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* E9 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* EA */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* EB */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* EC */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* ED */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* EE */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* EF */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F0 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F1 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F2 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F3 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F4 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F5 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F6 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F7 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F8 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x078,0x048,0x048,0x078,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* F9 */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x078,0x048,0x078,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* FA */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* FB */ +0x000,0x3F8,0x20C,0x304,0x104,0x104,0x104,0x104,0x1FC,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* FC */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, /* FD */ +0x000,0x000,0x000,0x000,0x1FC,0x104,0x104,0x104,0x104,0x104,0x104,0x104,0x1FC,0x000,0x000,0x000,0x000,0x000, /* FE */ +0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000 /* FF */ +}; + + return (font_eng_contour[(int)c*(OSD_FONT_HEIGHT+2) + y] >> (9-x))&1; + } //contour() + }; //class } //namespace diff --git a/desmume/src/softrender_v3sysfont.h b/desmume/src/softrender_v3sysfont.h index bf3dc2bf6..11f0a654d 100644 --- a/desmume/src/softrender_v3sysfont.h +++ b/desmume/src/softrender_v3sysfont.h @@ -11,6 +11,7 @@ namespace softrender { static int width(char c) { return charByte(c,0); } static int pixel(char c, int x, int y) { return charByte(c,width(c)*y+x+1); } static bool valid(char c) { return c>=32; } + static bool haveContour() { return false; } static char charByte(byte c, int i) { diff --git a/desmume/src/windows/DeSmuME_2008.vcproj b/desmume/src/windows/DeSmuME_2008.vcproj index ebc0a4650..b561d2182 100644 --- a/desmume/src/windows/DeSmuME_2008.vcproj +++ b/desmume/src/windows/DeSmuME_2008.vcproj @@ -779,10 +779,6 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > - - @@ -1082,6 +1078,14 @@ RelativePath="..\softrender_config.h" > + + + + diff --git a/desmume/src/windows/aviout.cpp b/desmume/src/windows/aviout.cpp index f3c74efc3..3a839ee19 100644 --- a/desmume/src/windows/aviout.cpp +++ b/desmume/src/windows/aviout.cpp @@ -25,6 +25,7 @@ #include "console.h" #include "gfx3d.h" #include "aviout.h" +#include "../GPU_OSD.h" #include #include @@ -397,7 +398,7 @@ bool DRV_AviBegin(const char* fname) // Don't display at file splits if(!avi_segnum) { EMU_PrintMessage("AVI recording started."); - SetMessageToDisplay("AVI recording started."); + osd->addLine("AVI recording started."); } strncpy(saved_cur_avi_fnameandext,fname,MAX_PATH); @@ -476,7 +477,7 @@ void DRV_AviEnd() // Don't display if we're just starting another segment if(avi_file->tBytes <= 2097152000) { EMU_PrintMessage("AVI recording ended."); - SetMessageToDisplay("AVI recording ended."); + osd->addLine("AVI recording ended."); } avi_destroy(&avi_file); diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index 5b5bac350..52b5b0372 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -33,6 +33,7 @@ #include "replay.h" #include "aviout.h" #include "spu.h" +#include "../GPU.h" extern LRESULT OpenFile(); //adelikat: Made this an extern here instead of main.h Seemed icky not to limit the scope of this function @@ -124,7 +125,6 @@ void HK_StateSaveSlot(int num) savestate_slot(num); //Savestate lastSaveState = num; //Set last savestate used - SaveStateMessages(num, 0); //Display state loaded message LoadSaveStateInfo(); } } @@ -137,7 +137,6 @@ void HK_StateLoadSlot(int num) NDS_Pause(); loadstate_slot(num); //Loadstate lastSaveState = num; //Set last savestate used - SaveStateMessages(num, 1); //Display state loaded message Update_RAM_Watch(); //adelikat: TODO this should be a single function call in main, that way we can expand as future dialogs need updating Update_RAM_Search(); //main.cpp - case IDM_STATE_LOAD: also calls these functions @@ -154,7 +153,7 @@ void HK_StateSetSlot(int num) if (romloaded) { lastSaveState = num; - SaveStateMessages(num,2); + osd->addLine("State %i selected", num); } } @@ -188,9 +187,9 @@ void HK_ToggleLag(int) {ShowLagFrameCounter ^= true;} void HK_ToggleReadOnly(int) { movie_readonly ^= true; if(movie_readonly) - SetMessageToDisplay("Read Only"); + osd->addLine("Read Only"); else - SetMessageToDisplay("Read+Write"); + osd->addLine("Read+Write"); } void HK_PlayMovie(int) @@ -261,7 +260,7 @@ void HK_NextSaveSlot(int) { lastSaveState++; if(lastSaveState>9) lastSaveState=0; - SaveStateMessages(lastSaveState,2); + osd->addLine("State %i selected", lastSaveState); } void HK_PreviousSaveSlot(int) { @@ -270,7 +269,7 @@ void HK_PreviousSaveSlot(int) { lastSaveState=9; else lastSaveState--; - SaveStateMessages(lastSaveState,2); + osd->addLine("State %i selected", lastSaveState); } void HK_Pause(int) { Pause(); } diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index e2bb328db..2f9879f05 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -130,6 +130,7 @@ void wxTest() { #endif +unsigned int lastSaveState = 0; //Keeps track of last savestate used for quick save/load functions //----Recent ROMs menu globals---------- vector RecentRoms; //The list of recent ROM filenames const unsigned int MAX_RECENT_ROMS = 10; //To change the recent rom max, simply change this number @@ -163,8 +164,6 @@ LPDIRECTDRAWCLIPPER lpDDClipPrimary=NULL; LPDIRECTDRAWCLIPPER lpDDClipBack=NULL; //===================== Input vars -//INPUTCLASS *input = NULL; - #define WM_CUSTKEYDOWN (WM_USER+50) #define WM_CUSTKEYUP (WM_USER+51) @@ -382,10 +381,6 @@ void ResetHud(HudStruct *hudstruct) { SetHudDummy(&hudstruct->Dummy); } -unsigned int lastSaveState = 0; //Keeps track of last savestate used for quick save/load functions -stringstream MessageToDisplay; //temp variable to store message that will be displayed via DisplayMessage function -int displayMessageCounter = 0; //Counter to keep track with how long to display messages on screen -bool NewMessageToDisplay = false; //Flag to indicate a new message is in queue /* the firmware settings */ struct NDS_fw_config_data win_fw_config; @@ -1063,40 +1058,6 @@ void CheckMessages() } } -void DisplayMessage() -{ - if (displayMessageCounter) - { - //adelikat - By using stringstream, it leaves open the possibility to keep a series of message in queue - displayMessageCounter--; - osd->addFixed(0, 120, "%s",MessageToDisplay.str().c_str()); - NewMessageToDisplay = false; - } -} - -void SaveStateMessages(int slotnum, int whichMessage) -{ - MessageToDisplay.str(""); //Clear previous message - displayMessageCounter = 120; - switch (whichMessage) - { - case 0: //State saved - MessageToDisplay << "State " << slotnum << " saved."; - NewMessageToDisplay = true; //adelikat: TODO: make these call SetMessageToDisplay instead - break; - case 1: //State loaded - MessageToDisplay << "State " << slotnum << " loaded."; - NewMessageToDisplay = true; - break; - case 2: //Save slot selected - MessageToDisplay << "State " << slotnum << " selected."; - NewMessageToDisplay = true; - default: - break; - } - //DisplayMessage(); -} - DWORD WINAPI run() { char txt[80]; @@ -1164,7 +1125,7 @@ DWORD WINAPI run() static int fps3d = 0; - if (FpsDisplay) osd->addFixed(Hud.FpsDisplay.x, Hud.FpsDisplay.y, "%02d Fps / %02d 3d", fps, fps3d); + if (FpsDisplay) osd->addFixed(Hud.FpsDisplay.x, Hud.FpsDisplay.y, "Fps:%02d/%02d", fps, fps3d); if (frameCounterDisplay) { if (movieMode == MOVIEMODE_PLAY) @@ -1301,13 +1262,6 @@ DWORD WINAPI run() CheckMessages(); } - if (NewMessageToDisplay) - { - DisplayMessage(); - osd->update(); - Display(); - osd->clear(); - } paused = TRUE; CheckMessages(); Sleep(100); @@ -1598,7 +1552,7 @@ class WinDriver : public Driver virtual void USR_InfoMessage(const char *message) { LOG("%s\n", message); - SetMessageToDisplay(message); + osd->addLine(message); } virtual void AVI_SoundUpdate(void* soundData, int soundLen) { @@ -2714,6 +2668,9 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM //Language selection + //Save type + MainWindow->checkMenu(IDC_SAVETYPE1, MF_BYCOMMAND | MF_CHECKED); + return 0; } /*case WM_EXITMENULOOP: @@ -2886,26 +2843,28 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM s32 x = (s32)((s16)LOWORD(lParam)); s32 y = (s32)((s16)HIWORD(lParam)); GetClientRect(hwnd,&r); + int defwidth = 256, defheight = (384+ScreenGap); + int winwidth = (r.right-r.left), winheight = (r.bottom-r.top); + + // translate from scaling (screen resolution to 256x384 or 512x192) + switch (GPU_rotation) + { + case 0: + case 180: + x = (x*defwidth) / winwidth; + y = (y*defheight) / winheight; + break ; + case 90: + case 270: + x = (x*defheight) / winwidth; + y = (y*defwidth) / winheight; + break ; + } + if(HudEditorMode) { EditHud(x,y, &Hud); } else { - int defwidth = 256, defheight = (384+ScreenGap); - int winwidth = (r.right-r.left), winheight = (r.bottom-r.top); - // translate from scaling (screen resolution to 256x384 or 512x192) - switch (GPU_rotation) - { - case 0: - case 180: - x = (x*defwidth) / winwidth; - y = (y*defheight) / winheight; - break ; - case 90: - case 270: - x = (x*defheight) / winwidth; - y = (y*defwidth) / winheight; - break ; - } //translate for rotation if (GPU_rotation != 0) translateXY(x,y); @@ -3336,6 +3295,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM HudEditorMode ^= 1; MainWindow->checkMenu(ID_VIEW_HUDEDITOR, HudEditorMode ? MF_CHECKED : MF_UNCHECKED); osd->clear(); + osd->border(HudEditorMode); return 0; case ID_VIEW_DISPLAYMICROPHONE: @@ -4147,18 +4107,6 @@ void ResetGame() NDS_Reset(); } -//adelikat: This function allows another file to add a message to the screen -void SetMessageToDisplay(const char *message) -{ - MessageToDisplay.str(""); //adelikat: Clear previous message //TODO set up a queue system, and/or a multiline system, instead of rudely cancelling out messages. - //adelikat: TODO: set up a function that does the clearing and setting of the counter, so this code doesn't have to be done all over the place - // make the function receive an int for the counter, but overload so that if no int, 120 is used - MessageToDisplay << message; - NewMessageToDisplay = true; - displayMessageCounter = 120;// -} - - //adelikat: This function changes a menu item's text void ChangeMenuItemText(int menuitem, string text) { diff --git a/desmume/src/windows/main.h b/desmume/src/windows/main.h index d4f148aa0..f012eaaef 100644 --- a/desmume/src/windows/main.h +++ b/desmume/src/windows/main.h @@ -9,7 +9,6 @@ void NDS_Pause(); void NDS_UnPause(); extern unsigned int lastSaveState; void LoadSaveStateInfo(); -void SaveStateMessages(int slotnum, int whichMessage); void Display(); void Pause(); void FrameAdvance(bool state); @@ -18,7 +17,6 @@ void AviRecordTo(); void AviEnd(); void WavRecordTo(); void WavEnd(); -void SetMessageToDisplay(const char *message); //For sending output to the main screen extern bool ShowInputDisplay; extern bool frameCounterDisplay;