Mercurial > mm7
changeset 2032:b9e11e88b157
Merge
author | Ritor1 |
---|---|
date | Mon, 18 Nov 2013 20:17:37 +0600 |
parents | e21db9518295 (diff) 47ab41698f9d (current diff) |
children | e78fa9082174 |
files | mm7_2.cpp |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/lua/lua.h Mon Nov 18 13:17:12 2013 +0600 +++ b/lib/lua/lua.h Mon Nov 18 20:17:37 2013 +0600 @@ -2,5 +2,7 @@ extern "C" { - #include "lua-5.2.2/lua.hpp" + #include "lua-5.2.2/lua.h" + #include "lua-5.2.2/lualib.h" + #include "lua-5.2.2/lauxlib.h" } \ No newline at end of file
--- a/mm7_2.cpp Mon Nov 18 13:17:12 2013 +0600 +++ b/mm7_2.cpp Mon Nov 18 20:17:37 2013 +0600 @@ -68,6 +68,8 @@ #include "NewUI/MainMenu.h" #include "Level/Decoration.h" +#include "lib/lua/lua.h" + int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4); bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive); @@ -4311,6 +4313,14 @@ char test[1024]; sprintfex(test, "^Pi[%s]: знахар^R[ь;ка;]", "Золтан"); + lua_State *l = luaL_newstate(); + if ( l == NULL ) + printf ( "Error creating Lua context.\n" ); + luaL_openlibs(l); + if ( luaL_dofile(l,"lua_scripts/script.lua")) + printf ( "Error opening script.lua\n" ); + lua_close(l); + bool bNoMargareth = false; if (pCmdLine && *pCmdLine) {