pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3255 - in trunk/pingus: . src/editor src/gui


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3255 - in trunk/pingus: . src/editor src/gui
Date: Fri, 28 Sep 2007 23:52:02 +0200

Author: grumbel
Date: 2007-09-28 23:52:01 +0200 (Fri, 28 Sep 2007)
New Revision: 3255

Modified:
   trunk/pingus/TODO
   trunk/pingus/src/editor/editor_screen.cpp
   trunk/pingus/src/editor/editor_viewport.cpp
   trunk/pingus/src/editor/level_properties.cpp
   trunk/pingus/src/editor/level_properties.hpp
   trunk/pingus/src/editor/object_properties.cpp
   trunk/pingus/src/editor/object_properties.hpp
   trunk/pingus/src/editor/object_selector.cpp
   trunk/pingus/src/editor/object_selector.hpp
   trunk/pingus/src/editor/object_selector_list.cpp
   trunk/pingus/src/editor/object_selector_list.hpp
   trunk/pingus/src/gui/screen_manager.cpp
Log:
- added dynamic window resize to the editor

Modified: trunk/pingus/TODO
===================================================================
--- trunk/pingus/TODO   2007-09-28 21:29:03 UTC (rev 3254)
+++ trunk/pingus/TODO   2007-09-28 21:52:01 UTC (rev 3255)
@@ -11,6 +11,8 @@
 - update ChangeLog: svn2cl --break-before-msg
 
 - make sure that the game still runs after install.sh
+
+- check NEWS, README, INSTALL.*
 
 Stuff to do at all times:
 ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -91,6 +93,19 @@
 Important:
 ==========
 
+- add something like FileReader::must_read_int() for cases where a
+  value isn't optional, something that can figure out values that
+  havn't be used would be nice as well
+
+- Regenerate Courier fonts for latin-1/2/9
+
+### Loading font file: system://data/images/fonts/courier_small-iso-8859-9.font
+Font: datadir://images/fonts/courier_small-iso-8859-9.png
+  Error: glyphs found: 188, expected 189
+  Format: bpp: 32
+
+- integrate install command into scons (maybe), use 'install' instead of 'cp'
+
 - FPS: issues: 
 
   - Editor:     27fps - 20%
@@ -101,7 +116,9 @@
   - EndScreen:  50fps - 19%
 
 - Loading data/levels/playable/chouser02.pingus in Editor and saving
-  it again causes the background to be at the wrong position
+  it again causes the background to be at the wrong position (caused
+  by level lacking position and editor setting a different fallback
+  then in-game)
 
 - frameskip seems broken
 
@@ -127,7 +144,7 @@
   Enable Autoscrolling: [always, only in fullscreen, never]
   ----------------------------------
 
-- add dynamic resize
+- add dynamic resize for the game
 
 - resource system needs a review/rewrite
 
@@ -179,11 +196,6 @@
 Less Important:
 ===============
 
-### Loading font file: system://data/images/fonts/courier_small-iso-8859-9.font
-Font: datadir://images/fonts/courier_small-iso-8859-9.png
-  Error: glyphs found: 188, expected 189
-  Format: bpp: 32
-
 - fix verdana11 for latin2 and latin9 or go UTF-8
 
 - Liquids/water is 32, others are 64, this is causing trouble with the

Modified: trunk/pingus/src/editor/editor_screen.cpp
===================================================================
--- trunk/pingus/src/editor/editor_screen.cpp   2007-09-28 21:29:03 UTC (rev 
3254)
+++ trunk/pingus/src/editor/editor_screen.cpp   2007-09-28 21:52:01 UTC (rev 
3255)
@@ -461,7 +461,11 @@
   else
     viewport->set_rect(Rect(0, 38, size.width, size.height));
 
-  object_properties->set_rect(Rect(Vector2i(0, size.height-150), Size(200, 
150)));
+  object_properties->set_rect(Rect(Vector2i(0, size.height - 
object_properties->get_rect().get_height()), 
+                                   
Size(object_properties->get_rect().get_width(),
+                                        
object_properties->get_rect().get_height())));
+
+  level_properties->set_rect(Rect(Vector2i(0,38), Size(size.width-244,302)));
 }
 
 } // namespace Editor 

Modified: trunk/pingus/src/editor/editor_viewport.cpp
===================================================================
--- trunk/pingus/src/editor/editor_viewport.cpp 2007-09-28 21:29:03 UTC (rev 
3254)
+++ trunk/pingus/src/editor/editor_viewport.cpp 2007-09-28 21:52:01 UTC (rev 
3255)
@@ -573,7 +573,6 @@
 void
 EditorViewport::update_layout()
 {
-  std::cout << "Viewport: Rect: " << rect.get_width() << " " << 
rect.get_height() << std::endl;
   state.set_size(rect.get_width(), rect.get_height());
   drawing_context->set_rect(rect);
 }

Modified: trunk/pingus/src/editor/level_properties.cpp
===================================================================
--- trunk/pingus/src/editor/level_properties.cpp        2007-09-28 21:29:03 UTC 
(rev 3254)
+++ trunk/pingus/src/editor/level_properties.cpp        2007-09-28 21:52:01 UTC 
(rev 3255)
@@ -203,6 +203,29 @@
 { 
   level->set_music(str);
 }
+
+void
+LevelProperties::update_layout()
+{
+  GroupComponent::update_layout();
+
+  int w = rect.get_width() - 120; 
+  author->set_rect(Rect(Vector2i(110,  10), Size(  w, 20)));
+  levelname->set_rect(Rect(Vector2i(110,  32), Size(  w, 20)));
+  description->set_rect(Rect(Vector2i(110,  54), Size(  w, 20*3)));
+  
+  int y = 116;
+  number_of_pingus->set_rect(Rect(Vector2i(110,  y), Size(  w, 20)));
+  number_to_save->set_rect(Rect(Vector2i(110,  y+22), Size(  w, 20))); 
+
+  time->set_rect(Rect(Vector2i(110,  y+44), Size(  w, 20)));
+  width->set_rect(Rect(Vector2i(110,  y+66), Size(  w, 20)));
+  height->set_rect(Rect(Vector2i(110,  y+88), Size(  w, 20)));
+  
+  difficulty->set_rect(Rect(Vector2i(110, y+110), Size(  w, 20)));
+  comment->set_rect(Rect(Vector2i(110, y+132), Size(  w, 20)));
+  music->set_rect(Rect(Vector2i(110, y+154), Size(  w, 20)));
+}
 
 } // namespace Editor
 

Modified: trunk/pingus/src/editor/level_properties.hpp
===================================================================
--- trunk/pingus/src/editor/level_properties.hpp        2007-09-28 21:29:03 UTC 
(rev 3254)
+++ trunk/pingus/src/editor/level_properties.hpp        2007-09-28 21:52:01 UTC 
(rev 3255)
@@ -72,6 +72,8 @@
   void on_comment_change(const std::string& str);
   void on_music_change(const std::string& str);
 
+  void update_layout();
+
 private:
   LevelProperties (const LevelProperties&);
   LevelProperties& operator= (const LevelProperties&);

Modified: trunk/pingus/src/editor/object_properties.cpp
===================================================================
--- trunk/pingus/src/editor/object_properties.cpp       2007-09-28 21:29:03 UTC 
(rev 3254)
+++ trunk/pingus/src/editor/object_properties.cpp       2007-09-28 21:52:01 UTC 
(rev 3255)
@@ -574,6 +574,12 @@
       (*i)->set_repeat(r);
     }
 }
+
+void
+ObjectProperties::update_layout()
+{
+  GroupComponent::update_layout();
+}
 
 } // namespace Editor
 

Modified: trunk/pingus/src/editor/object_properties.hpp
===================================================================
--- trunk/pingus/src/editor/object_properties.hpp       2007-09-28 21:29:03 UTC 
(rev 3254)
+++ trunk/pingus/src/editor/object_properties.hpp       2007-09-28 21:52:01 UTC 
(rev 3255)
@@ -100,6 +100,7 @@
   
   void set_object(LevelObj* obj);
   void draw_background(DrawingContext& gc);
+  void update_layout();
 
   void set_objects(const std::vector<LevelObj*>& objs);
 

Modified: trunk/pingus/src/editor/object_selector.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector.cpp 2007-09-28 21:29:03 UTC (rev 
3254)
+++ trunk/pingus/src/editor/object_selector.cpp 2007-09-28 21:52:01 UTC (rev 
3255)
@@ -519,6 +519,13 @@
   std::cout << "ObjectSelector: unimplemented: " << __FILE__ << ":" << 
__LINE__ << std::endl;
   return new ObjectSelectorSet(object_list, 48, 48);
 }
+
+void
+ObjectSelector::update_layout()
+{
+  GroupComponent::update_layout();
+  object_list->set_rect(Rect(2, 2 + 60 + 2, rect.get_width() - 2, 
rect.get_height() - 2)); 
+}
 
 } // namespace Editor
 

Modified: trunk/pingus/src/editor/object_selector.hpp
===================================================================
--- trunk/pingus/src/editor/object_selector.hpp 2007-09-28 21:29:03 UTC (rev 
3254)
+++ trunk/pingus/src/editor/object_selector.hpp 2007-09-28 21:52:01 UTC (rev 
3255)
@@ -78,6 +78,7 @@
   ObjectSelectorSet* create_weather();
   ObjectSelectorSet* create_worldobj();
 
+  void update_layout();
 private:
   ObjectSelector (const ObjectSelector&);
   ObjectSelector& operator= (const ObjectSelector&);

Modified: trunk/pingus/src/editor/object_selector_list.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector_list.cpp    2007-09-28 21:29:03 UTC 
(rev 3254)
+++ trunk/pingus/src/editor/object_selector_list.cpp    2007-09-28 21:52:01 UTC 
(rev 3255)
@@ -216,6 +216,12 @@
 
   current_object = -1;
 }
+
+void
+ObjectSelectorList::update_layout()
+{
+  drawing_context->set_rect(rect);
+}
 
 } // namespace Editor
 

Modified: trunk/pingus/src/editor/object_selector_list.hpp
===================================================================
--- trunk/pingus/src/editor/object_selector_list.hpp    2007-09-28 21:29:03 UTC 
(rev 3254)
+++ trunk/pingus/src/editor/object_selector_list.hpp    2007-09-28 21:52:01 UTC 
(rev 3255)
@@ -87,7 +87,7 @@
 
   void set_objects(ObjectSelectorSet* object_set);
 
-  void update_layout() {}
+  void update_layout();
 private:
   ObjectSelectorList (const ObjectSelectorList&);
   ObjectSelectorList& operator= (const ObjectSelectorList&);

Modified: trunk/pingus/src/gui/screen_manager.cpp
===================================================================
--- trunk/pingus/src/gui/screen_manager.cpp     2007-09-28 21:29:03 UTC (rev 
3254)
+++ trunk/pingus/src/gui/screen_manager.cpp     2007-09-28 21:52:01 UTC (rev 
3255)
@@ -293,7 +293,7 @@
 void
 ScreenManager::resize(const Size& size)
 {
-  std::cout << "Resize: " << size.width << "x" << size.height << std::endl;
+  display_gc->set_rect(Rect(Vector2i(0, 0), size));
 
   // FIXME: Calling this causes horrible flicker, any better way to resize the 
screen?
   Display::set_video_mode(size.width, size.height);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]