[Tux4kids-commits] r1305 - branches/commonification/tuxmath/trunk/src
Bolesław Kulbabiński
bolekk-guest at alioth.debian.org
Fri Jul 31 13:57:14 UTC 2009
Author: bolekk-guest
Date: 2009-07-31 13:57:14 +0000 (Fri, 31 Jul 2009)
New Revision: 1305
Modified:
branches/commonification/tuxmath/trunk/src/factoroids.c
branches/commonification/tuxmath/trunk/src/game.c
branches/commonification/tuxmath/trunk/src/loaders.c
branches/commonification/tuxmath/trunk/src/loaders.h
branches/commonification/tuxmath/trunk/src/titlescreen.c
Log:
removed LoadBothBkgds() function
Modified: branches/commonification/tuxmath/trunk/src/factoroids.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/factoroids.c 2009-07-31 11:39:55 UTC (rev 1304)
+++ branches/commonification/tuxmath/trunk/src/factoroids.c 2009-07-31 13:57:14 UTC (rev 1305)
@@ -436,10 +436,11 @@
/******** Set up properly scaled and optimized background surfaces: *********/
- /* NOTE - optimization code moved into LoadBothBkgds() so rest of program */
+ /* NOTE - optimization code moved into LoadBkgd() so rest of program */
/* can take advantage of it - DSB */
- LoadBothBkgds("factoroids/gbstars.png", &scaled_bkgd, &bkgd);
+ scaled_bkgd = LoadBkgd("factoroids/gbstars.png", fs_res_x, fs_res_y);
+ bkgd = LoadBkgd("factoroids/gbstars.png", win_res_x, win_res_y);
if (bkgd == NULL || scaled_bkgd == NULL)
{
Modified: branches/commonification/tuxmath/trunk/src/game.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/game.c 2009-07-31 11:39:55 UTC (rev 1304)
+++ branches/commonification/tuxmath/trunk/src/game.c 2009-07-31 13:57:14 UTC (rev 1305)
@@ -2361,7 +2361,8 @@
if (Opts_UseBkgd())
{
- LoadBothBkgds(fname, &scaled_bkgd, &bkgd);
+ scaled_bkgd = LoadBkgd(fname, fs_res_x, fs_res_y);
+ bkgd = LoadBkgd(fname, win_res_x, win_res_y);
if (bkgd == NULL || scaled_bkgd == NULL)
{
fprintf(stderr,
Modified: branches/commonification/tuxmath/trunk/src/loaders.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/loaders.c 2009-07-31 11:39:55 UTC (rev 1304)
+++ branches/commonification/tuxmath/trunk/src/loaders.c 2009-07-31 13:57:14 UTC (rev 1305)
@@ -465,17 +465,6 @@
return final_pic;
}
-/* LoadBothBkgds() : loads two scaled images: one for the fullscreen mode
- (fs_res_x,fs_rex_y) and one for the windowed mode (win_res_x,win_rex_y)
- Now we also optimize the format for best performance */
-void LoadBothBkgds(const char* file_name, SDL_Surface** fs_bkgd, SDL_Surface** win_bkgd)
-{
- DEBUGMSG(debug_loaders, "Entering LoadBothBkgds()\n");
- *fs_bkgd = LoadBkgd(file_name, fs_res_x, fs_res_y);
- *win_bkgd = LoadBkgd(file_name, win_res_x, win_res_y);
-}
-
-
sprite* LoadSprite(const char* name, int mode)
{
return LoadScaledSprite(name, mode, -1, -1);
Modified: branches/commonification/tuxmath/trunk/src/loaders.h
===================================================================
--- branches/commonification/tuxmath/trunk/src/loaders.h 2009-07-31 11:39:55 UTC (rev 1304)
+++ branches/commonification/tuxmath/trunk/src/loaders.h 2009-07-31 13:57:14 UTC (rev 1305)
@@ -41,7 +41,6 @@
SDL_Surface* LoadImageOfBoundingBox(const char* file_name, int mode, int max_width, int max_height);
SDL_Surface* LoadBkgd(const char* file_name, int width, int height);
-void LoadBothBkgds(const char* file_name, SDL_Surface** fs_bkgd, SDL_Surface** win_bkgd);
sprite* LoadSprite(const char* name, int mode);
sprite* LoadScaledSprite(const char* name, int mode, int width, int height);
Modified: branches/commonification/tuxmath/trunk/src/titlescreen.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/titlescreen.c 2009-07-31 11:39:55 UTC (rev 1304)
+++ branches/commonification/tuxmath/trunk/src/titlescreen.c 2009-07-31 13:57:14 UTC (rev 1305)
@@ -175,7 +175,8 @@
LoadMenus();
/* load backgrounds */
- LoadBothBkgds(bkg_path, &fs_bkg, &win_bkg);
+ fs_bkg = LoadBkgd(bkg_path, fs_res_x, fs_res_y);
+ win_bkg = LoadBkgd(bkg_path, win_res_x, win_res_y);
if(fs_bkg == NULL || win_bkg == NULL)
{
fprintf(stderr, "Backgrounds were not properly loaded, exiting");
More information about the Tux4kids-commits
mailing list