summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/bfont.cpp
authorandyq <andyq>2003-01-21 20:37:00 (UTC)
committer andyq <andyq>2003-01-21 20:37:00 (UTC)
commit0a6563fcc2f49857c581d9def24407a3a4ef526c (patch) (unidiff)
treef1b82a4bd7582ef2cb722cffb87eecff1e1f96e6 /noncore/games/sfcave-sdl/bfont.cpp
parent50b5915b48fc5cbacf23e4d2b75d7a266f141a4a (diff)
downloadopie-0a6563fcc2f49857c581d9def24407a3a4ef526c.zip
opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.tar.gz
opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.tar.bz2
Clean up of code - fixed memory leaks (most of them) and added new custom config menu
Diffstat (limited to 'noncore/games/sfcave-sdl/bfont.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/sfcave-sdl/bfont.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/noncore/games/sfcave-sdl/bfont.cpp b/noncore/games/sfcave-sdl/bfont.cpp
index 0f29104..7dec8f5 100644
--- a/noncore/games/sfcave-sdl/bfont.cpp
+++ b/noncore/games/sfcave-sdl/bfont.cpp
@@ -73,10 +73,6 @@ void BFont::LoadFont (const char *filename)
73 InitFont(); // Init the font 73 InitFont(); // Init the font
74 } 74 }
75 } 75 }
76 else
77 {
78 cerr << "Error! The font has not been loaded!" << endl;
79 }
80} 76}
81 77
82BFont * BFont :: SetFontColor(Uint8 r, Uint8 g, Uint8 b) 78BFont * BFont :: SetFontColor(Uint8 r, Uint8 g, Uint8 b)
@@ -113,7 +109,6 @@ BFont * BFont :: SetFontColor(Uint8 r, Uint8 g, Uint8 b)
113 109
114 color_key = xGetPixel(Surface, 0, Surface->h-1); 110 color_key = xGetPixel(Surface, 0, Surface->h-1);
115 111
116 printf("looking...\n");
117 for( x=0; x < Surface->w; x++) { 112 for( x=0; x < Surface->w; x++) {
118 for( y=0; y < Surface->h; y++) { 113 for( y=0; y < Surface->h; y++) {
119 old_r = old_g = old_b = 0; 114 old_r = old_g = old_b = 0;
@@ -131,7 +126,7 @@ BFont * BFont :: SetFontColor(Uint8 r, Uint8 g, Uint8 b)
131 PutPixel(surface,x,y,pixel); 126 PutPixel(surface,x,y,pixel);
132 } 127 }
133 } 128 }
134 printf("unlooking...\n"); 129
135 if (SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface); 130 if (SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface);
136 if (SDL_MUSTLOCK(Surface)) SDL_UnlockSurface(Surface); 131 if (SDL_MUSTLOCK(Surface)) SDL_UnlockSurface(Surface);
137 132