aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_main.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-21 22:34:46 +1000
committerDavid Walter Seikel2012-01-21 22:34:46 +1000
commitf136a1af33253a4149c4a3a366845727f36d6567 (patch)
tree91632ebd52ff1525056a8820fcdb547c0c43d940 /LuaSL/src/LuaSL_main.c
parentForgot a script to rename. (diff)
downloadSledjHamr-f136a1af33253a4149c4a3a366845727f36d6567.zip
SledjHamr-f136a1af33253a4149c4a3a366845727f36d6567.tar.gz
SledjHamr-f136a1af33253a4149c4a3a366845727f36d6567.tar.bz2
SledjHamr-f136a1af33253a4149c4a3a366845727f36d6567.tar.xz
Disable some of the output, and compile every script in the test sim.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_main.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/LuaSL/src/LuaSL_main.c b/LuaSL/src/LuaSL_main.c
index e0d2629..2fb8512 100644
--- a/LuaSL/src/LuaSL_main.c
+++ b/LuaSL/src/LuaSL_main.c
@@ -66,6 +66,25 @@ _on_delete(Ecore_Evas *ee __UNUSED__)
66 ecore_main_loop_quit(); 66 ecore_main_loop_quit();
67} 67}
68 68
69void dirList_cb(const char *name, const char *path, void *data)
70{
71 gameGlobals *game = data;
72 char buf[PATH_MAX];
73 char *ext = rindex(name, '.');
74
75 if (ext)
76 {
77 if (0 == strcmp(ext, ".lsl"))
78 {
79 snprintf(buf, sizeof(buf), "%s/%s", path, name);
80 if (compileLSL(game, buf, FALSE))
81 PI("Against all odds, the compile of %s worked! lol", buf);
82 else
83 PE("The compile of %s failed!", buf);
84 }
85 }
86}
87
69int 88int
70main(int argc, char **argv) 89main(int argc, char **argv)
71{ 90{
@@ -160,14 +179,17 @@ main(int argc, char **argv)
160 ecore_evas_callback_delete_request_set(game.ee, _on_delete); 179 ecore_evas_callback_delete_request_set(game.ee, _on_delete);
161 edje_object_signal_callback_add(game.edje, "*", "game_*", _edje_signal_cb, &game); 180 edje_object_signal_callback_add(game.edje, "*", "game_*", _edje_signal_cb, &game);
162 181
163 // Setup for the compler. 182 // Setup for the compiler.
164 compilerSetup(&game); 183 compilerSetup(&game);
184
185 snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR);
186 eina_file_dir_list(buf, EINA_TRUE, dirList_cb, &game);
165// snprintf(buf, sizeof(buf), "%s/Test sim/objects/onefang's test bed/~run", PACKAGE_DATA_DIR); 187// snprintf(buf, sizeof(buf), "%s/Test sim/objects/onefang's test bed/~run", PACKAGE_DATA_DIR);
166 snprintf(buf, sizeof(buf), "%s/test2.lsl", PACKAGE_DATA_DIR); 188// snprintf(buf, sizeof(buf), "%s/test2.lsl", PACKAGE_DATA_DIR);
167 if (compileLSL(&game, buf, FALSE)) 189// if (compileLSL(&game, buf, FALSE))
168 PIm("Against all odds, the compile of %s worked! lol", buf); 190// PIm("Against all odds, the compile of %s worked! lol", buf);
169 else 191// else
170 PEm("The compile of %s failed!", buf); 192// PEm("The compile of %s failed!", buf);
171 snprintf(buf, sizeof(buf), "%s/test.lsl", PACKAGE_DATA_DIR); 193 snprintf(buf, sizeof(buf), "%s/test.lsl", PACKAGE_DATA_DIR);
172 compileLSL(&game, buf, FALSE); 194 compileLSL(&game, buf, FALSE);
173 195