updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / anagramarama / anagramarama_0.2-1.diff
blob33f555cf5d0f61c9ab87ef3389cb32c894c57926
1 --- anagramarama/anagramarama.6
2 +++ anagramarama/anagramarama.6
3 @@ -0,0 +1,23 @@
4 +.\" Hey, EMACS: -*- nroff -*-
5 +.TH ANAGRAMARAMA 6 "January 4, 2005"
6 +.SH NAME
7 +anagramarama \- cute anagram game using SDL
8 +.SH SYNOPSIS
9 +.B anagramarama
10 +.RI
11 +.br
12 +.SH DESCRIPTION
13 +.B anagramarama
14 +is a simple wordgame in which one tries to guess all the different
15 +permutations of a scrambled word which form another word within the
16 +time limit. Guess the original word and you move on to the next
17 +level.
18 +.PP
19 +.SH OPTIONS
20 +None, currently.
21 +.br
22 +.SH AUTHOR
23 +anagramarama was written by Colm Gallagher <colm@coralquest.com>
24 +.PP
25 +This manual page was written by Ryan Stutsman <rstutsma@purdue.edu>,
26 +for the Debian project (but may be used by others).
27 --- anagramarama/makefile
28 +++ anagramarama/makefile
29 @@ -1,27 +1,47 @@
30 -LFLAGS=-Wall -funroll-loops -fomit-frame-pointer -pipe -O9
31 -CFLAGS=-Wall `sdl-config --cflags --libs` -funroll-loops -fomit-frame-pointer -pipe -O9 -lSDL_mixer
32 -CC=gcc
33 +CFLAGS=-Wall -O3
34 +CPPFLAGS=`sdl-config --cflags` -DDATA_DIR=\"$(DATA_DESTDIR)\" \
35 + -DIMAGES_DIR=\"$(IMAGES_DESTDIR)\" -DAUDIO_DIR=\"$(AUDIO_DESTDIR)\"
36 +LDLIBS=-lSDL_mixer `sdl-config --libs`
38 C_FILES=src/dlb.c src/linked.c src/sprite.c src/ag.c
39 OBJ_FILES=src/dlb.o src/linked.o src/sprite.o src/ag.o
40 -OUT_FILE=ag
42 -all:ag
43 +BIN=anagramarama
45 -ag: $(OBJ_FILES)
46 - $(CC) $(CFLAGS) -o $(OUT_FILE) $(OBJ_FILES)
47 +DATA_DESTDIR=$(DESTDIR)/usr/share/anagramarama
48 +AUDIO_DESTDIR=$(DATA_DESTDIR)/audio
49 +IMAGES_DESTDIR=$(DATA_DESTDIR)/images
51 -src/dlb.o: src/dlb.c
52 - $(CC) $(LFLAGS) -c -o $@ $^
53 +DATA_FILES=wordlist.txt
54 +AUDIO_FILES=badword.wav click-answer.wav clock-tick.wav found.wav shuffle.wav \
55 + clearword.wav click-shuffle.wav duplicate.wav foundbig.wav
56 +IMAGE_FILES=background.bmp numberBank.bmp letterBank.bmp smallLetterBank.bmp
58 -src/linked.o: src/linked.c
59 - $(CC) $(LFLAGS) -c -o $@ $^
61 -src/sprite.o: src/sprite.c
62 - $(CC) $(LFLAGS) -c -o $@ $^
63 +.PHONY: all clean install
65 +all: $(BIN)
67 -src/ag.o: src/ag.c
68 - $(CC) $(LFLAGS) -c -o $@ $^
69 +$(BIN): $(OBJ_FILES)
70 + $(CC) $(CFLAGS) $(CPPFLAGS) -o $(BIN) $(OBJ_FILES) $(LDLIBS)
72 clean:
73 - rm -f src/*.o
74 + rm -f $(BIN) src/*.o
76 +install: $(BIN)
77 + mkdir -p $(DESTDIR)/usr/bin/
78 + install -m 755 anagramarama $(DESTDIR)/usr/bin
80 + mkdir -p $(DATA_DESTDIR)
81 + for i in $(DATA_FILES); do \
82 + install -m 644 $$i $(DATA_DESTDIR); \
83 + done
85 + mkdir -p $(AUDIO_DESTDIR)
86 + for i in $(AUDIO_FILES); do \
87 + install -m 644 ./audio/$$i $(AUDIO_DESTDIR); \
88 + done
90 + mkdir -p $(IMAGES_DESTDIR)
91 + for i in $(IMAGE_FILES); do \
92 + install -m 644 images/$$i $(IMAGES_DESTDIR); \
93 + done
94 --- anagramarama/src/ag.c
95 +++ anagramarama/src/ag.c
96 @@ -184,15 +184,15 @@
97 ***********************************************************/
98 void bufferSounds(struct sound** soundCache){
100 - pushSound(&(*soundCache),"click-answer", "audio/click-answer.wav");
101 - pushSound(&(*soundCache),"click-shuffle", "audio/click-shuffle.wav");
102 - pushSound(&(*soundCache),"foundbig", "audio/foundbig.wav");
103 - pushSound(&(*soundCache),"found", "audio/found.wav");
104 - pushSound(&(*soundCache),"clear", "audio/clearword.wav");
105 - pushSound(&(*soundCache),"duplicate", "audio/duplicate.wav");
106 - pushSound(&(*soundCache),"badword", "audio/badword.wav");
107 - pushSound(&(*soundCache),"shuffle", "audio/shuffle.wav");
108 - pushSound(&(*soundCache),"clock-tick", "audio/clock-tick.wav");
109 + pushSound(&(*soundCache),"click-answer", AUDIO_DIR "/click-answer.wav");
110 + pushSound(&(*soundCache),"click-shuffle", AUDIO_DIR "/click-shuffle.wav");
111 + pushSound(&(*soundCache),"foundbig", AUDIO_DIR "/foundbig.wav");
112 + pushSound(&(*soundCache),"found", AUDIO_DIR "/found.wav");
113 + pushSound(&(*soundCache),"clear", AUDIO_DIR "/clearword.wav");
114 + pushSound(&(*soundCache),"duplicate", AUDIO_DIR "/duplicate.wav");
115 + pushSound(&(*soundCache),"badword", AUDIO_DIR "/badword.wav");
116 + pushSound(&(*soundCache),"shuffle", AUDIO_DIR "/shuffle.wav");
117 + pushSound(&(*soundCache),"clock-tick", AUDIO_DIR "audio/clock-tick.wav");
121 @@ -982,7 +982,7 @@
122 int done = 0;
124 filelocation = rand()%10000;
125 - wordlist=fopen("wordlist.txt","r");
126 + wordlist=fopen(DATA_DIR "/wordlist.txt","r");
128 for (i=0;i<=filelocation;i++){
130 @@ -1485,7 +1485,7 @@
131 int i;
133 // show background
134 - ShowBMP("images/background.bmp",screen, 0,0);
135 + ShowBMP(IMAGES_DIR "/background.bmp",screen, 0,0);
137 destroyLetters(&(*letters));
139 @@ -1760,9 +1760,9 @@
140 createDLBTree(&dlbHead);
142 // cache in-game graphics
143 - letterBank = SDL_LoadBMP("images/letterBank.bmp");
144 - smallLetterBank = SDL_LoadBMP("images/smallLetterBank.bmp");
145 - numberBank = SDL_LoadBMP("images/numberBank.bmp");
146 + letterBank = SDL_LoadBMP(IMAGES_DIR "/letterBank.bmp");
147 + smallLetterBank = SDL_LoadBMP(IMAGES_DIR "/smallLetterBank.bmp");
148 + numberBank = SDL_LoadBMP(IMAGES_DIR "/numberBank.bmp");
150 rootWord = malloc(sizeof(char)*9);
151 newGame(&head, dlbHead, screen, &letters);
152 --- anagramarama/src/dlb.c
153 +++ anagramarama/src/dlb.c
154 @@ -100,7 +100,7 @@
155 //printf("createDLBTree\n");
157 // open wordlist file
158 - wordlist = fopen("wordlist.txt", "r");
159 + wordlist = fopen(DATA_DIR "/wordlist.txt", "r");
161 // get each word from the list
162 while (fscanf(wordlist, "%s", wordFromList) != EOF){