]> Shamusworld >> Repos - thunder/blobdiff - src/gui.cpp
Added DIP switch fungibility, misc. code cleanups.
[thunder] / src / gui.cpp
index 9eae58bc33d04252ec9826785359d1d5f1bd11c9..a3379721e10d3b242038f6d602e79e7632431643 100644 (file)
@@ -2,7 +2,7 @@
 // Thunder Graphic User Interface
 //
 // by James Hammons
-// (c) 2004, 2014 Underground Software
+// (C) 2004, 2014 Underground Software
 //
 // JLH = James Hammons <jlhamm@acm.org>
 //
@@ -14,7 +14,6 @@
 #include "gui.h"
 
 #include <string>
-#include <fstream>       // 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