[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth ./changelog src/font.cpp
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth ./changelog src/font.cpp |
Date: |
Sat, 08 Jan 2005 16:23:42 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 05/01/08 21:09:16
Modified files:
. : changelog
src : font.cpp
Log message:
fixed and activated reading fonts from zip files (thanks silene again)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/changelog.diff?tr1=1.433&tr2=1.434&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/font.cpp.diff?tr1=1.95&tr2=1.96&r1=text&r2=text
Patches:
Index: wesnoth/changelog
diff -u wesnoth/changelog:1.433 wesnoth/changelog:1.434
--- wesnoth/changelog:1.433 Sat Jan 8 13:57:22 2005
+++ wesnoth/changelog Sat Jan 8 21:09:16 2005
@@ -21,7 +21,8 @@
* Death Knight
* Lord
* Master Bowman
- * take advantage of libzipios++ if available, to read cfg files, maps,
images, and sound effects from zip files
+ * take advantage of libzipios++ if available, to read cfg files, maps,
+ images, sound effects, and fonts from zip files
* fixed missing Deathblade in multiplayer
* downloaded campaigns no longer require a restart to be able to play them
* multiplayer game settings (map name, gold per village, ...) are saved now
Index: wesnoth/src/font.cpp
diff -u wesnoth/src/font.cpp:1.95 wesnoth/src/font.cpp:1.96
--- wesnoth/src/font.cpp:1.95 Sat Jan 8 13:59:05 2005
+++ wesnoth/src/font.cpp Sat Jan 8 21:09:16 2005
@@ -1,4 +1,4 @@
-/* $Id: font.cpp,v 1.95 2005/01/08 13:59:05 ydirson Exp $ */
+/* $Id: font.cpp,v 1.96 2005/01/08 21:09:16 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -11,6 +11,7 @@
See the COPYING file for more details.
*/
+#include "wesconfig.h"
#include "global.hpp"
#include "font.hpp"
@@ -48,7 +49,7 @@
std::string name;
LOG_FT << "Opening font '" << fname << "' ...\n";
-#if 1 || !defined(USE_ZIPIOS)
+#ifndef USE_ZIPIOS
if(game_config::path.empty() == false) {
name = game_config::path + "/fonts/" + fname;
LOG_FT << "Trying file '" << name << "' ...\n";
@@ -75,12 +76,12 @@
TTF_Font* font = TTF_OpenFont(name.c_str(),size);
#else
- std::string s = read_file("fonts/" + fname);
- if (s.empty()) {
+ std::string *s = new std::string(read_file("fonts/" + fname));
+ if (s->empty()) {
ERR_FT << "Failed opening font file '" << fname << "'\n";
return NULL;
}
- SDL_RWops* ops = SDL_RWFromMem((void*)s.c_str(), s.size());
+ SDL_RWops* ops = SDL_RWFromMem((void*)s->c_str(), s->size());
TTF_Font* font = TTF_OpenFontRW(ops, 0, size);
#endif
if(font == NULL) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth ./changelog src/font.cpp,
Yann Dirson <=