[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3390 - in trunk/pingus: . src/editor
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3390 - in trunk/pingus: . src/editor |
Date: |
Tue, 30 Oct 2007 07:05:57 +0100 |
Author: grumbel
Date: 2007-10-30 07:05:56 +0100 (Tue, 30 Oct 2007)
New Revision: 3390
Modified:
trunk/pingus/TODO
trunk/pingus/src/editor/level_objs.cpp
trunk/pingus/src/editor/object_selector.cpp
Log:
- fixed solidcolor-background getting 0,0 size
Modified: trunk/pingus/TODO
===================================================================
--- trunk/pingus/TODO 2007-10-30 05:58:08 UTC (rev 3389)
+++ trunk/pingus/TODO 2007-10-30 06:05:56 UTC (rev 3390)
@@ -308,8 +308,6 @@
- default entrance hotspots to 100
-- solid color background gets 0,0 size after load
-
- drag&drop is behind minimap
- shrinking the editor window to much causes a crash (limit size as temporary
fix)
Modified: trunk/pingus/src/editor/level_objs.cpp
===================================================================
--- trunk/pingus/src/editor/level_objs.cpp 2007-10-30 05:58:08 UTC (rev
3389)
+++ trunk/pingus/src/editor/level_objs.cpp 2007-10-30 06:05:56 UTC (rev
3390)
@@ -112,7 +112,7 @@
#endif
else if (attribs & HAS_COLOR && section_name == "solidcolor-background")
{ // FIXME: Should we have the object type in non-string form?
- gc.draw_fillrect(Rect(Vector2i((int)pos.x, (int)pos.y), Size(256,
256)), color, pos.z);
+ gc.draw_fillrect(get_rect(), color, pos.z);
gc.draw(sprite, pos);
}
else
@@ -281,6 +281,18 @@
desc.modifier = ResourceModifierNS::ROT0;
sprite = Resource::load_sprite(desc);
}
+ else if (section_name == "solidcolor-background")
+ {
+ desc.res_name = "core/editor/solidcolorbackground";
+ desc.modifier = ResourceModifierNS::ROT0;
+ sprite = Resource::load_sprite(desc);
+ }
+ else if (section_name == "starfield-background")
+ {
+ desc.res_name = "core/editor/starfield";
+ desc.modifier = ResourceModifierNS::ROT0;
+ sprite = Resource::load_sprite(desc);
+ }
}
void
Modified: trunk/pingus/src/editor/object_selector.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector.cpp 2007-10-30 05:58:08 UTC (rev
3389)
+++ trunk/pingus/src/editor/object_selector.cpp 2007-10-30 06:05:56 UTC (rev
3390)
@@ -152,7 +152,6 @@
LevelObj* obj = new LevelObj("solidcolor-background", impl);
obj->set_pos(Vector3f((float)pos.x, (float)pos.y, -1000.0f)); // FIXME:
Hack, z-pos handling is messed up
obj->set_color(Color(255, 0, 255));
- obj->set_res_desc(ResDescriptor("core/editor/solidcolorbackground"));
return obj;
}
};
@@ -167,7 +166,6 @@
LevelObj* create(const Vector2i& pos, LevelImpl* impl) {
LevelObj* obj = new LevelObj("starfield-background", impl);
obj->set_pos(Vector3f((float)pos.x, (float)pos.y, -1000.0f)); // FIXME:
Hack, z-pos handling is messed up
- obj->set_res_desc(ResDescriptor("core/editor/starfield"));
obj->set_small_stars(500);
obj->set_middle_stars(250);
obj->set_large_stars(125);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3390 - in trunk/pingus: . src/editor,
grumbel at BerliOS <=