RaphaelIT7 / gmod-lua-shared

WIP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gmod-lua-shared

My goal is to recreate the lua_shared.dll from Gmod.
Current LUAJIT Version used for this: https://github.com/LuaJIT/LuaJIT/commit/e826d0c101d750fac8334d71e221c50d8dbe236c

Note: This is still WIP

Maybe if I finish this I also try to get Lua 5.4 to work :D

ToDo

Current Issues

  • Engine Error: Error loading lua_shared (Sys_GetFactory)
  • Segmentation fault (core dumped) ../../../source/CLuaInterface.cpp:958
  • CLuaInterface::Global needs to be implemented. Or else we crash.
  • CLuaInterface::SetMember needs to be implemented.
  • CLuaInterface::GetMetaTableObject needs to be implemented.
  • CLuaInterface::FindAndRunScript needs to be implemented.
  • CLuaInterface::PushUserType needs to be implemented?
  • Random Crashes on Windows? (Seems to be solved???)
  • ILuaObjects are broken? (obj->isTable() = false, (obj->GetType() == Type::Table) = true?, obj->Push() = nothing???) Best example is Global(); NOTE: Added a workaround to fix it.
  • Fixed the Stack
  • (IMPORTANT) Find out why functions like Material crash. Are we missing something?
  • Implement continue
  • What makes this call? What is broken? CLuaInterface::CheckString 1068146288
    NOTE: I should actual give Msg the Value to ACTUALLY print the REAL value and not some memory.
  • What causes a stack leak? A bunch of nil values end up on the stack.
  • Fix SetMember functions causing [MENU ERROR] attempt to index a string value
  • Find another stack leak.
    NOTE: The leak was cased by CallFunctionProtected returning false instead of true.
  • Fix /* */ and // in LuaJIT and remove the Workarounds from CLuaInterface::RunMacros
    BUG: [MENU ERROR] [string "includes/util/color.lua"]:81: ')' expected near '~'
  • Fix some random error (the file "(null)"" couldn't be opened)
  • Fix the random crash when loading into a game
  • Type Errors cause engine errors.

Linux DS issues

  • Crashes while loading.
    • Implement Bootil to fill the compressed field to not cause a crash.
    • Fix a crash in CLuaShared::LoadFile

ILuaBase

  • ILuaBase::PushMetaTable(int iType)
  • ILuaBase::PushUserType(void* data, int iType)
  • ILuaBase::SetUserType(int iStackPos, void* data)

ILuaInterface / CLuaInterface

Everything.

CLuaConVars

  • CLuaConVars::CreateConVar
  • CLuaConVars::CreateConCommand
  • CLuaConVars::DestroyManaged
  • CLuaConVars::Cache
  • CLuaConVars::ClearCache

CLuaShared

Most of it.

Collection of random Engine Errors and Warnings or other things

image image image image image image image image image

About

WIP

License:MIT License


Languages

Language:C 76.5%Language:Lua 10.3%Language:C++ 6.8%Language:HTML 4.5%Language:Makefile 1.0%Language:Batchfile 0.7%Language:CSS 0.2%Language:Roff 0.0%