summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dalos/Console.cc4
-rw-r--r--Dalos/Console.h4
-rw-r--r--cd-tool.cpp19
-rw-r--r--compile/linux/Makefile4
-rw-r--r--lib/luacd.cpp100
-rw-r--r--lib/luapsx.cpp8
6 files changed, 71 insertions, 68 deletions
diff --git a/Dalos/Console.cc b/Dalos/Console.cc
index 8b66764..ffd68f4 100644
--- a/Dalos/Console.cc
+++ b/Dalos/Console.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Console.cc,v 1.9 2006-10-28 16:50:34 pixel Exp $ */
+/* $Id: Console.cc,v 1.10 2007-07-27 14:29:23 pixel Exp $ */
#include <SDL.h>
#include <SDL_thread.h>
@@ -31,7 +31,7 @@
#include <glshape.h>
-#include <Font.h>
+#include <font.h>
#include <Console.h>
diff --git a/Dalos/Console.h b/Dalos/Console.h
index 16b1029..251138b 100644
--- a/Dalos/Console.h
+++ b/Dalos/Console.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Console.h,v 1.7 2006-10-28 16:50:34 pixel Exp $ */
+/* $Id: Console.h,v 1.8 2007-07-27 14:29:23 pixel Exp $ */
#ifndef __CONSOLE_H__
#define __CONSOLE_H__
@@ -28,7 +28,7 @@
#include <Buffer.h>
#include <engine.h>
-#include <Widgets.h>
+#include <widgets.h>
class console : public mogltk::Widget {
public:
diff --git a/cd-tool.cpp b/cd-tool.cpp
index fb17871..407f242 100644
--- a/cd-tool.cpp
+++ b/cd-tool.cpp
@@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: cd-tool.cpp,v 1.47 2005-12-01 13:26:11 pixel Exp $ */
+/* $Id: cd-tool.cpp,v 1.48 2007-07-27 14:29:23 pixel Exp $ */
#define WIP
-#define VERSION "0.5"
+#define VERSION "0.6"
#include <getopt.h>
#include "Input.h"
@@ -181,7 +181,7 @@ enum basecdtool_t {
};
struct lua_functypes_t basecdtool_functions[] = {
- { BASECDTOOL_LOAD, "load", 0, 1, { LUA_STRING | LUA_OBJECT } },
+ { BASECDTOOL_LOAD, "load", 0, 1, { BLUA_STRING | BLUA_OBJECT } },
{ -1, 0, 0, 0, 0 }
};
@@ -236,13 +236,13 @@ enum cdtool_functions_t {
};
struct lua_functypes_t cdtool_functions[] = {
- { CDTOOL_PRINT, "print", 0, 1, { LUA_ANY } },
- { CDTOOL_PRINTN, "printn", 1, 1, { LUA_ANY } },
+ { CDTOOL_PRINT, "print", 0, 1, { BLUA_ANY } },
+ { CDTOOL_PRINTN, "printn", 1, 1, { BLUA_ANY } },
{ CDTOOL_QUIT, "quit", 0, 0, 0 },
{ CDTOOL_EXIT, "exit", 0, 0, 0 },
- { CDTOOL_INFOS, "infos", 0, 1, { LUA_OBJECT } },
- { CDTOOL_PATH, "path", 0, 1, { LUA_OBJECT } },
- { CDTOOL_PRINTDIR, "printdir", 1, 2, { LUA_STRING, LUA_OBJECT } },
+ { CDTOOL_INFOS, "infos", 0, 1, { BLUA_OBJECT } },
+ { CDTOOL_PATH, "path", 0, 1, { BLUA_OBJECT } },
+ { CDTOOL_PRINTDIR, "printdir", 1, 2, { BLUA_STRING, BLUA_OBJECT } },
{ -1, 0, 0, 0, 0 }
};
@@ -431,7 +431,8 @@ Lua * start_full_lua(void) {
void showbanner() {
printm(M_BARE,
-"CD-Tool version " VERSION " (c) 2003-2005 Nicolas \"Pixel\" Noble\n"
+"CD-Tool version " VERSION " (c) 2003-2007 Nicolas \"Pixel\" Noble\n"
+LUA_RELEASE " " LUA_COPYRIGHT "\n"
#ifdef WIP
"Special version Work In Progress, compiled the " __DATE__ " at " __TIME__ "\n"
#endif
diff --git a/compile/linux/Makefile b/compile/linux/Makefile
index a518356..54e90b5 100644
--- a/compile/linux/Makefile
+++ b/compile/linux/Makefile
@@ -74,11 +74,13 @@ lgc.c luacomp.c \
llex.c lundump.c \
lmem.c lvm.c \
lobject.c lzio.c \
-lopcodes.c \
+lopcodes.c lprint.c \
+linit.c \
lauxlib.c \
lbaselib.c \
ldblib.c \
liolib.c \
+loslib.c \
lmathlib.c \
loadlib.c \
lstrlib.c \
diff --git a/lib/luacd.cpp b/lib/luacd.cpp
index 6f79a16..091fd68 100644
--- a/lib/luacd.cpp
+++ b/lib/luacd.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: luacd.cpp,v 1.23 2007-05-30 06:36:23 pixel Exp $ */
+/* $Id: luacd.cpp,v 1.24 2007-07-27 14:29:23 pixel Exp $ */
#include "luacd.h"
@@ -65,36 +65,36 @@ enum cdutils_functions_t {
};
struct lua_functypes_t cdutils_methods[] = {
- { CDUTILS_SETISOW, "set_iso_w", 1, 1, {LUA_OBJECT} },
- { CDUTILS_GUESSTYPE, "guessmode", 0, 1, {LUA_NUMBER} },
- { CDUTILS_SECTORSEEK, "sectorseek", 1, 1, {LUA_NUMBER} },
- { CDUTILS_READSECTOR, "readsector", 0, 2, {LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_READdata, "readdata", 1, 3, {LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_READFILE, "readfile", 2, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_WRITESECTOR, "writesector", 1, 3, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_WRITEDATA, "writedata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_WRITEFILE, "writefile", 1, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
+ { CDUTILS_SETISOW, "set_iso_w", 1, 1, { BLUA_OBJECT } },
+ { CDUTILS_GUESSTYPE, "guessmode", 0, 1, { BLUA_NUMBER } },
+ { CDUTILS_SECTORSEEK, "sectorseek", 1, 1, { BLUA_NUMBER } },
+ { CDUTILS_READSECTOR, "readsector", 0, 2, { BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_READdata, "readdata", 1, 3, { BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_READFILE, "readfile", 2, 4, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_WRITESECTOR, "writesector", 1, 3, { BLUA_TABLE, BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_WRITEDATA, "writedata", 2, 4, { BLUA_TABLE, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_WRITEFILE, "writefile", 1, 4, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
{ CDUTILS_GETISOINFOS, "getisoinfos", 0, 0, 0 },
{ CDUTILS_GETPTINFOS, "getptinfos", 0, 0, 0 },
- { CDUTILS_FINDPATH, "findpath", 1, 1, {LUA_STRING} },
- { CDUTILS_FINDPARENT, "findparent", 1, 1, {LUA_STRING} },
- { CDUTILS_FINDDIRENTRY, "finddirentry", 2, 2, {LUA_OBJECT, LUA_STRING} },
- { CDUTILS_NEWCDFILE, "cdfile", 1, 3, {LUA_ANY, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_UPDATESIZE, "updatesize", 2, 2, {LUA_STRING, LUA_NUMBER} },
- { CDUTILS_UPDATESECTOR, "updatesector", 2, 2, {LUA_STRING, LUA_NUMBER} },
- { CDUTILS_CREATESECTOR, "createsector", 2, 3, {LUA_NUMBER, LUA_NUMBER, LUA_BOOLEAN} },
+ { CDUTILS_FINDPATH, "findpath", 1, 1, { BLUA_STRING } },
+ { CDUTILS_FINDPARENT, "findparent", 1, 1, { BLUA_STRING } },
+ { CDUTILS_FINDDIRENTRY, "finddirentry", 2, 2, { BLUA_OBJECT, BLUA_STRING } },
+ { CDUTILS_NEWCDFILE, "cdfile", 1, 3, { BLUA_ANY, BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_UPDATESIZE, "updatesize", 2, 2, { BLUA_STRING, BLUA_NUMBER } },
+ { CDUTILS_UPDATESECTOR, "updatesector", 2, 2, { BLUA_STRING, BLUA_NUMBER } },
+ { CDUTILS_CREATESECTOR, "createsector", 2, 3, { BLUA_NUMBER, BLUA_NUMBER, BLUA_BOOLEAN } },
{ -1, 0, 0, 0, 0 }
};
struct lua_functypes_t cdutils_functions[] = {
- { CDUTILS_NEWCDUTILS, "cdutils" , 1, 2, {LUA_OBJECT, LUA_OBJECT} },
- { CDUTILS_SWAPWORD, "swapword", 1, 1, {LUA_NUMBER} },
- { CDUTILS_SWAPDWORD, "swapdword", 1, 1, {LUA_NUMBER} },
- { CDUTILS_FROM_BCD, "from_BCD", 1, 1, {LUA_NUMBER} },
- { CDUTILS_TO_BCD, "to_BCD", 1, 1, {LUA_NUMBER} },
- { CDUTILS_IS_VALID_BCD, "is_valid_BCD", 1, 1, {LUA_NUMBER} },
- { CDUTILS_FROM_MSF, "from_MSF", 1, 4, {LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_TO_MSF, "to_MSF", 1, 2, {LUA_NUMBER, LUA_NUMBER} },
+ { CDUTILS_NEWCDUTILS, "cdutils" , 1, 2, { BLUA_OBJECT, BLUA_OBJECT } },
+ { CDUTILS_SWAPWORD, "swapword", 1, 1, { BLUA_NUMBER } },
+ { CDUTILS_SWAPDWORD, "swapdword", 1, 1, { BLUA_NUMBER } },
+ { CDUTILS_FROM_BCD, "from_BCD", 1, 1, { BLUA_NUMBER } },
+ { CDUTILS_TO_BCD, "to_BCD", 1, 1, { BLUA_NUMBER } },
+ { CDUTILS_IS_VALID_BCD, "is_valid_BCD", 1, 1, { BLUA_NUMBER } },
+ { CDUTILS_FROM_MSF, "from_MSF", 1, 4, { BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { CDUTILS_TO_MSF, "to_MSF", 1, 2, { BLUA_NUMBER, BLUA_NUMBER } },
{ -1, 0, 0, 0, 0 }
};
@@ -556,7 +556,7 @@ enum direntry_methods_t {
};
struct lua_functypes_t direntry_methods[] = {
- { DIRENTRY_INDEX, "index", 1, 1, {LUA_STRING} },
+ { DIRENTRY_INDEX, "index", 1, 1, { BLUA_STRING } },
{ DIRENTRY_ISHIDDEN, "ishidden", 0, 0, 0 },
{ DIRENTRY_ISDIR, "isdir", 0, 0, 0 },
{ DIRENTRY_HASXA, "hasxa", 0, 0, 0 },
@@ -719,8 +719,8 @@ enum cddate_functions_t {
};
struct lua_functypes_t cddate_methods[] = {
- { CDDATE_INDEX, "index", 1, 1, {LUA_STRING} },
- { CDDATE_NEWINDEX, "newindex", 2, 2, {LUA_STRING, LUA_NUMBER} },
+ { CDDATE_INDEX, "index", 1, 1, { BLUA_STRING } },
+ { CDDATE_NEWINDEX, "newindex", 2, 2, { BLUA_STRING, BLUA_NUMBER } },
{ -1, 0, 0, 0, 0 }
};
@@ -842,8 +842,8 @@ enum PVD_functions_t {
};
struct lua_functypes_t PVD_methods[] = {
- { PVD_INDEX, "index", 1, 1, {LUA_ANY} },
- { PVD_NEWINDEX, "newindex", 2, 2, {LUA_ANY, LUA_ANY} },
+ { PVD_INDEX, "index", 1, 1, { BLUA_ANY } },
+ { PVD_NEWINDEX, "newindex", 2, 2, { BLUA_ANY, BLUA_ANY } },
{ -1, 0, 0, 0, 0 }
};
@@ -1088,16 +1088,16 @@ enum DirTree_functions_t {
};
struct lua_functypes_t DirTree_methods[] = {
- { DIRTREE_INDEX, "index", 1, 1, {LUA_STRING} },
- { DIRTREE_NEWINDEX, "newindex", 2, 2, {LUA_STRING, LUA_ANY} },
- { DIRTREE_FROMDIR, "fromdir", 1, 1, {LUA_OBJECT} },
+ { DIRTREE_INDEX, "index", 1, 1, { BLUA_STRING } },
+ { DIRTREE_NEWINDEX, "newindex", 2, 2, { BLUA_STRING, BLUA_ANY } },
+ { DIRTREE_FROMDIR, "fromdir", 1, 1, { BLUA_OBJECT } },
{ DIRTREE_SETBASICSXA, "setbasicsxa", 0, 0, 0 },
- { DIRTREE_FIND, "find", 1, 1, {LUA_STRING} },
+ { DIRTREE_FIND, "find", 1, 1, { BLUA_STRING } },
{ -1, 0, 0, 0, 0 }
};
struct lua_functypes_t DirTree_functions[] = {
- { DIRTREE_NEWDIRTREE, "DirTree", 1, 2, {LUA_OBJECT, LUA_BOOLEAN} },
+ { DIRTREE_NEWDIRTREE, "DirTree", 1, 2, { BLUA_OBJECT, BLUA_BOOLEAN } },
{ -1, 0, 0, 0, 0 }
};
@@ -1363,28 +1363,28 @@ enum isobuilder_functions_t {
};
struct lua_functypes_t isobuilder_methods[] = {
- { ISOBUILDER_FOREWORD, "foreword", 1, 1, {LUA_OBJECT} },
- { ISOBUILDER_FOREWORD_HANDLE, "foreword_handle", 1, 2, {LUA_OBJECT, LUA_NUMBER} },
- { ISOBUILDER_FOREWORD_ARRAY, "foreword_array", 1, 2, {LUA_TABLE, LUA_NUMBER} },
+ { ISOBUILDER_FOREWORD, "foreword", 1, 1, { BLUA_OBJECT } },
+ { ISOBUILDER_FOREWORD_HANDLE, "foreword_handle", 1, 2, { BLUA_OBJECT, BLUA_NUMBER } },
+ { ISOBUILDER_FOREWORD_ARRAY, "foreword_array", 1, 2, { BLUA_TABLE, BLUA_NUMBER } },
{ ISOBUILDER_GETDISPSECT, "getdispsect", 0, 0, 0},
- { ISOBUILDER_PUTFILE, "putfile", 1, 3, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER} },
- { ISOBUILDER_PUTDATA, "putdata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
- { ISOBUILDER_CREATESECTOR, "createsector", 1, 7, {LUA_TABLE | LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
+ { ISOBUILDER_PUTFILE, "putfile", 1, 3, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER } },
+ { ISOBUILDER_PUTDATA, "putdata", 2, 4, { BLUA_TABLE, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { ISOBUILDER_CREATESECTOR, "createsector", 1, 7, { BLUA_TABLE | BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
{ ISOBUILDER_SETEOF, "setEOF", 0, 0, 0 },
{ ISOBUILDER_CLEAREOF, "clearEOF", 0, 0, 0 },
- { ISOBUILDER_SETBASICS, "setbasics", 1, 5, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
- { ISOBUILDER_CREATEDIR, "createdir", 2, 5, {LUA_OBJECT, LUA_STRING, LUA_NUMBER, LUA_OBJECT, LUA_NUMBER} },
- { ISOBUILDER_CREATEFILE, "createfile", 3, 5, {LUA_OBJECT, LUA_STRING, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} },
- { ISOBUILDER_COPYDIR, "copydir", 3, 4, {LUA_OBJECT, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} },
- { ISOBUILDER_CLOSE, "close", 0, 3, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER} },
+ { ISOBUILDER_SETBASICS, "setbasics", 1, 5, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { ISOBUILDER_CREATEDIR, "createdir", 2, 5, { BLUA_OBJECT, BLUA_STRING, BLUA_NUMBER, BLUA_OBJECT, BLUA_NUMBER } },
+ { ISOBUILDER_CREATEFILE, "createfile", 3, 5, { BLUA_OBJECT, BLUA_STRING, BLUA_OBJECT, BLUA_OBJECT, BLUA_NUMBER } },
+ { ISOBUILDER_COPYDIR, "copydir", 3, 4, { BLUA_OBJECT, BLUA_OBJECT, BLUA_OBJECT, BLUA_NUMBER } },
+ { ISOBUILDER_CLOSE, "close", 0, 3, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER } },
{ -1, 0, 0, 0, 0 }
};
struct lua_functypes_t isobuilder_functions[] = {
- { ISOBUILDER_NEWISOBUILDER, "isobuilder", 1, 2, {LUA_OBJECT, LUA_NUMBER} },
- { ISOBUILDER_CREATEPVD_HANDLE, "createpvd_handle", 1, 1, {LUA_OBJECT} },
- { ISOBUILDER_CREATEPVD, "createpvd", 1, 1, {LUA_OBJECT} },
- { ISOBUILDER_CREATEPVD_ARRAY, "createpvd_array", 1, 1, {LUA_TABLE} },
+ { ISOBUILDER_NEWISOBUILDER, "isobuilder", 1, 2, { BLUA_OBJECT, BLUA_NUMBER } },
+ { ISOBUILDER_CREATEPVD_HANDLE, "createpvd_handle", 1, 1, { BLUA_OBJECT } },
+ { ISOBUILDER_CREATEPVD, "createpvd", 1, 1, { BLUA_OBJECT } },
+ { ISOBUILDER_CREATEPVD_ARRAY, "createpvd_array", 1, 1, { BLUA_TABLE } },
{ -1, 0, 0, 0, 0 }
};
diff --git a/lib/luapsx.cpp b/lib/luapsx.cpp
index 986bd62..3c1b508 100644
--- a/lib/luapsx.cpp
+++ b/lib/luapsx.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: luapsx.cpp,v 1.10 2004-12-17 11:49:27 pixel Exp $ */
+/* $Id: luapsx.cpp,v 1.11 2007-07-27 14:29:23 pixel Exp $ */
#include <LuaHandle.h>
#include "luapsx.h"
@@ -83,9 +83,9 @@ enum psx_functions_t {
};
struct lua_functypes_t psx_functions[] = {
- { PSX_BSDECODE, "bsdecode", 3, 3, { LUA_OBJECT, LUA_NUMBER, LUA_NUMBER } },
- { PSX_BSENCODE, "bsencode", 3, 5, { LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER } },
- { PSX_BLIT, "blit", 9, 10, { LUA_OBJECT, LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER } },
+ { PSX_BSDECODE, "bsdecode", 3, 3, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER } },
+ { PSX_BSENCODE, "bsencode", 3, 5, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
+ { PSX_BLIT, "blit", 9, 10, { BLUA_OBJECT, BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } },
{ -1, 0, 0, 0, 0 }
};