aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL.h
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/src/LuaSL.h')
-rw-r--r--LuaSL/src/LuaSL.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL.h b/LuaSL/src/LuaSL.h
index d27f501..68deec5 100644
--- a/LuaSL/src/LuaSL.h
+++ b/LuaSL/src/LuaSL.h
@@ -14,6 +14,14 @@
14#include <stdio.h> 14#include <stdio.h>
15#include <ctype.h> 15#include <ctype.h>
16 16
17#include <lua.h>
18#include <luajit.h>
19#include <lualib.h>
20#include <lauxlib.h>
21
22#include "LuaSL_threads.h"
23
24
17#define WIDTH (1024) 25#define WIDTH (1024)
18#define HEIGHT (768) 26#define HEIGHT (768)
19 27
@@ -62,17 +70,26 @@ typedef struct
62 70
63typedef struct 71typedef struct
64{ 72{
73 Eina_Clist node;
74 gameGlobals *game;
65 char SID[PATH_MAX]; 75 char SID[PATH_MAX];
66 char fileName[PATH_MAX]; 76 char fileName[PATH_MAX];
77 lua_State *lstate;
67 struct timeval startTime; 78 struct timeval startTime;
68 float compileTime, timerTime; 79 float compileTime, timerTime;
69 int bugs, warnings; 80 int bugs, warnings;
70 boolean running; 81 boolean running;
71 gameGlobals *game;
72 Ecore_Con_Client *client; 82 Ecore_Con_Client *client;
73 Ecore_Timer *timer; 83 Ecore_Timer *timer;
74} script; 84} script;
75 85
86//struct stluaproc {
87// int stat;
88// int args;
89// channel chan;
90// void *data;
91//};
92
76typedef struct 93typedef struct
77{ 94{
78 script *script; 95 script *script;
@@ -82,6 +99,7 @@ typedef struct
82 99
83void loggingStartup(gameGlobals *game); 100void loggingStartup(gameGlobals *game);
84char *getDateTime(struct tm **nowOut, char *dateOut, time_t *tiemOut); 101char *getDateTime(struct tm **nowOut, char *dateOut, time_t *tiemOut);
102void scriptSendBack(void * data);
85void sendBack(gameGlobals *game, Ecore_Con_Client *client, const char *SID, const char *message, ...); 103void sendBack(gameGlobals *game, Ecore_Con_Client *client, const char *SID, const char *message, ...);
86void sendForth(gameGlobals *game, const char *SID, const char *message, ...); 104void sendForth(gameGlobals *game, const char *SID, const char *message, ...);
87float timeDiff(struct timeval *now, struct timeval *then); 105float timeDiff(struct timeval *now, struct timeval *then);