Bastien Bouclet
79547a9a21
GRIM: Add the fallback functions to lua when initializing for the second time
...
Fixes saving after returning to launcher and running the game a second time.
2016-07-21 21:41:17 +02:00
Christian Krause
ff74216678
LUA: Fix copy'n'paste error
2014-12-31 15:47:36 +01:00
Christian Krause
8ba97cb063
LUA: Fix memleak of lua file descriptors
...
- don't delete the common LuaFile objects (like g_fin, g_stdout, ...)
separately
- don't delete the LuaFile objects in closefile()
- delete all LuaFile objects in g_files at once in lua_iolibclose()
- for some objects LuaFile::close() is called twice (once by closefile()
and a second time by lua_iolibclose()) but this is uncritically due to
the way LuaFile::close() is implemented
2014-12-31 15:47:36 +01:00
Joseph Jezak
142adcfb8b
LUA: Make userdata print out a hex value like EMI.
2014-07-22 18:31:12 -04:00
Joel Teichroeb
0f3da43694
GRIM: Change NULL to nullptr.
2014-05-30 17:43:08 -07:00
Joel Teichroeb
b52e43049e
GRIM: Move include guards before any includes
2014-02-27 07:22:22 +00:00
Pawel Kolodziejski
9f54d1a56e
JANITORIAL: cleanup licences
2014-02-16 17:57:34 +01:00
Ori Avtalion
eed8769412
GRIM: Fix typos in include guards
2014-02-14 16:21:42 +02: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
Einar Johan Trøan Sømåen
2cee5eb06c
Merge pull request #784 from inguin/emi-pause-scripts
...
GRIM/EMI: Count pause/unpause calls of LUA scripts
2013-12-11 16:30:47 -08:00
Pawel Kolodziejski
1aaf6829c9
GRIM: precise lua header about modifications
2013-12-10 18:33:15 +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
aeda8c04ea
GRIM: Add a const_cast as making ts const is not worth the effort
2013-11-28 17:26:36 -08:00
Giulio Camuffo
be9b11570e
GRIM: Make the savegames compatible with 1.1 again. Bump to 22.9
...
New Lua's internal functions (int_funcs array in lbuiltin.cpp) must
be added to the bottom, and the savegame's minor version must
be increased.
2013-10-30 15:28:36 +01:00
Dries Harnie
8fda6792bc
EMI: Fix LUA stall in dlg_meathook2.lua.
...
The offending line is start_script(meathook:head_shake(...)).
This patch can be reverted once we patchr the offending line.
2013-08-04 16:05:54 +02:00
Dries Harnie
eaa887c8e3
EMI: Implement (un)pause_script
2013-08-04 14:27:30 +02:00
Joel Teichroeb
18c3940eba
GRIM: Clean up io_readfrom with suggestions from Coverity
2013-07-07 13:29:50 -07:00
Pawel Kolodziejski
068ff94d20
ALL: synced with ScummVM
2013-07-07 15:29:33 +02:00
Einar Johan Trøan Sømåen
ab34a830c1
GRIM: Avoid compressing LUA-output Savedata
2013-05-26 12:20:33 +02:00
Dries Harnie
f3be1c299f
GRIM: Fix Valgrind warning in start_script et al
2013-05-22 20:58:09 +02:00
Giulio Camuffo
c08c5aaa31
GRIM/Lua: Don't close the stdin and stdout files when setting them. Fix #711
2013-01-23 14:38:44 +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
Paweł Kołodziejski
175620b62a
ALL: change license headers from LGPL to GPL, and few updates
2012-12-19 23:15:43 +01: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
Dries Harnie
290392bbfc
EMI: Fix stack clobbering in io_writeto, io_appendto
2012-11-20 00:25:48 +01:00
Einar Johan Trøan Sømåen
c008e8a7dd
EMI: Fix .\saves\efmi.cfg-loading for EMI.
2012-11-14 01:27:02 +01:00
Dries Harnie
eda019ef86
EMI: Return current task for find_script()
2012-09-01 17:32:55 +02:00
Joel Teichroeb
115e3232b8
GRIM: Remove extra semicolons
2012-05-05 22:59:51 -07:00
Joel Teichroeb
e63eda39bc
GRIM: Remove old includes and their associated forbidden symbol exeptions
2012-05-05 22:32:21 -07:00
Joel Teichroeb
c9b33fc517
GRIM: Fix an error with patchr instead of detecting it later
2012-04-09 17:11:25 -07:00
Joel Teichroeb
0dcfaf8fb1
GRIM: Do not include unneeded headers
2012-04-04 16:11:05 -07:00
Joel Teichroeb
44efbccff4
GRIM: Fix casting away const
2012-04-03 16:58:04 -07:00
Joel Teichroeb
83a70dde4d
GRIM: Fix a memory leak closing files in lua
2012-03-24 16:53:01 -07:00
Paweł Kołodziejski
5d200347e6
COMMON, GRIM: fixed compilation after sync
2012-02-22 17:40:48 +01:00
Bastien Bouclet
00d756433f
GRIM: Add return to launcher support.
...
Also fix a memory leak, and reinitialize a global var in lua
2012-01-31 21:39:34 +01: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
Joel Teichroeb
aa814e3334
GRIM: Enhance the way that colors are given to lua.
2012-01-27 11:47:28 -08:00
Joel Teichroeb
d72bea895b
EMI: Implement sleep_for in the engine
2012-01-23 17:33:15 -08:00
Andrea Corna
235463e947
GRIM: Move some hacks from engine to patches
2012-01-06 23:01:29 +01:00
Pawel Kolodziejski
4fa79cd323
rename -> ResidualVM
2012-01-06 11:37:57 +01:00
Pawel Kolodziejski
f32c5b5fb1
GRIM: lua - fix missing break
2012-01-02 20:15:03 +01:00
Joel Teichroeb
3a61eaee8c
EMI: Make chores actually work and fix compile error. Also fix a warning
2011-12-23 11:58:35 -08:00
Joel Teichroeb
f94533e228
EMI: More work on getting EMI to do stuff
2011-12-21 20:35:37 -08:00
Joel Teichroeb
ee81d2bbb3
GRIM: Cleaned some dependancies between files
2011-12-17 21:48:17 -08:00
Giulio Camuffo
6a3cb32522
GRIM: Remove file added by mistake.
2011-12-17 12:10:29 +01:00
Giulio Camuffo
f2d7d127fc
GRIM: Make ResourceLoader able to open non-lab files. Fix credits.
...
The credits are read from the file credits/ingame.txt. Fix #228
2011-12-16 14:48:42 +01:00
Giulio Camuffo
353c42effe
GRIM: Use the new foreach macro.
...
Modify a bit PoolObject::Pool to allow it to be used with foreach.
2011-11-21 22:07:12 +01:00
Giulio Camuffo
7b1f87f928
GRIM: Boost of the debug system, using debug channels.
2011-10-10 18:17:22 +02:00