Commit graph

69 commits

Author SHA1 Message Date
Ilari Liusvaara
5ee9514791 Don't extern lsnes_lua_state, it is only used in one file 2014-05-10 11:28:11 +03:00
Ilari Liusvaara
ceed4f622f Merge multiple versions of get_read_address() into one 2014-04-21 15:54:36 +03:00
Ilari Liusvaara
f2e1930909 Lua: (D)BITMAP:draw_clip, (D)BITMAP:draw_outside, TILEMAP:draw_outside 2014-04-03 00:59:05 +03:00
Ilari Liusvaara
5d0fb0f39a Error out creating too large bitmaps / tilemaps instead of corrupting memory 2014-03-31 14:15:24 +03:00
Ilari Liusvaara
7ba7fc24f6 Use overcommit for palettes, bitmaps, dbitmaps and tilemaps
This makes the large size of these objects visible to Lua, hopefully
allowing Lua GC to make better decisions.
2014-03-31 12:42:33 +03:00
Ilari Liusvaara
e0827ce54f Add base support for Lua object overcommit 2014-03-31 11:31:25 +03:00
Ilari Liusvaara
b367334238 Only update emulator status from within update_movie_state() 2014-03-28 12:36:21 +02:00
Ilari Liusvaara
4f0e636b9b Refactor workthread.hpp and threadtypes.hpp (renamed to threads.hpp)
Also rename all variables and fields named "mutex" (gdb does not like
that name).
2014-03-23 09:45:42 +02:00
Ilari Liusvaara
c685319f88 Lua: Clean up region bounds computation 2014-02-18 20:26:50 +02:00
Ilari Liusvaara
9bd1791701 Lua: Don't run Lua until the emulator has fully started up 2014-02-15 13:51:39 +02:00
Ilari Liusvaara
ef1f61a6e7 Lua: COMPARE_OBJ: Check strided memory block for modifications 2014-02-14 22:22:45 +02:00
Ilari Liusvaara
d1176cbf9e Lua: memory2: More functions corresponding to memory.* 2014-02-13 13:48:01 +02:00
Ilari Liusvaara
3e92462a3d Dynamically allocate moviefile, rrdata and movie structures 2014-02-02 18:35:36 +02:00
Ilari Liusvaara
9a9f58d747 lua_func_callback isn't used anymore, remove it 2014-01-30 00:44:42 +02:00
Ilari Liusvaara
85d78e2632 Lua: Give the print method as pointer instead of assuming T::print 2014-01-29 11:32:52 +02:00
Ilari Liusvaara
53d7bbd633 Lua: Make class methods take lua::parameters 2014-01-28 14:38:25 +02:00
Ilari Liusvaara
b7ea7bb2c7 Lua: cleanup some more files 2014-01-26 17:42:22 +02:00
Ilari Liusvaara
676dfe7ac8 Lua: Refactor classes
- Support static methods for classes
- Allow Lua to enumerate static and class methods
- Support dynamic class lookup
- Support class groups (in style of function groups)
2014-01-25 16:30:25 +02:00
Ilari Liusvaara
94114f1e2e Lua: Refactor lots of stuff
- Split lua-base.hpp into number of files.
- New Lua function parameters parser.
- Convert some Lua code files in order to test the stuff
2014-01-25 12:51:13 +02:00
Ilari Liusvaara
b54a776f13 Lua: Scaling blits, color priority blits, Porter-Duff blits 2014-01-22 19:18:03 +02:00
Ilari Liusvaara
4bb75bc30e Lua: gui.set_video_scale() 2014-01-17 22:19:50 +02:00
Ilari Liusvaara
43952138a3 Lua: Bitmap/renderq object methods 2013-12-23 16:32:11 +02:00
Ilari Liusvaara
2c4a3a5f84 Refactor library Lua base to dedicated namespace 2013-12-20 02:02:22 +02:00
Ilari Liusvaara
dce933b76d Refactor library framebuffer to dedicated namespace 2013-12-19 07:00:43 +02:00
Ilari Liusvaara
69f06ce1b0 Remove some crazy dependencies to keymapper 2013-12-19 02:58:22 +02:00
Ilari Liusvaara
dd486e7ff8 Refactor library keyboard to dedicated namespace 2013-12-19 01:05:48 +02:00
Ilari Liusvaara
c9636bc63d Lua: Zip create / enumerate 2013-12-16 18:21:39 +02:00
Ilari Liusvaara
5661c7ca59 Save bitmaps as PNG
Also:
- Refactor PNG code to have PNG writing support
- Add functions to dump SNES sprites and palettes
2013-10-28 21:15:08 +02:00
Ilari Liusvaara
1d2df8ebea Support latch notifications on SNES
This patch is so large since it adds support for passing arguments to
the Lua callback, even if SNES doesn't use those.
2013-10-27 14:41:28 +02:00
Ilari Liusvaara
59ef6961e3 Merge branch 'rr1-maint' 2013-09-27 10:47:19 +03:00
Ilari Liusvaara
a42c0bf6ea Extend userdata printing 2013-09-27 10:36:19 +03:00
Ilari Liusvaara
ba1d20dda5 Lua: print() can print any type, add tostringx() for print-to-string 2013-09-27 04:15:13 +03:00
Ilari Liusvaara
9092dea931 Lua: Automatically pass Lua state to lua class ctors 2013-08-21 23:19:20 +03:00
Ilari Liusvaara
7026453768 Lua: gui.synchronous_repaint() 2013-08-21 04:14:53 +03:00
Ilari Liusvaara
212c819416 Lua: gui.kill_frame: Omit this frame from video dump 2013-08-08 20:41:29 +03:00
Ilari Liusvaara
11655fb0d8 Split callback and load functions to their own categories 2013-08-07 22:10:58 +03:00
Ilari Liusvaara
b3f8f7f1b7 Decouple sets of functions from Lua states 2013-08-07 17:31:09 +03:00
Ilari Liusvaara
59710f8f38 Merge branch 'rr1-maint' 2013-07-24 19:57:08 +03:00
Ilari Liusvaara
79dd270a7e Lua methods for handling movies as objects 2013-07-24 19:03:48 +03:00
Ilari Liusvaara
15679e0776 Lua: Don't crash if some method throws 2013-07-23 13:01:47 +03:00
Ilari Liusvaara
ff86d2f0c2 Merge branch 'rr1-maint' 2013-07-17 22:58:24 +03:00
Ilari Liusvaara
a8a1f09e94 Lua: Allow direct loading of PNG/PAL/BITMAP from string 2013-07-17 22:28:54 +03:00
Ilari Liusvaara
985e4c6327 Merge branch 'rr1-maint'
Conflicts:
	src/lua/lua.cpp
2013-05-30 04:17:03 +03:00
Ilari Liusvaara
015bd796f6 Save/Restore host memory across UNSAFEREWINDs 2013-05-30 04:13:59 +03:00
Ilari Liusvaara
efc06d1f10 Merge branch 'rr1-maint'
Conflicts:
	manual.txt
	src/core/controller.cpp
	src/lua/dummy.cpp
	src/lua/input.cpp
	src/lua/lua.cpp
	src/platform/wxwidgets/mainwindow.cpp
2013-03-03 09:37:52 +02:00
Ilari Liusvaara
dca767f650 Lua: on_button and input.veto_button 2013-03-03 09:09:41 +02:00
Ilari Liusvaara
1295518041 More paint / reset fixes
- Refactor the code related to killing requests.
- Free the pins when destroying killed requests (otherwise memory will
  leak).
- Customfont texts have associated requests, so those need to be killed
  if the font goes away.
2013-02-28 10:36:57 +02:00
Ilari Liusvaara
236b9075d9 Merge branch 'rr1-maint'
Conflicts:
	include/core/framebuffer.hpp
2013-02-28 04:06:37 +02:00
Ilari Liusvaara
80c9dcee2d Fix crash with bitmaps and resetting Lua VM
Kill requests depending on bitmaps and palettes going away, to avoid
having the emulator crash if there is a request using those bitmaps
and palettes in flight while Lua VM is reset.

Noticed by FatRatKnight.
2013-02-28 04:03:01 +02:00
Ilari Liusvaara
8c346c0695 Lua: Fix bug with methods and resetting Lua VM 2013-02-01 22:10:01 +02:00