Commit Graph
90191 Commits
Author SHA1 Message Date
Eugene Sandulenko fcdebdc015 JANITORIAL: Whitespace fixes 2019-09-03 17:16:43 +02:00
Eugene Sandulenko efa460599d HDB: Added quick & dirty Lua tracing 2019-09-03 17:16:43 +02:00
Nipun Garg 472d5f2104 HDB: Call lua->init() before initScript 2019-09-03 17:16:43 +02:00
Nipun Garg f9beeb66d3 HDB: Add init() to load the GLOBAL_LUA code 2019-09-03 17:16:43 +02:00
Nipun Garg 538ead52bb HDB: Fix allocation problem with g_hdb 2019-09-03 17:16:43 +02:00
Nipun Garg ccce71fabb HDB: Load MAP00_DEMO_LUA 2019-09-03 17:16:43 +02:00
Nipun Garg 24d42ce43a HDB: Remove the char *name arg from initScript 2019-09-03 17:16:43 +02:00
Nipun Garg 431d819d08 HDB: Load GLOBAL_LUA in initScript 2019-09-03 17:16:43 +02:00
Nipun Garg 7dd8b07ceb HDB: Modify stripComments to sanitizeScript
Lua 5.0 introduced new syntax for upvalues so the
old code needs to be preprocessed first.
2019-09-03 17:16:43 +02:00
Nipun Garg b8a4fa2902 HDB: Add stubs for the Lua extensions 2019-09-03 17:16:43 +02:00
Nipun Garg bcd4de2c7e HDB: Change comments from /**/ to #if 0 ... #endif 2019-09-03 17:16:43 +02:00
Nipun Garg 9522bfdb01 HDB: Remove LuaScript initialization from hdb.cpp 2019-09-03 17:16:42 +02:00
Nipun Garg ba1081b87c HDB: Correct the include paths from X.h to hdb/X.h 2019-09-03 17:16:42 +02:00
Nipun Garg 79ebe8927e HDB: Add *g_hdb to access the subsystems 2019-09-03 17:16:42 +02:00
Nipun Garg 4b8f7f339e HDB: Add stripComments() to strip C-style comments
There are a few C-style comments present in the
Lua files
2019-09-03 17:16:42 +02:00
Nipun Garg 094bf4c06b HDB: Modify setGameFlags() to getGameFlags() 2019-09-03 17:16:42 +02:00
Nipun Garg bc638cf251 HDB: Add LuaScript::initScript
It creates a new Lua environment whenever a new
Lua script is loaded
2019-09-03 17:16:42 +02:00
Nipun Garg fd666efd6a HDB: Check if demo version is running 2019-09-03 17:16:42 +02:00
Nipun Garg 708819839d HDB: Test LuaScript::executeFile 2019-09-03 17:16:42 +02:00
Nipun Garg 88661fb9b9 HDB: Toogle the control flow of HDBGame::init()
The previous flow only allowed one subsystem to
be initialized.
2019-09-03 17:16:42 +02:00
Nipun Garg 4800001cdc HDB: Add Lua subsystem
Added the LuaScript *lua pointer. Also called the
destructors for fileMan and lua
2019-09-03 17:16:42 +02:00
Nipun Garg 0ad5f7e180 HDB: Add _systemInit check to LuaScript 2019-09-03 17:16:42 +02:00
Nipun Garg f88b1d0d6a HDB: Add the LuaScript class to integrate Lua
It creates lua_State (s), initializes them and
executes Lua files in them
2019-09-03 17:16:42 +02:00
Nipun Garg 0efd5ed31d HDB: Remove readStream function definition 2019-09-03 17:16:42 +02:00
Nipun Garg eb7649228e HDB: Set the DisposeAfterUse flag in findFirstData 2019-09-03 17:16:42 +02:00
Nipun Garg 6e6de19c77 HDB: Add destructors to Picture and Tile
_surface is freed in the destructors for Picture
and Tile
2019-09-03 17:16:42 +02:00
Nipun Garg 7a00e0b6a1 HDB: Draw the t32_ground1 tile to the screen 2019-09-03 17:16:42 +02:00
Nipun Garg 07b3408ff4 HDB: Add the Tile class to load 32x32 Tiles 2019-09-03 17:16:42 +02:00
Nipun Garg 6986e5495a HDB: Refactor readStream() into findFirstData() 2019-09-03 17:16:42 +02:00
Nipun Garg e38ac4a795 HDB: Fix the wrong class member naming 2019-09-03 17:16:42 +02:00
Nipun Garg db61224440 HDB: Correct the PixelFormat to 565 2019-09-03 17:16:42 +02:00
Nipun Garg 57fc376b48 HDB: Load the logo screen and display it to screen 2019-09-03 17:16:42 +02:00
Nipun Garg 006bf635ae HDB: Add readStream() to create input stream
The input stream is designed keeping in mind the structure
of the MPC file in mind.
2019-09-03 17:16:42 +02:00
Nipun Garg e3eaf42515 HDB: Add Picture class to load non-tile graphics 2019-09-03 17:16:42 +02:00
Nipun Garg fb00f5cb4e HDB: Fix Endian problem with the MPC data file 2019-09-03 17:16:42 +02:00
Nipun Garg d5aa1a62b0 HDB: Fix Coding and Formatting Conventions issues 2019-09-03 17:16:42 +02:00
Nipun Garg baf6ed6a60 HDB: Add debug statment to openMPC() 2019-09-03 17:16:42 +02:00
Nipun Garg 406145362e HDB: Fix Endian bug with MPC Signature. LE->BE 2019-09-03 17:16:41 +02:00
Nipun Garg a4b4b351d8 HDB: Fix missing initial pointer for _mpcFile 2019-09-03 17:16:41 +02:00
Nipun Garg e1873bd0c1 HDB: Add additional HDB variant to detection.cpp 2019-09-03 17:16:41 +02:00
Nipun Garg 7b5946ddb9 HDB: Updating module.mk for new files 2019-09-03 17:16:41 +02:00
Nipun Garg 1624c765a0 HDB: Setup system for drawing Title Screen 2019-09-03 17:16:41 +02:00
Nipun Garg e4e9f4ff34 HDB: Create the Draw Manager to draw/animate tiles 2019-09-03 17:16:41 +02:00
Nipun Garg 6ad64d992c HDB: Fix Code Formatting Conventions 2019-09-03 17:16:41 +02:00
Nipun Garg 208c6430d6 HDB: Add the GameState and State Management 2019-09-03 17:16:41 +02:00
Nipun Garg 6082037f74 HDB: Move the readMPC function to the file-manager 2019-09-03 17:16:41 +02:00
Nipun Garg 432ae5ad57 HDB: Add the find functions to the file-manager 2019-09-03 17:16:41 +02:00
Nipun Garg 6a764f4252 HDB: Fix Code Conventions and Formatting errors 2019-09-03 17:16:41 +02:00
Nipun Garg e0d42fd044 HDB: Fix the PixelFormat to hardcoded value
The function getScreenFormat() doesn't work until initGraphics
has been called. Hence, calling it to initialize the
PixelFormat doesn't work.
2019-09-03 17:16:41 +02:00
Nipun Garg 99af2f6a30 HDB: Create FileMan as the filesystem for HDB
The exisitng code to read MPC files was moved into FileMan
2019-09-03 17:16:41 +02:00