diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GuiLua/GuiLua.c | 2 | ||||
-rw-r--r-- | src/GuiLua/GuiLua.h | 1 | ||||
-rwxr-xr-x | src/GuiLua/build.lua | 4 | ||||
-rw-r--r-- | src/GuiLua/skang.c | 1 | ||||
-rw-r--r-- | src/GuiLua/test_c.c | 1 | ||||
-rw-r--r-- | src/LuaSL/LuaSL.h | 9 | ||||
-rw-r--r-- | src/LuaSL/LuaSL_compile.c | 1 | ||||
-rw-r--r-- | src/extantz/Evas_3D_demo.c | 1 | ||||
-rwxr-xr-x | src/extantz/build.lua | 4 | ||||
-rw-r--r-- | src/extantz/camera.c | 1 | ||||
-rw-r--r-- | src/extantz/ephysics_demo.c | 1 | ||||
-rw-r--r-- | src/extantz/extantzCamera.cpp | 3 | ||||
-rw-r--r-- | src/extantz/extantzCamera.h | 2 | ||||
-rw-r--r-- | src/extantz/scenri.c | 1 | ||||
-rw-r--r-- | src/extantz/scenri.h | 22 | ||||
-rw-r--r-- | src/libraries/LumbrJack.c | 2 | ||||
-rw-r--r-- | src/libraries/evas_3d_utils.h (renamed from src/extantz/evas_3d_utils.h) | 0 | ||||
-rw-r--r-- | src/libraries/evas_macros.h | 217 | ||||
-rw-r--r-- | src/libraries/love.h (renamed from src/love/love.h) | 36 | ||||
-rw-r--r-- | src/libraries/winFang.h | 3 | ||||
-rw-r--r-- | src/love/love.c | 7 | ||||
-rwxr-xr-x | src/purkle/build.lua | 2 | ||||
-rw-r--r-- | src/purkle/purkle.c | 2 |
23 files changed, 263 insertions, 60 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index 1ffbc0f..3ef6007 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c | |||
@@ -142,8 +142,8 @@ and ordinary elementary widgets. Proper introspection can come later. | |||
142 | */ | 142 | */ |
143 | 143 | ||
144 | 144 | ||
145 | #include "LumbrJack.h" | ||
145 | #include "GuiLua.h" | 146 | #include "GuiLua.h" |
146 | #include "Runnr.h" | ||
147 | 147 | ||
148 | 148 | ||
149 | const char *glName = "ourGuiLua"; | 149 | const char *glName = "ourGuiLua"; |
diff --git a/src/GuiLua/GuiLua.h b/src/GuiLua/GuiLua.h index 216ce8a..d82d244 100644 --- a/src/GuiLua/GuiLua.h +++ b/src/GuiLua/GuiLua.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _GUILUA_H_ | 2 | #define _GUILUA_H_ |
3 | 3 | ||
4 | 4 | ||
5 | #include "LumbrJack.h" | ||
6 | #include "Runnr.h" | 5 | #include "Runnr.h" |
7 | #include "winFang.h" | 6 | #include "winFang.h" |
8 | 7 | ||
diff --git a/src/GuiLua/build.lua b/src/GuiLua/build.lua index 08446f0..7254eb1 100755 --- a/src/GuiLua/build.lua +++ b/src/GuiLua/build.lua | |||
@@ -17,7 +17,7 @@ LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | |||
17 | 17 | ||
18 | removeFiles(dir, {'test_c.so', 'GuiLua.o', lib_d .. '/libGuiLua.so', '../../skang'}) | 18 | removeFiles(dir, {'test_c.so', 'GuiLua.o', lib_d .. '/libGuiLua.so', '../../skang'}) |
19 | 19 | ||
20 | runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c') | ||
21 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c') | 20 | runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c') |
22 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o ' .. lib_d .. '/libGuiLua.so GuiLua.o') | 21 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o ' .. lib_d .. '/libGuiLua.so GuiLua.o') |
23 | runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o ../../skang skang.c ' .. LDFLAGS .. ' -lGuiLua -lwinFang ' .. libs) | 22 | runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o ../../skang skang.c ' .. LDFLAGS .. ' -lGuiLua ' .. libs) |
23 | runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c') | ||
diff --git a/src/GuiLua/skang.c b/src/GuiLua/skang.c index 3aee0e2..f40b136 100644 --- a/src/GuiLua/skang.c +++ b/src/GuiLua/skang.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include "LumbrJack.h" | ||
1 | #include "GuiLua.h" | 2 | #include "GuiLua.h" |
2 | 3 | ||
3 | 4 | ||
diff --git a/src/GuiLua/test_c.c b/src/GuiLua/test_c.c index f964d65..1cc5c08 100644 --- a/src/GuiLua/test_c.c +++ b/src/GuiLua/test_c.c | |||
@@ -11,7 +11,6 @@ http://lua-users.org/lists/lua-l/2008-01/msg00671.html | |||
11 | 11 | ||
12 | 12 | ||
13 | #include "LumbrJack.h" | 13 | #include "LumbrJack.h" |
14 | #include "Runnr.h" | ||
15 | #include "GuiLua.h" | 14 | #include "GuiLua.h" |
16 | 15 | ||
17 | 16 | ||
diff --git a/src/LuaSL/LuaSL.h b/src/LuaSL/LuaSL.h index cfee0aa..54e7fa7 100644 --- a/src/LuaSL/LuaSL.h +++ b/src/LuaSL/LuaSL.h | |||
@@ -5,16 +5,7 @@ | |||
5 | #endif | 5 | #endif |
6 | 6 | ||
7 | #include <Eet.h> | 7 | #include <Eet.h> |
8 | #include <Ecore.h> | ||
9 | #include <Ecore_Con.h> | ||
10 | #include <Ecore_File.h> | 8 | #include <Ecore_File.h> |
11 | #include <stdio.h> | ||
12 | #include <ctype.h> | ||
13 | |||
14 | #include <lua.h> | ||
15 | #include <luajit.h> | ||
16 | #include <lualib.h> | ||
17 | #include <lauxlib.h> | ||
18 | 9 | ||
19 | typedef struct _gameGlobals gameGlobals; // Define this here, so LuaSL_threads.h can use it. | 10 | typedef struct _gameGlobals gameGlobals; // Define this here, so LuaSL_threads.h can use it. |
20 | 11 | ||
diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c index 61fce8f..5adeabe 100644 --- a/src/LuaSL/LuaSL_compile.c +++ b/src/LuaSL/LuaSL_compile.c | |||
@@ -1,6 +1,5 @@ | |||
1 | 1 | ||
2 | #include "LuaSL.h" | 2 | #include "LuaSL.h" |
3 | #include "Runnr.h" | ||
4 | #include "SledjHamr.h" | 3 | #include "SledjHamr.h" |
5 | 4 | ||
6 | /* TODO - problem de jour | 5 | /* TODO - problem de jour |
diff --git a/src/extantz/Evas_3D_demo.c b/src/extantz/Evas_3D_demo.c index 6cb673b..371bba7 100644 --- a/src/extantz/Evas_3D_demo.c +++ b/src/extantz/Evas_3D_demo.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include "extantz.h" | 1 | #include "extantz.h" |
2 | #include "scenri.h" | ||
3 | 2 | ||
4 | 3 | ||
5 | static const float cube_vertices[] = | 4 | static const float cube_vertices[] = |
diff --git a/src/extantz/build.lua b/src/extantz/build.lua index 618de3f..90caca5 100755 --- a/src/extantz/build.lua +++ b/src/extantz/build.lua | |||
@@ -13,9 +13,9 @@ if 'nil' == type(dir) then | |||
13 | dir = workingDir | 13 | dir = workingDir |
14 | end | 14 | end |
15 | 15 | ||
16 | CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include -I../GuiLua -I../love' | 16 | CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include -I../GuiLua' |
17 | LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' | 17 | LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' |
18 | libs = libs .. ' -lIrrlicht -lephysics -lGL -lbz2 -lGuiLua -lwinFang -lRunnr' | 18 | libs = libs .. ' -lIrrlicht -lephysics -lGL -lbz2 -lGuiLua' |
19 | 19 | ||
20 | removeFiles(dir, {'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', 'gears.o', 'ephysics_demo.o', 'Evas_3D_demo.o', '../../media/extantz.edj'}) | 20 | removeFiles(dir, {'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', 'gears.o', 'ephysics_demo.o', 'Evas_3D_demo.o', '../../media/extantz.edj'}) |
21 | removeFiles(dir, {'../../extantz', 'camera.o', 'files.o', 'scenri.o', 'woMan.o'}) | 21 | removeFiles(dir, {'../../extantz', 'camera.o', 'files.o', 'scenri.o', 'woMan.o'}) |
diff --git a/src/extantz/camera.c b/src/extantz/camera.c index b7a79d1..c94b780 100644 --- a/src/extantz/camera.c +++ b/src/extantz/camera.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include "extantz.h" | 1 | #include "extantz.h" |
2 | 2 | ||
3 | #include "evas_3d_utils.h" | ||
4 | 3 | ||
5 | static inline void evas_euler_to_quaternion(Evas_Vec4 *out, Evas_Vec3 *in) | 4 | static inline void evas_euler_to_quaternion(Evas_Vec4 *out, Evas_Vec3 *in) |
6 | { | 5 | { |
diff --git a/src/extantz/ephysics_demo.c b/src/extantz/ephysics_demo.c index 89dda99..a86cad2 100644 --- a/src/extantz/ephysics_demo.c +++ b/src/extantz/ephysics_demo.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include "extantz.h" | 1 | #include "extantz.h" |
2 | #include <EPhysics.h> | ||
3 | 2 | ||
4 | 3 | ||
5 | #define EPHYSICS_TEST_THEME "extantz" | 4 | #define EPHYSICS_TEST_THEME "extantz" |
diff --git a/src/extantz/extantzCamera.cpp b/src/extantz/extantzCamera.cpp index 4d13054..a3145ae 100644 --- a/src/extantz/extantzCamera.cpp +++ b/src/extantz/extantzCamera.cpp | |||
@@ -12,6 +12,9 @@ | |||
12 | // Initally I'll make it SecondLife like, coz that's what my muscle memory is used to. | 12 | // Initally I'll make it SecondLife like, coz that's what my muscle memory is used to. |
13 | // It will get extended and made generic though. | 13 | // It will get extended and made generic though. |
14 | 14 | ||
15 | #include <irrlicht.h> | ||
16 | #include "extantz.h" | ||
17 | |||
15 | #include "extantzCamera.h" | 18 | #include "extantzCamera.h" |
16 | #include "IVideoDriver.h" | 19 | #include "IVideoDriver.h" |
17 | #include "ISceneManager.h" | 20 | #include "ISceneManager.h" |
diff --git a/src/extantz/extantzCamera.h b/src/extantz/extantzCamera.h index 6e9067f..5c98619 100644 --- a/src/extantz/extantzCamera.h +++ b/src/extantz/extantzCamera.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifndef __EXTANTZ_CAMERA_H_INCLUDED__ | 5 | #ifndef __EXTANTZ_CAMERA_H_INCLUDED__ |
6 | #define __EXTANTZ_CAMERA_H_INCLUDED__ | 6 | #define __EXTANTZ_CAMERA_H_INCLUDED__ |
7 | 7 | ||
8 | |||
9 | #ifdef __cplusplus | 8 | #ifdef __cplusplus |
10 | #include <ISceneNodeAnimator.h> | 9 | #include <ISceneNodeAnimator.h> |
11 | #include <vector2d.h> | 10 | #include <vector2d.h> |
@@ -13,7 +12,6 @@ | |||
13 | #include <SKeyMap.h> | 12 | #include <SKeyMap.h> |
14 | #include <irrArray.h> | 13 | #include <irrArray.h> |
15 | #include <ICameraSceneNode.h> | 14 | #include <ICameraSceneNode.h> |
16 | #include "scenri.h" | ||
17 | 15 | ||
18 | using namespace irr; | 16 | using namespace irr; |
19 | using namespace scene; | 17 | using namespace scene; |
diff --git a/src/extantz/scenri.c b/src/extantz/scenri.c index 0210a48..7395582 100644 --- a/src/extantz/scenri.c +++ b/src/extantz/scenri.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include "extantz.h" | 1 | #include "extantz.h" |
2 | #include "scenri.h" | ||
3 | 2 | ||
4 | static void _on_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void *einfo) | 3 | static void _on_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void *einfo) |
5 | { | 4 | { |
diff --git a/src/extantz/scenri.h b/src/extantz/scenri.h index 93b3f16..310b615 100644 --- a/src/extantz/scenri.h +++ b/src/extantz/scenri.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include "love.h" | 4 | #include "love.h" |
5 | 5 | ||
6 | |||
6 | typedef struct _cameraMove | 7 | typedef struct _cameraMove |
7 | { | 8 | { |
8 | float x, y, z; | 9 | float x, y, z; |
@@ -11,27 +12,6 @@ typedef struct _cameraMove | |||
11 | float JumpSpeed, RotateSpeed, MoveSpeed; | 12 | float JumpSpeed, RotateSpeed, MoveSpeed; |
12 | } cameraMove; | 13 | } cameraMove; |
13 | 14 | ||
14 | typedef struct _vec4 | ||
15 | { | ||
16 | float x; | ||
17 | float y; | ||
18 | float z; | ||
19 | float w; | ||
20 | } vec4; | ||
21 | |||
22 | typedef struct _vec3 | ||
23 | { | ||
24 | float x; | ||
25 | float y; | ||
26 | float z; | ||
27 | } vec3; | ||
28 | |||
29 | typedef struct _vec2 | ||
30 | { | ||
31 | float x; | ||
32 | float y; | ||
33 | } vec2; | ||
34 | |||
35 | typedef struct _vertex | 15 | typedef struct _vertex |
36 | { | 16 | { |
37 | vec3 position; | 17 | vec3 position; |
diff --git a/src/libraries/LumbrJack.c b/src/libraries/LumbrJack.c index 27ca524..9b072b0 100644 --- a/src/libraries/LumbrJack.c +++ b/src/libraries/LumbrJack.c | |||
@@ -3,8 +3,8 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | 5 | ||
6 | #include "LumbrJack.h" | ||
7 | #include <unistd.h> | 6 | #include <unistd.h> |
7 | #include "LumbrJack.h" | ||
8 | 8 | ||
9 | 9 | ||
10 | static char dateTime[DATE_TIME_LEN]; | 10 | static char dateTime[DATE_TIME_LEN]; |
diff --git a/src/extantz/evas_3d_utils.h b/src/libraries/evas_3d_utils.h index 8adc322..8adc322 100644 --- a/src/extantz/evas_3d_utils.h +++ b/src/libraries/evas_3d_utils.h | |||
diff --git a/src/libraries/evas_macros.h b/src/libraries/evas_macros.h new file mode 100644 index 0000000..ed29dbd --- /dev/null +++ b/src/libraries/evas_macros.h | |||
@@ -0,0 +1,217 @@ | |||
1 | #ifndef EVAS_MACROS_H | ||
2 | #define EVAS_MACROS_H | ||
3 | |||
4 | #undef ABS | ||
5 | #define ABS(x) (((x) < 0) ? -(x) : (x)) | ||
6 | |||
7 | #undef SGN | ||
8 | #define SGN(x) (((x) < 0) ? -1 : 1) | ||
9 | |||
10 | #undef MIN | ||
11 | #define MIN(x, y) (((x) < (y)) ? (x) : (y)) | ||
12 | |||
13 | #undef MAX | ||
14 | #define MAX(x, y) (((x) > (y)) ? (x) : (y)) | ||
15 | |||
16 | #define SWAP32(x) (x) = \ | ||
17 | ((((x) & 0x000000ff ) << 24) | \ | ||
18 | (((x) & 0x0000ff00 ) << 8) | \ | ||
19 | (((x) & 0x00ff0000 ) >> 8) | \ | ||
20 | (((x) & 0xff000000 ) >> 24)) | ||
21 | |||
22 | #define SWAP16(x) (x) = \ | ||
23 | ((((x) & 0x00ff ) << 8) | \ | ||
24 | (((x) & 0xff00 ) >> 8)) | ||
25 | |||
26 | #define SPANS_COMMON(x1, w1, x2, w2) \ | ||
27 | (!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1))))) | ||
28 | |||
29 | #define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \ | ||
30 | ((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh)))) | ||
31 | |||
32 | #define RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \ | ||
33 | { \ | ||
34 | if (RECTS_INTERSECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \ | ||
35 | { \ | ||
36 | if ((int)_x < (int)(_cx)) \ | ||
37 | { \ | ||
38 | if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \ | ||
39 | else _w += ((int)_x - (int)(_cx)); \ | ||
40 | _x = (_cx); \ | ||
41 | } \ | ||
42 | if ((int)(_x + _w) > (int)((_cx) + (_cw))) \ | ||
43 | _w = (_cx) + (_cw) - _x; \ | ||
44 | if ((int)_y < (int)(_cy)) \ | ||
45 | { \ | ||
46 | if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \ | ||
47 | else _h += ((int)_y - (int)(_cy)); \ | ||
48 | _y = (_cy); \ | ||
49 | } \ | ||
50 | if ((int)(_y + _h) > (int)((_cy) + (_ch))) \ | ||
51 | _h = (_cy) + (_ch) - _y; \ | ||
52 | } \ | ||
53 | else \ | ||
54 | { \ | ||
55 | _w = 0; _h = 0; \ | ||
56 | } \ | ||
57 | } | ||
58 | |||
59 | |||
60 | #define INTERP_VAL(out, in1, in2, in3, in4, interp_x, interp_y) \ | ||
61 | { \ | ||
62 | int _v, _vv; \ | ||
63 | \ | ||
64 | _v = (256 - (interp_x)) * (in1); \ | ||
65 | if ((interp_x) > 0) _v += (interp_x) * (in2); \ | ||
66 | _v *= (256 - (interp_y)); \ | ||
67 | if ((interp_y) > 0) \ | ||
68 | { \ | ||
69 | _vv = (256 - (interp_x)) * (in3); \ | ||
70 | if ((interp_x) > 0) _vv += (interp_x) * (in4); \ | ||
71 | _vv *= (interp_y); \ | ||
72 | (out) = ((_v + _vv) >> 16); \ | ||
73 | } \ | ||
74 | else (out) = (_v >> 16); \ | ||
75 | } | ||
76 | |||
77 | #define INTERP_2(in1, in2, interp, interp_inv) \ | ||
78 | ((in1 * interp_inv) + (in2 * interp)) >> 8 | ||
79 | |||
80 | |||
81 | #define CONVERT_LOOP_START_ROT_0() \ | ||
82 | src_ptr = src; \ | ||
83 | for (y = 0; y < h; y++) \ | ||
84 | { \ | ||
85 | for (x = 0; x < w; x++) \ | ||
86 | { | ||
87 | |||
88 | #define CONVERT_LOOP_END_ROT_0() \ | ||
89 | dst_ptr++; \ | ||
90 | src_ptr++; \ | ||
91 | } \ | ||
92 | src_ptr += src_jump; \ | ||
93 | dst_ptr += dst_jump; \ | ||
94 | } | ||
95 | |||
96 | #define CONVERT_LOOP_START_ROT_180() \ | ||
97 | src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ | ||
98 | for (y = 0; y < h; y++) \ | ||
99 | { \ | ||
100 | for (x = 0; x < w; x++) \ | ||
101 | { | ||
102 | |||
103 | #define CONVERT_LOOP_END_ROT_180() \ | ||
104 | dst_ptr++; \ | ||
105 | src_ptr--; \ | ||
106 | } \ | ||
107 | src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ | ||
108 | dst_ptr += dst_jump; \ | ||
109 | } | ||
110 | |||
111 | #define CONVERT_LOOP_START_ROT_270() \ | ||
112 | src_ptr = src + ((w - 1) * (h + src_jump)); \ | ||
113 | for (y = 0; y < h; y++) \ | ||
114 | { \ | ||
115 | for (x = 0; x < w; x++) \ | ||
116 | { | ||
117 | |||
118 | #define CONVERT_LOOP_END_ROT_270() \ | ||
119 | dst_ptr++; \ | ||
120 | src_ptr -= (h + src_jump); \ | ||
121 | } \ | ||
122 | src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ | ||
123 | dst_ptr += dst_jump; \ | ||
124 | } | ||
125 | |||
126 | #define CONVERT_LOOP_START_ROT_90() \ | ||
127 | src_ptr = src + (h - 1); \ | ||
128 | for (y = 0; y < h; y++) \ | ||
129 | { \ | ||
130 | for (x = 0; x < w; x++) \ | ||
131 | { | ||
132 | |||
133 | #define CONVERT_LOOP_END_ROT_90() \ | ||
134 | dst_ptr++; \ | ||
135 | src_ptr += (h + src_jump); \ | ||
136 | } \ | ||
137 | src_ptr = src + (h - 1) - y - 1; \ | ||
138 | dst_ptr += dst_jump; \ | ||
139 | } | ||
140 | |||
141 | #define CONVERT_LOOP2_START_ROT_0() \ | ||
142 | src_ptr = src; \ | ||
143 | for (y = 0; y < h; y++) \ | ||
144 | { \ | ||
145 | for (x = 0; x < w; x++) \ | ||
146 | { | ||
147 | |||
148 | #define CONVERT_LOOP2_INC_ROT_0() \ | ||
149 | src_ptr++; \ | ||
150 | x++; | ||
151 | |||
152 | #define CONVERT_LOOP2_END_ROT_0() \ | ||
153 | dst_ptr+=2; \ | ||
154 | src_ptr++; \ | ||
155 | } \ | ||
156 | src_ptr += src_jump; \ | ||
157 | dst_ptr += dst_jump; \ | ||
158 | } | ||
159 | |||
160 | #define CONVERT_LOOP2_START_ROT_180() \ | ||
161 | src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ | ||
162 | for (y = 0; y < h; y++) \ | ||
163 | { \ | ||
164 | for (x = 0; x < w; x++) \ | ||
165 | { | ||
166 | |||
167 | #define CONVERT_LOOP2_INC_ROT_180() \ | ||
168 | src_ptr--; \ | ||
169 | x++; | ||
170 | |||
171 | #define CONVERT_LOOP2_END_ROT_180() \ | ||
172 | dst_ptr+=2; \ | ||
173 | src_ptr--; \ | ||
174 | } \ | ||
175 | src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ | ||
176 | dst_ptr += dst_jump; \ | ||
177 | } | ||
178 | |||
179 | #define CONVERT_LOOP2_START_ROT_270() \ | ||
180 | src_ptr = src + ((w - 1) * (h + src_jump)); \ | ||
181 | for (y = 0; y < h; y++) \ | ||
182 | { \ | ||
183 | for (x = 0; x < w; x++) \ | ||
184 | { | ||
185 | |||
186 | #define CONVERT_LOOP2_INC_ROT_270() \ | ||
187 | src_ptr -= (h + src_jump); \ | ||
188 | x++; | ||
189 | |||
190 | #define CONVERT_LOOP2_END_ROT_270() \ | ||
191 | dst_ptr+=2; \ | ||
192 | src_ptr -= (h + src_jump); \ | ||
193 | } \ | ||
194 | src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ | ||
195 | dst_ptr += dst_jump; \ | ||
196 | } | ||
197 | |||
198 | #define CONVERT_LOOP2_START_ROT_90() \ | ||
199 | src_ptr = src + (h - 1); \ | ||
200 | for (y = 0; y < h; y++) \ | ||
201 | { \ | ||
202 | for (x = 0; x < w; x++) \ | ||
203 | { | ||
204 | |||
205 | #define CONVERT_LOOP2_INC_ROT_90() \ | ||
206 | src_ptr += (h + src_jump); \ | ||
207 | x++; | ||
208 | |||
209 | #define CONVERT_LOOP2_END_ROT_90() \ | ||
210 | dst_ptr+=2; \ | ||
211 | src_ptr += (h + src_jump); \ | ||
212 | } \ | ||
213 | src_ptr = src + (h - 1) - y - 1; \ | ||
214 | dst_ptr += dst_jump; \ | ||
215 | } | ||
216 | |||
217 | #endif | ||
diff --git a/src/love/love.h b/src/libraries/love.h index 925ad0e..5964cde 100644 --- a/src/love/love.h +++ b/src/libraries/love.h | |||
@@ -78,7 +78,33 @@ love needs | |||
78 | calling card | 78 | calling card |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #include <Eina.h> | 81 | #include "evas_macros.h" |
82 | #include "evas_3d_utils.h" // TODO - Hopefully I can convince the authors to make this public. | ||
83 | |||
84 | #include "Runnr.h" | ||
85 | |||
86 | |||
87 | typedef struct _vec4 | ||
88 | { | ||
89 | float x; | ||
90 | float y; | ||
91 | float z; | ||
92 | float w; | ||
93 | } vec4; | ||
94 | |||
95 | typedef struct _vec3 | ||
96 | { | ||
97 | float x; | ||
98 | float y; | ||
99 | float z; | ||
100 | } vec3; | ||
101 | |||
102 | typedef struct _vec2 | ||
103 | { | ||
104 | float x; | ||
105 | float y; | ||
106 | } vec2; | ||
107 | |||
82 | 108 | ||
83 | typedef struct _material | 109 | typedef struct _material |
84 | { | 110 | { |
@@ -94,8 +120,8 @@ typedef struct _mesh | |||
94 | { | 120 | { |
95 | char fileName[PATH_MAX]; | 121 | char fileName[PATH_MAX]; |
96 | //type | 122 | //type |
97 | // Evas_Vec3 pos; | 123 | vec3 pos; |
98 | // Evas_Vec4 rot; | 124 | vec4 rot; |
99 | Eina_Inarray materials; // Material | 125 | Eina_Inarray materials; // Material |
100 | Eina_Inarray parts; // Mesh | 126 | Eina_Inarray parts; // Mesh |
101 | } Mesh; | 127 | } Mesh; |
@@ -107,7 +133,7 @@ typedef struct _stuffs | |||
107 | union | 133 | union |
108 | { | 134 | { |
109 | Mesh *mesh; | 135 | Mesh *mesh; |
110 | // script *script; | 136 | script *scrip; // Not a typo, C++ is fussy about reusing names like this. |
111 | void *other; | 137 | void *other; |
112 | } details; | 138 | } details; |
113 | } Stuffs; | 139 | } Stuffs; |
@@ -123,7 +149,7 @@ typedef struct _extantzStuffs | |||
123 | { | 149 | { |
124 | Stuffs stuffs; | 150 | Stuffs stuffs; |
125 | // Evas_3D_Mesh *mesh; | 151 | // Evas_3D_Mesh *mesh; |
126 | // Evas_3D_Node *mesh_node; | 152 | // Evas_3D_Node *mesh_node; // Multiple Evas_3D_Mesh's can be in one Evas_3D_Node |
127 | Eina_Inarray *materials; // Evas_3D_Material | 153 | Eina_Inarray *materials; // Evas_3D_Material |
128 | Eina_Inarray *textures; // Evas_3D_Texture | 154 | Eina_Inarray *textures; // Evas_3D_Texture |
129 | } ExtantzStuffs; | 155 | } ExtantzStuffs; |
diff --git a/src/libraries/winFang.h b/src/libraries/winFang.h index 7a84a7e..f2aebfd 100644 --- a/src/libraries/winFang.h +++ b/src/libraries/winFang.h | |||
@@ -2,9 +2,6 @@ | |||
2 | #define _WINFANG_H_ | 2 | #define _WINFANG_H_ |
3 | 3 | ||
4 | 4 | ||
5 | #include <Eo.h> | ||
6 | #include <Eina.h> | ||
7 | #include <Evas.h> | ||
8 | #include <Elementary.h> | 5 | #include <Elementary.h> |
9 | #include <EPhysics.h> | 6 | #include <EPhysics.h> |
10 | 7 | ||
diff --git a/src/love/love.c b/src/love/love.c index c727207..1a38e2b 100644 --- a/src/love/love.c +++ b/src/love/love.c | |||
@@ -4,9 +4,8 @@ Dedicated to my girl Boots, coz she means the world to me. | |||
4 | 4 | ||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <Eet.h> | 7 | #include "LumbrJack.h" // Have to include this first, to turn on the Eo and beta API stuff. |
8 | #include <Ecore.h> | 8 | |
9 | #include <Ecore_Con.h> | ||
10 | #include <Ecore_Evas.h> | 9 | #include <Ecore_Evas.h> |
11 | #include <Ecore_File.h> | 10 | #include <Ecore_File.h> |
12 | #include <Edje.h> | 11 | #include <Edje.h> |
@@ -16,8 +15,6 @@ Dedicated to my girl Boots, coz she means the world to me. | |||
16 | #include <sys/stat.h> | 15 | #include <sys/stat.h> |
17 | #include <fcntl.h> | 16 | #include <fcntl.h> |
18 | 17 | ||
19 | #include "LumbrJack.h" | ||
20 | #include "Runnr.h" | ||
21 | #include "SledjHamr.h" | 18 | #include "SledjHamr.h" |
22 | #include "love.h" | 19 | #include "love.h" |
23 | 20 | ||
diff --git a/src/purkle/build.lua b/src/purkle/build.lua index 32ff522..baa70ae 100755 --- a/src/purkle/build.lua +++ b/src/purkle/build.lua | |||
@@ -15,7 +15,7 @@ end | |||
15 | 15 | ||
16 | CFLAGS = CFLAGS .. ' -I../GuiLua' | 16 | CFLAGS = CFLAGS .. ' -I../GuiLua' |
17 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | 17 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS |
18 | libs = libs .. ' -lGuiLua -lwinFang -lRunnr' | 18 | libs = libs .. ' -lGuiLua' |
19 | 19 | ||
20 | removeFiles(dir, {lib_d .. '/purkle.so'}) | 20 | removeFiles(dir, {lib_d .. '/purkle.so'}) |
21 | 21 | ||
diff --git a/src/purkle/purkle.c b/src/purkle/purkle.c index ec8997b..0dba5cb 100644 --- a/src/purkle/purkle.c +++ b/src/purkle/purkle.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "LumbrJack.h" | ||
1 | #include "GuiLua.h" | 2 | #include "GuiLua.h" |
2 | #include "Runnr.h" | ||
3 | #include "SledjHamr.h" | 3 | #include "SledjHamr.h" |
4 | 4 | ||
5 | 5 | ||