[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.30,1.31 alpha_but
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.30,1.31 alpha_button.cxx,1.3,1.4 capture_rectangle.cxx,1.13,1.14 console.cxx,1.13,1.14 fonts.cxx,1.3,1.4 fonts.hxx,1.5,1.6 fps_counter.cxx,1.6,1.7 hurry_up.cxx,1.7,1.8 level_desc.cxx,1.11,1.12 level_result.cxx,1.14,1.15 loading.cxx,1.5,1.6 menu_button.cxx,1.9,1.10 pingus_counter.cxx,1.14,1.15 pingus_main.cxx,1.87,1.88 theme.cxx,1.17,1.18 theme_selector.cxx,1.12,1.13time_display.cxx,1.14,1.15 |
Date: |
22 Apr 2003 16:40:43 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv27448
Modified Files:
action_button.cxx alpha_button.cxx capture_rectangle.cxx
console.cxx fonts.cxx fonts.hxx fps_counter.cxx hurry_up.cxx
level_desc.cxx level_result.cxx loading.cxx menu_button.cxx
pingus_counter.cxx pingus_main.cxx theme.cxx
theme_selector.cxx time_display.cxx
Log Message:
- replaced PingusResource::load_font with Fonts:fontname
- added bigendian workaround for alpha fonts
Index: action_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_button.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- action_button.cxx 19 Apr 2003 10:23:17 -0000 1.30
+++ action_button.cxx 22 Apr 2003 16:40:41 -0000 1.31
@@ -29,6 +29,7 @@
#include "world.hxx"
#include "gui/graphic_context.hxx"
#include "string_converter.hxx"
+#include "fonts.hxx"
using namespace Actions;
@@ -46,8 +47,8 @@
name = name_;
- font = PingusResource::load_font("Fonts/pingus_small", "fonts");
- font_b = PingusResource::load_font("Fonts/pingus", "fonts");
+ font = Fonts::pingus_small;
+ font_b = Fonts::pingus_large;
sprite = Sprite("Pingus/" + action_to_string(name) + to_string(owner_id),
"pingus", 25.0f);
sprite.set_align_center_bottom();
Index: alpha_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/alpha_button.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- alpha_button.cxx 19 Apr 2003 10:23:17 -0000 1.3
+++ alpha_button.cxx 22 Apr 2003 16:40:41 -0000 1.4
@@ -20,14 +20,13 @@
#include <ClanLib/Display/Display/display.h>
#include <ClanLib/Display/Font/font.h>
#include <ClanLib/Display/Input/mouse.h>
-#include "pingus_resource.hxx"
-
+#include "fonts.hxx"
#include "alpha_button.hxx"
AlphaButton::AlphaButton(std::string str, int x1, int y1, int w, int h) :
pressed(false),
- font (PingusResource::load_font("Fonts/smallfont_h", "fonts")),
- font_h(PingusResource::load_font("Fonts/smallfont", "fonts")),
+ font (Fonts::smallfont_h),
+ font_h(Fonts::smallfont),
name (str),
x1_pos(x1),
y1_pos(y1),
Index: capture_rectangle.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/capture_rectangle.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- capture_rectangle.cxx 19 Apr 2003 10:23:17 -0000 1.13
+++ capture_rectangle.cxx 22 Apr 2003 16:40:41 -0000 1.14
@@ -26,6 +26,7 @@
#include "button_panel.hxx"
#include "globals.hxx"
#include "string_converter.hxx"
+#include "fonts.hxx"
CaptureRectangle::CaptureRectangle (ButtonPanel* arg_button_panel)
: pingu(0),
@@ -35,7 +36,7 @@
arrow_left(PingusResource::load_surface("Cursors/arrow_left", "game")),
arrow_right(PingusResource::load_surface("Cursors/arrow_right", "game")),
button_panel(arg_button_panel),
- font(PingusResource::load_font("Fonts/courier_small", "fonts"))
+ font(Fonts::courier_small)
{
good.set_align_center();
bad.set_align_center();
Index: console.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/console.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- console.cxx 19 Apr 2003 10:23:17 -0000 1.13
+++ console.cxx 22 Apr 2003 16:40:41 -0000 1.14
@@ -21,7 +21,7 @@
#include <assert.h>
#include <ClanLib/Display/Display/display.h>
#include <ClanLib/Display/Font/font.h>
-#include "pingus_resource.hxx"
+#include "fonts.hxx"
#include "console.hxx"
#include "math.hxx"
@@ -140,7 +140,7 @@
Console::init()
{
// std::cout << "Console: Init..." << std::endl;
- font = PingusResource::load_font("Fonts/xterm","fonts");
+ font = Fonts::xterm;
// (*this) << "Pingus Output Console (hide/show it with F1)\n"
// << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
Index: fonts.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fonts.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fonts.cxx 21 Mar 2003 22:08:06 -0000 1.3
+++ fonts.cxx 22 Apr 2003 16:40:41 -0000 1.4
@@ -27,25 +27,54 @@
FontHandle chalk_small;
FontHandle pingus_small;
+FontHandle pingus_small_fix_num;
FontHandle pingus_large;
+
FontHandle smallfont;
+FontHandle smallfont_h;
+
+FontHandle courier_small;
FontHandle xterm;
FontHandle lcd;
void
init ()
{
+#ifdef WORDS_BIGENDIAN
+ // FIXME: Just a workaround, no fix
+ xterm = PingusResource::load_font("Fonts/xterm","fonts");
+
+ pingus_small = xterm;
+ pingus_small_fix_num = xterm;
+ pingus_large = xterm;
+
+ chalk_large = xterm;
+ chalk_normal = xterm;
+ chalk_small = xterm;
+
+ courier_small = xterm;
+
+ smallfont = xterm;
+ smallfont_h = xterm;
+
+ lcd = xterm;
+#else
pingus_small = PingusResource::load_font("Fonts/pingus_small", "fonts");
+ pingus_small_fix_num =
PingusResource::load_font("Fonts/pingus_small_fix_num", "fonts");
pingus_large = PingusResource::load_font("Fonts/pingus","fonts");
chalk_large = PingusResource::load_font("Fonts/chalk_large","fonts");
chalk_normal = PingusResource::load_font("Fonts/chalk_normal","fonts");
chalk_small = PingusResource::load_font("Fonts/chalk_small","fonts");
+ courier_small = PingusResource::load_font("Fonts/courier_small", "fonts");
+
xterm = PingusResource::load_font("Fonts/xterm","fonts");
smallfont = PingusResource::load_font("Fonts/smallfont","fonts");
+ smallfont_h = PingusResource::load_font("Fonts/smallfont_h","fonts");
lcd = PingusResource::load_font("Fonts/numbers", "fonts");
+#endif
}
void deinit () {}
Index: fonts.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fonts.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fonts.hxx 19 Apr 2003 10:23:17 -0000 1.5
+++ fonts.hxx 22 Apr 2003 16:40:41 -0000 1.6
@@ -28,9 +28,14 @@
extern FontHandle chalk_normal;
extern FontHandle chalk_small;
+extern FontHandle courier_small;
+
extern FontHandle pingus_small;
+extern FontHandle pingus_small_fix_num;
extern FontHandle pingus_large;
+
extern FontHandle smallfont;
+extern FontHandle smallfont_h;
extern FontHandle xterm;
extern FontHandle lcd;
Index: fps_counter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fps_counter.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- fps_counter.cxx 19 Apr 2003 10:23:17 -0000 1.6
+++ fps_counter.cxx 22 Apr 2003 16:40:41 -0000 1.7
@@ -21,7 +21,7 @@
#include <ClanLib/Core/System/system.h>
#include <ClanLib/Display/Display/display.h>
#include <ClanLib/Display/Font/font.h>
-#include "pingus_resource.hxx"
+#include "fonts.hxx"
#include "fps_counter.hxx"
#include "my_gettext.hxx"
@@ -41,7 +41,7 @@
void
FPSCounter::init()
{
- font = PingusResource::load_font("Fonts/pingus_small","fonts");
+ font = Fonts::pingus_small;
start_time = CL_System::get_time();
strcat(fps_string, _("unknown"));
fps_count = 0;
Index: hurry_up.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/hurry_up.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- hurry_up.cxx 19 Apr 2003 10:23:17 -0000 1.7
+++ hurry_up.cxx 22 Apr 2003 16:40:41 -0000 1.8
@@ -22,9 +22,10 @@
#include <ClanLib/Display/Font/font.h>
#include "pingus_resource.hxx"
#include "hurry_up.hxx"
+#include "fonts.hxx"
HurryUp::HurryUp (Client* c)
- : font(PingusResource::load_font("Fonts/pingus","fonts")),
+ : font(Fonts::pingus_large),
is_running(false),
is_finished(false),
center_reached(false),
Index: level_desc.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_desc.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- level_desc.cxx 19 Apr 2003 10:23:17 -0000 1.11
+++ level_desc.cxx 22 Apr 2003 16:40:41 -0000 1.12
@@ -23,6 +23,7 @@
#include "gui/display.hxx"
#include "pingus_resource.hxx"
#include "level_desc.hxx"
+#include "fonts.hxx"
#include "system.hxx"
#include "plf.hxx"
#include "my_gettext.hxx"
@@ -32,8 +33,8 @@
plf = arg_plf;
background = PingusResource::load_surface("Textures/stone", "textures");
- font = PingusResource::load_font("Fonts/pingus_small","fonts");
- title = PingusResource::load_font("Fonts/pingus","fonts");
+ font = Fonts::pingus_small;
+ title = Fonts::pingus_large;
description.set_font(font);
description.set_text(System::translate(plf->get_description()), 350);
Index: level_result.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_result.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- level_result.cxx 19 Apr 2003 10:23:17 -0000 1.14
+++ level_result.cxx 22 Apr 2003 16:40:41 -0000 1.15
@@ -29,13 +29,14 @@
#include "sound/sound.hxx"
#include "world.hxx"
#include "pingu_holder.hxx"
+#include "fonts.hxx"
#include "my_gettext.hxx"
PingusLevelResult::PingusLevelResult(World* w, Controller* c)
: controller (c)
{
- font = PingusResource::load_font("Fonts/pingus_small","fonts");
- title = PingusResource::load_font("Fonts/pingus","fonts");
+ font = Fonts::pingus_small;
+ title = Fonts::pingus_large;
background = PingusResource::load_surface("Textures/stone", "textures");
//result = r;
world = w;
Index: loading.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/loading.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- loading.cxx 19 Apr 2003 10:23:17 -0000 1.5
+++ loading.cxx 22 Apr 2003 16:40:41 -0000 1.6
@@ -21,6 +21,7 @@
#include <ClanLib/Display/Font/font.h>
#include "pingus_resource.hxx"
#include "gui/display.hxx"
+#include "fonts.hxx"
#include "loading.hxx"
Loading loading_screen;
@@ -37,8 +38,8 @@
void
Loading::init()
{
- sur = PingusResource::load_surface("Game/loading", "game");
- font = PingusResource::load_font("Fonts/courier_small", "fonts");
+ sur = PingusResource::load_surface("Game/loading", "game");
+ font = Fonts::courier_small;
is_init = true;
}
Index: menu_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- menu_button.cxx 19 Apr 2003 10:23:17 -0000 1.9
+++ menu_button.cxx 22 Apr 2003 16:40:41 -0000 1.10
@@ -39,8 +39,8 @@
SurfaceButton::SurfaceButton ()
{
- font = PingusResource::load_font("Fonts/pingus_small", "fonts");
- font_large = PingusResource::load_font("Fonts/pingus", "fonts");
+ font = Fonts::pingus_small;
+ font_large = Fonts::pingus_large;
mouse_over = false;
pressed = false;
Index: pingus_counter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_counter.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pingus_counter.cxx 19 Apr 2003 10:23:17 -0000 1.14
+++ pingus_counter.cxx 22 Apr 2003 16:40:41 -0000 1.15
@@ -28,12 +28,13 @@
#include "true_server.hxx"
#include "plf.hxx"
#include "globals.hxx"
+#include "fonts.hxx"
PingusCounter::PingusCounter(Server* s)
: server(s),
background (PingusResource::load_surface("Buttons/info","core"))
{
- font = PingusResource::load_font("Fonts/pingus_small_fix_num","fonts");
+ font = Fonts::pingus_small_fix_num;
}
void
Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- pingus_main.cxx 19 Apr 2003 10:23:17 -0000 1.87
+++ pingus_main.cxx 22 Apr 2003 16:40:41 -0000 1.88
@@ -661,7 +661,7 @@
}
#else /* !WIN32 */
- //If the User uses Windows, the Datadir is always the Subdirectory "data"
+ path_manager.set_path("../data");
path_manager.set_path("data");
path_manager.set_path(".");
#endif /* !WIN32 */
Index: theme.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- theme.cxx 19 Apr 2003 10:23:17 -0000 1.17
+++ theme.cxx 22 Apr 2003 16:40:41 -0000 1.18
@@ -33,11 +33,12 @@
#include "globals.hxx"
#include "theme.hxx"
#include "xml_plf.hxx"
+#include "fonts.hxx"
#include "gui/screen_manager.hxx"
Theme::Theme (const std::string& filename_)
- : font(PingusResource::load_font("Fonts/pingus_small","fonts")),
- title(PingusResource::load_font("Fonts/pingus","fonts")),
+ : font(Fonts::pingus_small),
+ title(Fonts::pingus_large),
filename (filename_),
is_loaded(false)
{
Index: theme_selector.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme_selector.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- theme_selector.cxx 19 Apr 2003 10:23:17 -0000 1.12
+++ theme_selector.cxx 22 Apr 2003 16:40:41 -0000 1.13
@@ -37,6 +37,7 @@
#include "sound/sound.hxx"
#include "path_manager.hxx"
#include "system.hxx"
+#include "fonts.hxx"
#include "theme.hxx"
ListBox::ListBox ()
@@ -65,7 +66,7 @@
ListItem::ListItem(std::string l)
{
label = l;
- font = PingusResource::load_font("Fonts/smallfont_h","fonts");
+ font = Fonts::smallfont_h;
}
ListItem::ListItem (const ListItem& old) : label(old.label), font(new
CL_Font(*(old.font)))
@@ -205,8 +206,8 @@
ThemeSelector::ThemeSelector()
{
dir_read = false;
- title_font = PingusResource::load_font("Fonts/pingus", "fonts");
- theme_font = PingusResource::load_font("Fonts/pingus_small", "fonts");
+ title_font = Fonts::pingus_large;
+ theme_font = Fonts::pingus_small;
left_arrow = PingusResource::load_surface("Hotspots/left_arrow", "global");
right_arrow = PingusResource::load_surface("Hotspots/right_arrow", "global");
Index: time_display.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/time_display.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- time_display.cxx 19 Apr 2003 10:23:17 -0000 1.14
+++ time_display.cxx 22 Apr 2003 16:40:41 -0000 1.15
@@ -29,15 +29,14 @@
#include "client.hxx"
#include "plf.hxx"
#include "game_time.hxx"
+#include "fonts.hxx"
#include "string_converter.hxx"
TimeDisplay::TimeDisplay (Client* c)
: server(c->get_server()),
infinity_symbol(PingusResource::load_surface("misc/infinity", "core"))
{
- //font = PingusResource::load_font("Fonts/numbers","fonts");
- //font = PingusResource::load_font("Fonts/pingus_small","fonts");
- font = PingusResource::load_font("Fonts/pingus_small_fix_num","fonts");
+ font = Fonts::pingus_small_fix_num;
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.30,1.31 alpha_button.cxx,1.3,1.4 capture_rectangle.cxx,1.13,1.14 console.cxx,1.13,1.14 fonts.cxx,1.3,1.4 fonts.hxx,1.5,1.6 fps_counter.cxx,1.6,1.7 hurry_up.cxx,1.7,1.8 level_desc.cxx,1.11,1.12 level_result.cxx,1.14,1.15 loading.cxx,1.5,1.6 menu_button.cxx,1.9,1.10 pingus_counter.cxx,1.14,1.15 pingus_main.cxx,1.87,1.88 theme.cxx,1.17,1.18 theme_selector.cxx,1.12,1.13time_display.cxx,1.14,1.15,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus README.CVS,1.2,NONE
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.51,1.52 editor_help_screen.cxx,1.10,1.11 object_selector.cxx,1.40,1.41 panel.cxx,1.7,1.8 status_line.cxx,1.10,1.11 string_reader.cxx,1.8,1.9 surface_selector.cxx,1.8,1.9
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus README.CVS,1.2,NONE
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.51,1.52 editor_help_screen.cxx,1.10,1.11 object_selector.cxx,1.40,1.41 panel.cxx,1.7,1.8 status_line.cxx,1.10,1.11 string_reader.cxx,1.8,1.9 surface_selector.cxx,1.8,1.9
- Index(es):