Add stc:GetStringFromPtr and dll build
This commit is contained in:
parent
032c194cd1
commit
f357c2811a
2 changed files with 13 additions and 0 deletions
BIN
Release/gmcl_samurai_win32.dll
Normal file
BIN
Release/gmcl_samurai_win32.dll
Normal file
Binary file not shown.
13
struct.cpp
13
struct.cpp
|
|
@ -151,6 +151,16 @@ int lStruct_GetString(CLuaState* L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lStruct_GetStringFromPtr(CLuaState* L)
|
||||
{
|
||||
struct_t* stc = Check_Struct(L,1);
|
||||
|
||||
L->PushString(stc->s_ptr);
|
||||
stc->s_ptr = (char*)(stc->s_ptr+4);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lStruct_GetNumber(CLuaState* L)
|
||||
{
|
||||
L->CheckType(2,NUMBER);
|
||||
|
|
@ -217,6 +227,9 @@ int Struct_Open(CLuaState* L)
|
|||
L->PushCFunction(lStruct_PushNumber);
|
||||
L->SetField(-2,"PushNumber");
|
||||
|
||||
L->PushCFunction(lStruct_GetStringFromPtr);
|
||||
L->SetField(-2,"GetStringFromPtr");
|
||||
|
||||
L->PushCFunction(lStruct_GetStringFixed);
|
||||
L->SetField(-2,"GetStringFixed");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue