summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-19 12:10:31 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-19 12:10:31 +0000
commitad12a9189f33e65de827219eb573a6e63c7862c9 (patch)
tree28021f83fb1ff5495ebc67e533302b2669078a28 /src/main.cpp
parent36a25f2ac86f33c1b11f07d2096c159422b9e997 (diff)
downloadmana-client-ad12a9189f33e65de827219eb573a6e63c7862c9.tar.gz
mana-client-ad12a9189f33e65de827219eb573a6e63c7862c9.tar.bz2
mana-client-ad12a9189f33e65de827219eb573a6e63c7862c9.tar.xz
mana-client-ad12a9189f33e65de827219eb573a6e63c7862c9.zip
*** empty log message ***
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp38
1 files changed, 26 insertions, 12 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9d128581..c2f2f0fa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -62,9 +62,8 @@ unsigned char direction;
unsigned char stretch_mode, screen_mode;
char *dir;
-#ifndef WIN32
Sound sound;
-#endif /* not WIN32 */
+
// ini file configuration reader
Configuration config;
@@ -188,12 +187,6 @@ void init_engine() {
config.init(dir);
-#ifdef MACOSX
- //set_color_depth(32);
-#else
- //set_color_depth(16);
-#endif
-
SDL_WM_SetCaption("The Mana World", NULL);
@@ -217,6 +210,31 @@ void init_engine() {
exit(1);
}
+#ifdef __DEBUG
+ const SDL_VideoInfo *vi = SDL_GetVideoInfo();
+ std::cout << "It is " << ((vi->hw_available) ? "" : "not") <<
+ " possible to create hardware surfaces.\n";
+ std::cout << "There is " << ((vi->wm_available) ? "a" : "no") <<
+ " window manager available.\n";
+ std::cout << "Hardware to hardware blits are " <<
+ ((vi->blit_hw) ? "" : "not") << " accelerated.\n";
+ std::cout << "Hardware to hardware colorkey blits are " <<
+ ((vi->blit_hw_CC) ? "" : "not") << " accelerated.\n";
+ std::cout << "Hardware to hardware alpha blits are " <<
+ ((vi->blit_hw_A) ? "" : "not") << " accelerated.\n";
+ std::cout << "Software to hardware blits are " <<
+ ((vi->blit_sw) ? "" : "not") << " accelerated.\n";
+ std::cout << "Software to hardware colorkey blits are " <<
+ ((vi->blit_sw_CC) ? "" : "not") << " accelerated.\n";
+ std::cout << "Software to hardware alpha blits are " <<
+ ((vi->blit_sw_A) ? "" : "not") << " accelerated.\n";
+ std::cout << "Color fills are " <<
+ ((vi->blit_fill) ? "" : "not") << " accelerated.\n";
+ std::cout << "Available video memory: " << vi->video_mem << "\n";
+#endif
+
+ //vfmt Pixel format of the video device
+
// Create the graphics context
graphics = new Graphics();
@@ -239,7 +257,6 @@ void init_engine() {
init_gui(graphics);
state = LOGIN;
-#ifndef WIN32
// initialize sound-engine and start playing intro-theme /-kth5
try {
if (config.getValue("sound", 0) == 1) {
@@ -259,7 +276,6 @@ void init_engine() {
new OkDialog("Sound Engine", err, &initWarningListener);
warning(err);
}
-#endif /* not WIN32 */
}
/** Clear the engine */
@@ -301,9 +317,7 @@ int main(int argc, char *argv[]) {
charSelect();
break;
case GAME:
-#ifndef WIN32
sound.stopBgm();
-#endif /* not WIN32 */
status("GAME");
try {
map_start();