aboutsummaryrefslogtreecommitdiff
path: root/dc
diff options
context:
space:
mode:
authorMarcus Comstedt2002-02-02 23:33:24 +0000
committerMarcus Comstedt2002-02-02 23:33:24 +0000
commit0299ea07c7c45fa9d4afdc09bc0c28931a97dcce (patch)
tree2a6f9d27e4ee630ffc7de129713d4fd753b15ce7 /dc
parent971eb209b05eb87f893b82b66339c75986e197f2 (diff)
downloadscummvm-rg350-0299ea07c7c45fa9d4afdc09bc0c28931a97dcce.tar.gz
scummvm-rg350-0299ea07c7c45fa9d4afdc09bc0c28931a97dcce.tar.bz2
scummvm-rg350-0299ea07c7c45fa9d4afdc09bc0c28931a97dcce.zip
Keep a copy of the game icon, for savegame purposes.
svn-id: r3556
Diffstat (limited to 'dc')
-rw-r--r--dc/dc.h2
-rw-r--r--dc/dcmain.cpp9
-rw-r--r--dc/selector.cpp3
3 files changed, 8 insertions, 6 deletions
diff --git a/dc/dc.h b/dc/dc.h
index 814d8cfe88..1c47b13010 100644
--- a/dc/dc.h
+++ b/dc/dc.h
@@ -3,5 +3,5 @@ extern void checkSound(Scumm *s);
extern void handleInput(struct mapledev *pad, int16 &mouse_x, int16 &mouse_y,
byte &leftBtnPressed, byte &rightBtnPressed,
int &keyPressed);
-extern bool selectGame(Scumm *s, char *&);
+extern bool selectGame(Scumm *s, char *&, class Icon &);
diff --git a/dc/dcmain.cpp b/dc/dcmain.cpp
index 761c922f1b..67e2c9d516 100644
--- a/dc/dcmain.cpp
+++ b/dc/dcmain.cpp
@@ -25,10 +25,13 @@
#include "gui.h"
#include "sound.h"
#include "dc.h"
+#include "icon.h"
+
Scumm scumm;
ScummDebugger debugger;
Gui gui;
+Icon icon;
SoundEngine sound;
SOUND_DRIVER_TYPE snd_driv;
@@ -79,16 +82,14 @@ int main()
dc_setup_ta();
init_arm();
- if(!selectGame(&scumm, argv[1]))
+ if(!selectGame(&scumm, argv[1], icon))
exit(0);
sound.initialize(&scumm, &snd_driv);
- printf("Sound initalized.\n");
scumm._gui = &gui;
scumm.scummMain(argc, argv);
- printf("scummMain called.\n");
gui.init(&scumm);
last_time = Timer();
@@ -108,6 +109,6 @@ int main()
}
} while(1);
- printf("All done. Returning to menu.\n");
+ /* NOTREACHED */
exit(0);
}
diff --git a/dc/selector.cpp b/dc/selector.cpp
index a91ba484c5..d58dcced81 100644
--- a/dc/selector.cpp
+++ b/dc/selector.cpp
@@ -353,7 +353,7 @@ int gameMenu(Game *games, int num_games)
}
}
-bool selectGame(Scumm *s, char *&ret)
+bool selectGame(Scumm *s, char *&ret, Icon &icon)
{
Game *games = new Game[MAX_GAMES];
int selected, num_games;
@@ -393,6 +393,7 @@ bool selectGame(Scumm *s, char *&ret)
if(selected>=0) {
chdir(the_game.dir);
ret = the_game.filename_base;
+ icon = the_game.icon;
return true;
} else
return false;