aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--LuaSL/src/LuaSL_main.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/LuaSL/src/LuaSL_main.c b/LuaSL/src/LuaSL_main.c
index 4bd3bc5..2f5e770 100644
--- a/LuaSL/src/LuaSL_main.c
+++ b/LuaSL/src/LuaSL_main.c
@@ -1,8 +1,11 @@
1#include "LuaSL.h" 1#include "LuaSL.h"
2 2
3#define HARNESS 0
4#define LUA_TEST 0
5
3static int scriptCount; 6static int scriptCount;
4 7
5#if 0 8#if HARNESS
6static const char *names[] = 9static const char *names[] =
7{ 10{
8 "bub1", "sh1", 11 "bub1", "sh1",
@@ -69,7 +72,7 @@ _on_delete(Ecore_Evas *ee __UNUSED__)
69} 72}
70#endif 73#endif
71 74
72void dirList_cb(const char *name, const char *path, void *data) 75static void dirList_cb(const char *name, const char *path, void *data)
73{ 76{
74 gameGlobals *game = data; 77 gameGlobals *game = data;
75 char buf[PATH_MAX]; 78 char buf[PATH_MAX];
@@ -90,7 +93,8 @@ void dirList_cb(const char *name, const char *path, void *data)
90 } 93 }
91} 94}
92 95
93void dirListLua_cb(const char *name, const char *path, void *data) 96#if LUA_TEST
97static void dirListLua_cb(const char *name, const char *path, void *data)
94{ 98{
95 char buf[PATH_MAX]; 99 char buf[PATH_MAX];
96 char *ext = rindex(name, '.'); 100 char *ext = rindex(name, '.');
@@ -105,6 +109,7 @@ void dirListLua_cb(const char *name, const char *path, void *data)
105 } 109 }
106 } 110 }
107} 111}
112#endif
108 113
109int 114int
110main(int argc, char **argv) 115main(int argc, char **argv)
@@ -128,11 +133,14 @@ main(int argc, char **argv)
128// else if ((game.config) && (game.data)) 133// else if ((game.config) && (game.data))
129 { 134 {
130 char buf[PATH_MAX]; 135 char buf[PATH_MAX];
131 unsigned int lslCount;
132 struct timeval lastTime2; 136 struct timeval lastTime2;
133 struct timeval thisTime2; 137 struct timeval thisTime2;
134 float diff0, diff; 138 float diff;
135#if 0 139#if LUA_TEST
140 unsigned int lslCount;
141 float diff0;
142#endif
143#if HARNESS
136 unsigned int i; 144 unsigned int i;
137 char *group = "main"; 145 char *group = "main";
138 Evas_Object *bub, *sh; 146 Evas_Object *bub, *sh;
@@ -214,6 +222,7 @@ main(int argc, char **argv)
214 diff = timeDiff(&thisTime2, &lastTime2); 222 diff = timeDiff(&thisTime2, &lastTime2);
215 printf("Compiling %d LSL scripts took %f seconds, that's %f scripts per second.\n", scriptCount, diff, scriptCount / diff); 223 printf("Compiling %d LSL scripts took %f seconds, that's %f scripts per second.\n", scriptCount, diff, scriptCount / diff);
216 224
225#if LUA_TEST
217 lslCount = scriptCount; 226 lslCount = scriptCount;
218 diff0 = diff; 227 diff0 = diff;
219 scriptCount = 0; 228 scriptCount = 0;
@@ -224,10 +233,11 @@ main(int argc, char **argv)
224 printf("Compiling %d Lua scripts took %f seconds, that's %f scripts per second.\n\n", scriptCount, diff, scriptCount / diff); 233 printf("Compiling %d Lua scripts took %f seconds, that's %f scripts per second.\n\n", scriptCount, diff, scriptCount / diff);
225 234
226 printf("Combined estimate of compiling speed is %f scripts per second.\n", 1 / ((diff0 / lslCount) + (diff / scriptCount))); 235 printf("Combined estimate of compiling speed is %f scripts per second.\n", 1 / ((diff0 / lslCount) + (diff / scriptCount)));
236#endif
227 237
228// ecore_main_loop_begin(); 238// ecore_main_loop_begin();
229 239
230#if 0 240#if HARNESS
231 ecore_animator_del(ani); 241 ecore_animator_del(ani);
232 ecore_evas_free(game.ee); 242 ecore_evas_free(game.ee);
233#endif 243#endif