FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EPEL Development

 
 
LinkBack Thread Tools
 
Old 12-20-2011, 10:51 AM
Nelson Manuel Marques
 
Default Package for newly open sourced linux game, Beret

Hi,

Indeed it would be better. Are you offering yourself to provide such
patch ?

NM



On Tue, 2011-12-20 at 12:43 +0100, Karel Volný wrote:
> ...
> > > And if there's a compatible font in Fedora, symlink to it.
> >
> > True. We can remove that font and symlink it to tahoma provided
> > by the mscore-fonts.
>
> symlink? - why?
>
> wouldn't it be better to teach the game to look into proper
> directories (if it doesn't use some standard library providing
> access to fonts)?
>
> K.
>


_______________________________________________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 
Old 12-20-2011, 01:15 PM
Karel Volný
 
Default Package for newly open sourced linux game, Beret

Hi,

> Indeed it would be better. Are you offering yourself to provide
> such patch ?

see below for some inspiration ...

meanwhile, the git sources changed not to use Tahoma, but I've
tried anyways - the package would need to depend on wine-tahoma-
fonts where I've found tahoma.ttf

I've compiled with

CFLAGS='-I/usr/include/SDL -DFONT_PATH="/usr/share/fonts/wine-
tahoma-fonts/"' make

you'd use %{_includedir} instead of "/usr/include" and
%{_datadir} instead of "/usr/share" in .spec

(note that keeping double quotation marks around the path string
is important)

also RESOURCE_PATH needs to be handled in a similar way ...


--- Makefile~ 2011-12-20 13:07:29.000000000 +0100
+++ Makefile 2011-12-20 14:17:28.095829521 +0100
@@ -1,6 +1,6 @@
CC= gcc
-CFLAGS= -Wall -g
-LFLAGS= -lSDLmain -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer
+CFLAGS+=-Wall -g
+LFLAGS=-lSDL -lSDL_image -lSDL_ttf -lSDL_mixer -lm

default: beret

--- game.c~ 2011-12-20 13:07:29.000000000 +0100
+++ game.c 2011-12-20 14:48:21.639827082 +0100
@@ -91,10 +91,17 @@
#ifdef __APPLE__
#define SUPPORT_PATH "Library/Application Support/Beret/"
#define RESOURCE_PATH "Beret.app/Contents/Resources/"
-#else
+#define FONT_PATH RESOURCE_PATH
+#endif
+
+#ifndef RESOURCE_PATH
#define RESOURCE_PATH ""
#endif

+#ifndef FONT_PATH
+#define FONT_PATH RESOURCE_PATH
+#endif
+
#define QUITMOD_WIN KMOD_ALT
#define QUITKEY_WIN SDLK_F4
#define QUITMOD_LIN KMOD_CTRL
@@ -894,9 +901,12 @@
}

// Load fonts
- font = TTF_OpenFont(RESOURCE_PATH "AveriaSans-Regular.ttf",
24);
- smfont = TTF_OpenFont(RESOURCE_PATH "AveriaSans-Regular.ttf",
9);
- medfont = TTF_OpenFont(RESOURCE_PATH "AveriaSans-Regular.ttf",
16);
+ font = TTF_OpenFont(FONT_PATH "tahoma.ttf", 24);
+ smfont = TTF_OpenFont(FONT_PATH "tahoma.ttf", 9);
+ medfont = TTF_OpenFont(FONT_PATH "tahoma.ttf", 16);
+ if ((font == NULL) || (smfont == NULL) || (medfont = NULL)) {
+ fprintf(stderr,"We're going to segfault due to null pointer,
as there's no error handling for opening the fonts :-)
");
+ }

// Load music
for (i=0; i<MUSIC_MAX; i++) {

--
Karel Volný
QE BaseOs/Daemons Team
Red Hat Czech, Brno
tel. +420 532294274
(RH: +420 532294111 ext. 8262074)
xmpp kavol@jabber.cz
:: "Never attribute to malice what can
:: easily be explained by stupidity."_______________________________________ ________
epel-devel-list mailing list
epel-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/epel-devel-list
 

Thread Tools




All times are GMT. The time now is 03:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org