[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/editor ccl_editor.c editloop.c
From: |
Jimmy Salmon |
Subject: |
[Stratagus-CVS] stratagus/src/editor ccl_editor.c editloop.c |
Date: |
Wed, 12 Nov 2003 15:41:43 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Jimmy Salmon <address@hidden> 03/11/12 15:41:43
Modified files:
src/editor : ccl_editor.c editloop.c
Log message:
Started lua support
Patches:
Index: stratagus/src/editor/ccl_editor.c
diff -u stratagus/src/editor/ccl_editor.c:1.10
stratagus/src/editor/ccl_editor.c:1.11
--- stratagus/src/editor/ccl_editor.c:1.10 Fri Oct 3 00:08:16 2003
+++ stratagus/src/editor/ccl_editor.c Wed Nov 12 15:41:42 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_editor.c,v 1.10 2003/10/03 04:08:16 jsalmon3 Exp $
+// $Id: ccl_editor.c,v 1.11 2003/11/12 20:41:42 jsalmon3 Exp $
//@{
@@ -61,6 +61,7 @@
**
** @param list List of all names.
*/
+#if defined(USE_GUILE) || defined(USE_SIOD)
local SCM CclDefineEditorUnitTypes(SCM list)
{
int i;
@@ -87,38 +88,48 @@
return SCM_UNSPECIFIED;
}
+#elif defined(USE_LUA)
+#endif
/**
** Set the editor's select icon
*/
+#if defined(USE_GUILE) || defined(USE_SIOD)
local SCM CclSetEditorSelectIcon(SCM icon)
{
free(EditorSelectIcon);
EditorSelectIcon = gh_scm2newstr(icon, NULL);
return SCM_UNSPECIFIED;
}
+#elif defined(USE_LUA)
+#endif
/**
** Set the editor's units icon
*/
+#if defined(USE_GUILE) || defined(USE_SIOD)
local SCM CclSetEditorUnitsIcon(SCM icon)
{
free(EditorUnitsIcon);
EditorUnitsIcon = gh_scm2newstr(icon, NULL);
return SCM_UNSPECIFIED;
}
+#elif defined(USE_LUA)
+#endif
/**
** Register CCL features for the editor.
*/
global void EditorCclRegister(void)
{
+#if defined(USE_GUILE) || defined(USE_SIOD)
//gh_new_procedureN("player", CclPlayer);
//gh_new_procedure0_0("get-this-player", CclGetThisPlayer);
//gh_new_procedure1_0("set-this-player!", CclSetThisPlayer);
gh_new_procedureN("define-editor-unittypes", CclDefineEditorUnitTypes);
gh_new_procedure1_0("set-editor-select-icon!", CclSetEditorSelectIcon);
gh_new_procedure1_0("set-editor-units-icon!", CclSetEditorUnitsIcon);
+#endif
}
//@}
Index: stratagus/src/editor/editloop.c
diff -u stratagus/src/editor/editloop.c:1.140
stratagus/src/editor/editloop.c:1.141
--- stratagus/src/editor/editloop.c:1.140 Mon Nov 3 06:21:39 2003
+++ stratagus/src/editor/editloop.c Wed Nov 12 15:41:43 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: editloop.c,v 1.140 2003/11/03 11:21:39 pludov Exp $
+// $Id: editloop.c,v 1.141 2003/11/12 20:41:43 jsalmon3 Exp $
//@{
@@ -1796,7 +1796,9 @@
int i;
int n;
char* file;
+#if defined(USE_GUILE) || defined(USE_SIOD)
char* s;
+#endif
char buf[PATH_MAX];
CLFile* clf;
int scm;
@@ -1810,12 +1812,19 @@
if ((clf = CLopen(file, CL_OPEN_READ))) {
CLclose(clf);
ShowLoadProgress("Script %s", file);
+#if defined(USE_GUILE) || defined(USE_SIOD)
if ((s = strrchr(file, '.')) && s[1] == 'C') {
fast_load(gh_str02scm(file), NIL);
} else {
+#if defined(USE_GUILE) || defined(USE_SIOD)
vload(file, 0, 1);
+#elif defined(USE_LUA)
+ LuaLoadFile(file);
+#endif
}
CclGarbageCollect(0); // Cleanup memory after load
+#elif defined(USE_LUA)
+#endif
}
ThisPlayer = &Players[0];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/editor ccl_editor.c editloop.c,
Jimmy Salmon <=