X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui.cpp;h=a3379721e10d3b242038f6d602e79e7632431643;hb=1c26b00fe4ae49984de2d33f7d13c20760664dd9;hp=9eae58bc33d04252ec9826785359d1d5f1bd11c9;hpb=5e16b2a6d9d5230b19fbc30d8c15fea65880b1d4;p=thunder diff --git a/src/gui.cpp b/src/gui.cpp index 9eae58b..a337972 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -2,7 +2,7 @@ // Thunder Graphic User Interface // // by James Hammons -// (c) 2004, 2014 Underground Software +// (C) 2004, 2014 Underground Software // // JLH = James Hammons // @@ -14,7 +14,6 @@ #include "gui.h" #include -#include // Needed for tracelog #include "screen.h" #include "sound.h" #include "resource.h" // Thunder graphics & sounds @@ -23,14 +22,8 @@ using namespace std; // External shit -extern SDL_Surface * screen; - extern uint8_t my_scr[0x14000]; // Screen buffer... extern uint8_t gram1[]; // Game RAM (do here??) -extern uint8_t hScrollOffset; // Horizontal scroll offset -extern uint8_t vScrollOffset; // Vertical scroll offset -extern uint32_t voffsets[8]; -extern fstream tr; // Tracelog // Global shit @@ -238,7 +231,7 @@ uint8_t bnF[] = { }; - // +// // Initialize GUI // void InitGUI(void) @@ -351,7 +344,7 @@ void DrawSmallIcons(uint16_t icon_not_to_draw) xl = xlens[iconidx[idx]]; yl = ylens[iconidx[idx]]; - uint32_t scadr = hScrollOffset + voffsets[vScrollOffset]; + uint32_t scadr;// = hScrollOffset + voffsets[vScrollOffset]; scadr += 320 * ((224 - yl) / 2); // Center vertically scadr += xpos[i] - (xl / 2); // Center around horiz. pos. uint16_t bmpptr = 0; @@ -379,7 +372,7 @@ void DrawSmallIcons(uint16_t icon_not_to_draw) xl = xlens[iconidx[idx]]; yl = ylens[iconidx[idx]]; - uint32_t scadr = hScrollOffset + voffsets[vScrollOffset]; + uint32_t scadr;// = hScrollOffset + voffsets[vScrollOffset]; scadr += 320 * ((224 - yl) / 2); // Center vertically scadr += xpos[i] - (xl / 2); // Center around horiz. pos. uint16_t bmpptr = 0; @@ -446,7 +439,7 @@ void DrawLargeIcon(uint16_t icon) yl = ylens[6]; } - uint32_t scadr = hScrollOffset + voffsets[vScrollOffset]; + uint32_t scadr;// = hScrollOffset + voffsets[vScrollOffset]; scadr += 320 * ((224 - yl) / 2); // Center vertically scadr += (288 - xl) / 2; // Center horizontally uint16_t bmpptr = 0; @@ -516,7 +509,7 @@ void DrawDipswitch(void) uint32_t scadr, bmpptr; //dsx = //26x65 - uint32_t dbase = hScrollOffset + voffsets[vScrollOffset]; + uint32_t dbase;// = hScrollOffset + voffsets[vScrollOffset]; dbase += (288 - 26) / 2; // Center horizontally dbase += 320 * ((224 - ((65 * 2) + 8)) / 2); // Center vertically