[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3189 - in trunk/pingus: . src/worldmap
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3189 - in trunk/pingus: . src/worldmap |
Date: |
Wed, 19 Sep 2007 18:40:04 +0200 |
Author: grumbel
Date: 2007-09-19 18:40:01 +0200 (Wed, 19 Sep 2007)
New Revision: 3189
Modified:
trunk/pingus/SConstruct
trunk/pingus/src/worldmap/manager.cpp
trunk/pingus/src/worldmap/manager.hpp
Log:
- more scons tweaking
- fix(?) for some odd compile bug
Modified: trunk/pingus/SConstruct
===================================================================
--- trunk/pingus/SConstruct 2007-09-19 16:32:08 UTC (rev 3188)
+++ trunk/pingus/SConstruct 2007-09-19 16:40:01 UTC (rev 3189)
@@ -21,31 +21,6 @@
import sys, os
-def CheckPKG_CONFIG_DIR(context):
- context.Message( 'Checking for PKG_CONFIG_PATH environment variable... ')
- if os.environ.has_key('PKG_CONFIG_PATH'):
- context.Result(os.environ['PKG_CONFIG_PATH'])
- return 1
- else:
- context.Result('not set')
- return 0
-
-def DefineOptions(filename, args):
- opts = Options(filename, args)
- opts.Add('CPPPATH', 'Additional preprocessor paths', [])
- opts.Add('CPPFLAGS', 'Additional preprocessor flags', [])
- opts.Add('CPPDEFINES', 'defined constants', [])
- opts.Add('LIBPATH', 'Additional library paths', [])
- opts.Add('LIBS', 'Additional libraries', [])
- opts.Add('CCFLAGS', 'C Compiler flags', [])
- opts.Add('LINKFLAGS', 'Linker Compiler flags', [])
- opts.Add('CC', 'C Compiler', 'gcc')
- opts.Add('CXX', 'C++ Compiler', 'g++')
- opts.Add('debug', 'Build with debugging options', 0)
- opts.Add('profile', 'Build with profiling support', 0)
- opts.Add('optional_sources', 'Additional source files', [])
- return opts
-
pingus_sources = [
# # 'gui/buffer_graphic_context.cpp',
# # 'pingus_level_test.cpp',
@@ -177,8 +152,6 @@
'src/input/controller_description.cpp',
'src/input/controller.cpp',
'src/input/core_driver.cpp',
-'src/input/xinput_driver.cpp',
-'src/input/xinput_device.cpp',
'src/input/sdl_driver.cpp',
'src/input/manager.cpp',
@@ -318,6 +291,22 @@
'lib/binreloc/binreloc.c'
]
+def DefineOptions(filename, args):
+ opts = Options(filename, args)
+ opts.Add('CPPPATH', 'Additional preprocessor paths', [])
+ opts.Add('CPPFLAGS', 'Additional preprocessor flags', [])
+ opts.Add('CPPDEFINES', 'defined constants', [])
+ opts.Add('LIBPATH', 'Additional library paths', [])
+ opts.Add('LIBS', 'Additional libraries', [])
+ opts.Add('CCFLAGS', 'C Compiler flags', [])
+ opts.Add('LINKFLAGS', 'Linker Compiler flags', [])
+ opts.Add('CC', 'C Compiler', 'gcc')
+ opts.Add('CXX', 'C++ Compiler', 'g++')
+ opts.Add('debug', 'Build with debugging options', 0)
+ opts.Add('profile', 'Build with profiling support', 0)
+ opts.Add('optional_sources', 'Additional source files', [])
+ return opts
+
Alias('configure')
if ('configure' in COMMAND_LINE_TARGETS) or \
@@ -380,7 +369,6 @@
env = config.Finish()
opts.Save("config.py", env)
- opts.Update(env)
print "Reports:"
print reports
Modified: trunk/pingus/src/worldmap/manager.cpp
===================================================================
--- trunk/pingus/src/worldmap/manager.cpp 2007-09-19 16:32:08 UTC (rev
3188)
+++ trunk/pingus/src/worldmap/manager.cpp 2007-09-19 16:40:01 UTC (rev
3189)
@@ -314,10 +314,7 @@
{
WorldMap* worldmap = WorldMapManager::instance()->worldmap;
- Rect cliprect(Vector2i(Math::max((Display::get_width() -
worldmap->get_width())/2, 0),
- Math::max((Display::get_height() -
worldmap->get_height())/2, 0)),
- Size(Math::min(Display::get_width(), worldmap->get_width()),
- Math::min(Display::get_height(), worldmap->get_height())));
+ Rect cliprect = WorldMapManager::instance()->get_trans_rect();
scene_context->clear();
scene_context->push_modelview();
@@ -373,12 +370,7 @@
void
WorldMapComponent::on_primary_button_press (int x, int y)
{
- WorldMap* worldmap = WorldMapManager::instance ()->worldmap;
- Rect cliprect(Vector2i(Math::max((Display::get_width() -
worldmap->get_width())/2, 0),
- Math::max((Display::get_height() -
worldmap->get_height())/2, 0)),
- Size(Math::min(Display::get_width(), worldmap->get_width()),
- Math::min(Display::get_height(), worldmap->get_height())));
-
+ Rect cliprect = WorldMapManager::instance()->get_trans_rect();
WorldMapManager::instance ()->worldmap->on_primary_button_press(x -
cliprect.left,
y -
cliprect.top);
}
@@ -387,12 +379,7 @@
void
WorldMapComponent::on_pointer_move (int x, int y)
{
- WorldMap* worldmap = WorldMapManager::instance ()->worldmap;
- Rect cliprect(Vector2i(Math::max((Display::get_width() -
worldmap->get_width())/2, 0),
- Math::max((Display::get_height() -
worldmap->get_height())/2, 0)),
- Size(Math::min(Display::get_width(), worldmap->get_width()),
- Math::min(Display::get_height(), worldmap->get_height())));
-
+ Rect cliprect = WorldMapManager::instance()->get_trans_rect();
WorldMapManager::instance ()->worldmap->on_pointer_move(x - cliprect.left,
y - cliprect.top);
}
@@ -400,12 +387,7 @@
void
WorldMapComponent::on_secondary_button_press (int x, int y)
{
- WorldMap* worldmap = WorldMapManager::instance ()->worldmap;
- Rect cliprect(Vector2i(Math::max((Display::get_width() -
worldmap->get_width())/2, 0),
- Math::max((Display::get_height() -
worldmap->get_height())/2, 0)),
- Size(Math::min(Display::get_width(), worldmap->get_width()),
- Math::min(Display::get_height(), worldmap->get_height())));
-
+ Rect cliprect = WorldMapManager::instance()->get_trans_rect();
WorldMapManager::instance ()->worldmap->on_secondary_button_press(x -
cliprect.left,
y -
cliprect.top);
}
@@ -433,6 +415,15 @@
instance_ = 0;
}
+Rect
+WorldMapManager::get_trans_rect() const
+{
+ return Rect(Vector2i(Math::max((Display::get_width() -
worldmap->get_width())/2, 0),
+ Math::max((Display::get_height() -
worldmap->get_height())/2, 0)),
+ Size(Math::min(Display::get_width(), worldmap->get_width()),
+ Math::min(Display::get_height(), worldmap->get_height())));
+}
+
} // namespace WorldMapNS
/* EOF */
Modified: trunk/pingus/src/worldmap/manager.hpp
===================================================================
--- trunk/pingus/src/worldmap/manager.hpp 2007-09-19 16:32:08 UTC (rev
3188)
+++ trunk/pingus/src/worldmap/manager.hpp 2007-09-19 16:40:01 UTC (rev
3189)
@@ -108,6 +108,8 @@
@param filename Example: "volcano.pingus" */
void change_map (const std::string& filename, NodeId node);
+ Rect get_trans_rect() const;
+
/** Singleton access function */
static WorldMapManager* instance ();
static void deinit();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3189 - in trunk/pingus: . src/worldmap,
grumbel at BerliOS <=