[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.96,1.97
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.96,1.97 |
Date: |
18 Aug 2003 11:47:42 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv32240
Modified Files:
pingus_main.cxx
Log Message:
- made render preview not open a window
Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- pingus_main.cxx 16 Aug 2003 20:51:28 -0000 1.96
+++ pingus_main.cxx 18 Aug 2003 11:47:40 -0000 1.97
@@ -770,9 +770,12 @@
if (print_fps)
Display::add_flip_screen_hook(&fps_counter);
- // Register the global event catcher
- on_button_press_slot = CL_Input::sig_button_press ().connect (&global_event,
&GlobalEvent::on_button_press);
- on_button_release_slot = CL_Input::sig_button_release ().connect
(&global_event, &GlobalEvent::on_button_release);
+ if (!render_preview)
+ {
+ // Register the global event catcher
+ on_button_press_slot = CL_Input::sig_button_press ().connect
(&global_event, &GlobalEvent::on_button_press);
+ on_button_release_slot = CL_Input::sig_button_release ().connect
(&global_event, &GlobalEvent::on_button_release);
+ }
// Set the root screen
if (show_input_debug_screen) // show a debug screen
@@ -846,16 +849,19 @@
//ScreenManager::instance()->push_screen (new StoryScreen(), true);
}
- // show the main menu, the rest of the game is spawn from there
- if (maintainer_mode)
- std::cout << "PingusMain::start screen manager" << std::endl;
- ScreenManager::instance ()->display ();
- if (maintainer_mode)
- std::cout << "PingusMain::quit game and screen_manager" << std::endl;
+ if (!render_preview)
+ {
+ // show the main menu, the rest of the game is spawn from there
+ if (maintainer_mode)
+ std::cout << "PingusMain::start screen manager" << std::endl;
+ ScreenManager::instance ()->display ();
+ if (maintainer_mode)
+ std::cout << "PingusMain::quit game and screen_manager" << std::endl;
- // unregister the global event catcher
- CL_Input::sig_button_press ().disconnect (on_button_press_slot);
- CL_Input::sig_button_release ().disconnect(on_button_release_slot);
+ // unregister the global event catcher
+ CL_Input::sig_button_press ().disconnect (on_button_press_slot);
+ CL_Input::sig_button_release ().disconnect(on_button_release_slot);
+ }
}
int
@@ -897,9 +903,11 @@
init_pingus();
// Avoid uglyness on window opening
- CL_Display::clear_display();
- CL_Display::flip_display();
-
+ if (!render_preview)
+ {
+ CL_Display::clear_display();
+ CL_Display::flip_display();
+ }
start_game();
}
@@ -943,37 +951,46 @@
CL_SetupJPEG::init ();
CL_SetupGUI::init ();
+ if (render_preview)
+ {
+ // Register only the resource types
+ CL_SetupDisplay::init(true);
+ }
+ else
+ {
+
#ifdef HAVE_LIBCLANGL
- if (use_opengl) {
- CL_SetupGL::init();
- std::cout << "Using OpenGL" << std::endl;
- }
+ if (use_opengl) {
+ CL_SetupGL::init();
+ std::cout << "Using OpenGL" << std::endl;
+ }
#endif
- CL_SetupDisplay::init();
-
- on_exit_press_slot = CL_System::sig_quit().connect(this,
&PingusMain::on_exit_press);
+ CL_SetupDisplay::init();
- if (verbose)
- {
- std::cout << "Using resolution: "
- << screen_width << "x" << screen_height << std::endl;
- }
+ on_exit_press_slot = CL_System::sig_quit().connect(this,
&PingusMain::on_exit_press);
- // Initing the display
- CL_Display::set_videomode(screen_width, screen_height, 16,
- fullscreen_enabled,
- false); // allow resize
- CL_Display::clear_display();
- CL_Display::flip_display();
+ if (verbose)
+ {
+ std::cout << "Using resolution: "
+ << screen_width << "x" << screen_height << std::endl;
+ }
+ // Initing the display
+ CL_Display::set_videomode(screen_width, screen_height, 16,
+ fullscreen_enabled,
+ false); // allow resize
+ CL_Display::clear_display();
+ CL_Display::flip_display();
+
#ifdef HAVE_LIBCLANGL
- if (use_opengl)
- {
- CL_OpenGL::begin_2d ();
- glEnable (GL_BLEND);
- }
+ if (use_opengl)
+ {
+ CL_OpenGL::begin_2d ();
+ glEnable (GL_BLEND);
+ }
#endif
+ }
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.96,1.97,
grumbel <=