Commit Graph
45 Commits
Author SHA1 Message Date
Paweł Kołodziejski 662481db00 GRIM: LUA: Cleanup variables name 2022-01-14 09:01:44 +01:00
Paweł Kołodziejski 690f9d2a5c GRIM,LUA: Janitorial 2022-01-06 18:26:30 +01:00
Bastien Bouclet e105e6340e GRIM: Use 64bit integers for the save/restore code
To remove usage of the now removed SCUMM_64BITS definition
2017-12-06 21:41:23 +01:00
Paweł Kołodziejski 5dad979952 Revert "GRIM: Use exceptions instead of jumps"
This reverts commit 7b42887895.
2017-11-30 19:56:43 +01:00
Joel Teichroeb 7b42887895 GRIM: Use exceptions instead of jumps 2017-11-30 08:31:25 +01:00
Joel Teichroeb 0f3da43694 GRIM: Change NULL to nullptr. 2014-05-30 17:43:08 -07:00
Christian Krause 187d34d319 EMI: fix pause handling
On vista point it may happen that two sequences for the rock landings
are executed at the same time. Although they intend to be locked via
pause_scripts(), changing the set will call unpause_scripts() and unlock
all of them.

The patch will use the optional parameter for (un)pause_scripts() to
determine whether the pause calls should be counting (e.g. when
switching a set or opening the inventory) or not.
2013-12-24 00:14:49 +01:00
Christian Krause 4b6cf2055b GRIM/EMI: Count pause/unpause calls of LUA scripts
Scripts that have explicitly been paused must not be resumed when
pause_scripts and unpause_scripts are called, e.g. when opening the
inventory, pausing the game or changing sets.

This patch splits the existing paused flag in two separate ones:
 - LState::all_paused is controlled by pause/unpause_scripts (plural)
 - LState::paused is controlled by pause/unpause_script (singular)

For compatibility with Grim savegames both flags are stored in a single
byte, with bit 0 having the same meaning as the former boolean.
2013-12-09 23:40:34 +01:00
Joel Teichroeb 88c7bcb35b GRIM: Remove redundant code 2013-01-22 20:33:37 -08:00
Joel Teichroeb 478d9c2505 EMI: Save LState sleepFor and bump savegame to 22.3 2012-12-22 11:04:15 -08:00
Giulio Camuffo f79577c410 GRIM: Fix save/load of Lua's userdata objects. Bump savegame version to 22.1. 2012-12-14 18:11:12 +01:00
Joel Teichroeb 44efbccff4 GRIM: Fix casting away const 2012-04-03 16:58:04 -07:00
Paweł Kołodziejski 606092c9b5 GRIM: rename TARGET_64BITS to SCUMM_64BITS 2012-01-28 10:51:34 +01:00
Joel Teichroeb a9c664379e GRIM: Make saving and restoring use more appropriate types and rename functions to be more logical 2012-01-28 10:03:27 +01:00
Giulio Camuffo 38e208c00c GRIM: #includes cleanup. 2011-07-23 12:14:33 +02:00
Giulio Camuffo 5012ebfbc9 GRIM: New, cleaner, lua_runtasks(). 2011-07-20 22:27:41 +02:00
Giulio Camuffo 94530d611c GRIM: Cleanup some other save/restore code. 2011-05-29 11:42:36 +02:00
Giulio Camuffo 7c952ff420 GRIM: Clean up some code. 2011-05-28 14:46:36 +02:00
Giulio Camuffo 1bbe821624 GRIM: Fix save/restore of floats.
Makes BE saves work on LE system and vice versa.
2011-05-23 16:16:09 +02:00
Giulio Camuffo 437c053f64 GRIM: Fix restore on big endian. 2011-05-16 23:00:15 +02:00
Pawel Kolodziejski 0f5de71f70 sync with scummvm 2011-05-08 15:38:26 +02:00
Pawel Kolodziejski aa93ea2b06 GRIM-LUA: fix warning and add check code is right 2011-05-08 09:54:59 +02:00
Giulio Camuffo ce716e4580 GRIM: Store USERDATAs with a new struct { int32 id; int32 tag }.
This way we don't have to deal with casts between integers and void*
anymore.
2011-05-03 16:51:30 +02:00
Giulio Camuffo 1e34636e62 GRIM: Turned the warning back into the assert. 2011-05-02 16:05:28 +02:00
Giulio Camuffo 9ca6ec1db5 GRIM: Return early from recreateObject() if the ttype == LUA_T_TASK. 2011-05-02 10:23:52 +02:00
Giulio Camuffo bb529e9647 GRIM: SYSTEM_*_ENDIAN -> SCUMM_*_ENDIAN 2011-05-01 21:02:45 +02:00
Giulio Camuffo 1e868dd359 GRIM: Store ids instead of the pointers as lua's userdata objects.
Removed ObjectManager as it became useless.
2011-05-01 18:54:29 +02:00
Giulio Camuffo 8563dea474 GRIM: Recreate taskFunc only if its type is PROTO or CPROTO. 2011-04-23 18:12:31 +02:00
Pawel Kolodziejski 7f37609a84 shutup compiler warning 2011-04-17 12:19:27 +02:00
Giulio Camuffo 28f4d4751b Recreate the "taskFunc" objects of the lua states. 2011-04-15 18:57:41 +02:00
Matthew Hoops 00ee0554be GRIM: Remove global constructor usage and silence warnings 2011-04-12 20:51:55 +08:00
Pawel Kolodziejski 55415ee174 fix compilation using msvc 2011-04-10 11:24:03 +02:00
Matthew Hoops 1554e1ab2f ALL: Silence a ton of warnings 2011-03-25 07:42:03 +08:00
Giulio Camuffo e89ca555ef ObjectManager uses a new T::restoreObject(SaveGame*) function to restore saved objects.
This function replaces newObject() and allows more flexibility.
2011-03-21 06:46:35 +08:00
Giulio Camuffo 59dcece9ae Working savegame support.
Implemented also the movement of Manny's head when looking at usable items.
This commit also introduces a new Object class with a ObjectPtr used for
caching the resources loaded by ResourceLoader. This fixes also the lipsync
regression.
2011-03-21 05:41:30 +08:00
Pawel Kolodziejski 8c0ae1c771 fix restore longest string,
fix terminating end of string
2009-12-03 17:18:24 +00:00
Pawel Kolodziejski 788713d3b4 fix warnings 2009-10-17 12:48:23 +00:00
Pawel Kolodziejski a93763eeb7 fixed warnings 2009-06-21 08:12:49 +00:00
Pawel Kolodziejski 75ff27666b adopted save/restore lua state to recent changes based on disassembly 2009-06-18 16:23:25 +00:00
Pawel Kolodziejski 3a2d539f09 re-implemented multi threading in lua based on disassembly 2009-06-16 22:55:12 +00:00
Pawel Kolodziejski 807fffbbfa remove L macro 2009-06-11 07:01:01 +00:00
Pawel Kolodziejski 8f85c9d8da * register fallback funcs
* default rest of userdata types
2009-05-30 21:05:58 +00:00
Pawel Kolodziejski 8b8e7e07d2 added namespace Grim 2009-05-25 06:49:57 +00:00
Pawel Kolodziejski a34d883844 update path includes for recent directory changes 2009-05-24 19:13:58 +00:00
Pawel Kolodziejski f58c073a0a move/rename engine into engines/grim 2009-05-24 18:55:19 +00:00