mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-04 20:57:49 +00:00
ye
This commit is contained in:
+21
-21
@@ -11,17 +11,17 @@
|
||||
#define LUAVM_DESERIALIZER
|
||||
#include "LuaSerializer.inl"
|
||||
|
||||
struct CoreScriptBytecode
|
||||
{
|
||||
const char* name;
|
||||
const unsigned char* value;
|
||||
size_t dataSize;
|
||||
struct CoreScriptBytecode
|
||||
{
|
||||
const char* name;
|
||||
const unsigned char* value;
|
||||
size_t dataSize;
|
||||
};
|
||||
|
||||
#include "LuaGenCS.inl"
|
||||
|
||||
// Dummy implementation of Lua parser (referenced by Lua sources)
|
||||
Proto *luaY_parser(lua_State *L, ZIO *z, Mbuffer *buff, const char *name)
|
||||
Proto* luaY_parser(lua_State* L, ZIO* z, Mbuffer* buff, const char* name)
|
||||
{
|
||||
lua_pushstring(L, "");
|
||||
luaD_throw(L, LUA_ERRSYNTAX);
|
||||
@@ -52,7 +52,7 @@ namespace LuaVM
|
||||
return LuaDeserializer::deserializeFailure(L, chunkname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned int getKey()
|
||||
{
|
||||
// This is an initial value, it will be corrected by the server via SET_GLOBALS packet
|
||||
@@ -85,35 +85,35 @@ namespace LuaVM
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string getBytecodeCore(const std::string& name)
|
||||
std::string getBytecodeCore(const std::string& name)
|
||||
{
|
||||
std::string rotName = RBX::rot13(name);
|
||||
for (int i = 0; i < sizeof(gCoreScripts)/sizeof(gCoreScripts[0]); i++)
|
||||
for (int i = 0; i < sizeof(gCoreScripts) / sizeof(gCoreScripts[0]); i++)
|
||||
if (gCoreScripts[i].name == rotName)
|
||||
return std::string(reinterpret_cast<const char*>(gCoreScripts[i].value), gCoreScripts[i].dataSize);
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
boost::unordered_map<std::string, std::string> getBytecodeCoreModules()
|
||||
{
|
||||
boost::unordered_map<std::string, std::string> coreModuleScripts;
|
||||
boost::unordered_map<std::string, std::string> getBytecodeCoreModules()
|
||||
{
|
||||
boost::unordered_map<std::string, std::string> coreModuleScripts;
|
||||
|
||||
for (int i = 0; i < sizeof(gCoreModuleScripts)/sizeof(gCoreModuleScripts[0]); i++)
|
||||
{
|
||||
coreModuleScripts[gCoreModuleScripts[i].name] = std::string(reinterpret_cast<const char*>(gCoreModuleScripts[i].value), gCoreModuleScripts[i].dataSize);
|
||||
}
|
||||
for (int i = 0; i < sizeof(gCoreModuleScripts) / sizeof(gCoreModuleScripts[0]); i++)
|
||||
{
|
||||
coreModuleScripts[gCoreModuleScripts[i].name] = std::string(reinterpret_cast<const char*>(gCoreModuleScripts[i].value), gCoreModuleScripts[i].dataSize);
|
||||
}
|
||||
|
||||
return coreModuleScripts;
|
||||
}
|
||||
return coreModuleScripts;
|
||||
}
|
||||
|
||||
unsigned int rbxOldEncode(unsigned int i, int pc, unsigned int key)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int rbxDaxEncode(unsigned int i, int pc, unsigned int key)
|
||||
unsigned int rbxDaxEncode(unsigned int i, int pc, unsigned int key)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user