1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
--- configure.ac
+++ configure.ac
@@ -111,6 +111,14 @@
AC_MSG_ERROR([SDL_image library needed for FreedroidRPG!
see http://www.libsdl.org/]))
+AC_CHECK_LIB([SDL_gfx], [rotozoomSurface],,
+ AC_MSG_ERROR([SDL_gfx library needed to run FreedroidRPG
+see http://www.ferzkopp.net/Software/SDL_gfx-2.0/]))
+
+AC_CHECK_LIB([lua], [luaL_openlibs],,
+ AC_MSG_ERROR([lua library needed to run FreedroidRPG
+see http://www.lua.org/]))
+
AC_MSG_NOTICE([[Checking for optional SDL libraries:]])
AC_CHECK_LIB([SDL_mixer], [Mix_ChannelFinished],, AC_MSG_WARN([
--------------------------------------------------
--- src/lua.c
+++ src/lua.c
@@ -37,9 +37,9 @@
#include "lvledit/lvledit_actions.h"
#include "lvledit/lvledit_map.h"
-#include "../lua/lua.h"
-#include "../lua/lauxlib.h"
-#include "../lua/lualib.h"
+#include <lua.h>
+#include <lauxlib.h>
+#include <lualib.h>
/* Our Lua state for event execution */
--- src/Makefile.am
+++ src/Makefile.am
@@ -1,9 +1,7 @@
## Process this file with automake to produce Makefile.in
-freedroidRPG_LDADD = ../lua/liblua.a
-
if WIN32
-freedroidRPG_LDADD += ../win32/freedroidRPG.coff
+freedroidRPG_LDADD = ../win32/freedroidRPG.coff
endif
bin_PROGRAMS = freedroidRPG
@@ -18,7 +16,7 @@
enemy.c input.c keyboard.c main.c hud.c view.c automap.c BFont.c \
defs.h map.h vars.h takeover.h global.h \
proto.h struct.h system.h BFont.h \
- SDL_rotozoom.c SDL_rotozoom.h open_gl.c open_gl_atlas.c mission.c chat.c light.c \
+ open_gl.c open_gl_atlas.c mission.c chat.c light.c \
getopt.c getopt1.c getopt.h scandir.c scandir.h sound.h sound_effects.c \
lang.h lists.c lists.h gen_savestruct.py savestruct.c savestruct.h pathfinder.c \
lvledit/lvledit.c lvledit/lvledit.h \
@@ -41,13 +39,4 @@
lvledit/lvledit_widgets.c lvledit/lvledit_widgets.h
savestruct.c savestruct.h: struct.h
- python2.5 gen_savestruct.py struct.h savestruct
-
-clean-local:
- cd ../lua; make clean
-
-../lua/liblua.a:
- cd ../lua; make CC=${CC} AR="${AR} rcu" liblua.a
-if WIN32
- i686-pc-mingw32-ranlib ../lua/liblua.a
-endif
+ python gen_savestruct.py struct.h savestruct
--- src/struct.h
+++ src/struct.h
@@ -30,16 +30,7 @@
#include "system.h"
#include "defs.h"
-typedef struct tColorRGBA {
- Uint8 r;
- Uint8 g;
- Uint8 b;
- Uint8 a;
-} tColorRGBA, myColor;
-
-typedef struct tColorY {
- Uint8 y;
-} tColorY;
+typedef tColorRGBA myColor;
/**
* Simple doubly linked list implementation.
--- src/system.h
+++ src/system.h
@@ -112,6 +112,7 @@
#include "SDL.h"
#include "SDL_image.h"
+#include "SDL_rotozoom.h"
#ifdef HAVE_LIBSDL_MIXER
#include "SDL_mixer.h"
|