Commit Graph

908 Commits

Author SHA1 Message Date
Jonas Kulla 05b32d76ca Minor cleanup 2014-10-25 23:38:19 +02:00
Jonas Kulla c9d5059238 Pass value object attributes by reference (instead of pointer)
This underlines that no reference inside the setter is taken,
and that these attributes are non-nullable.

Also removes a couple of superfluous attribute macros.
2014-10-25 23:33:41 +02:00
Jonas Kulla 5549ff78f0 Bindings: Viewport: Don't dispose children in RGSS2/3 2014-10-24 18:55:03 +02:00
Jonas Kulla 1a489aafaf Bindings: Fix inconsistency in Viewport dispose (RGSS1)
As noted, on Viewport dispose, RMXP always calls the core
dispose method for child objects regardless of whether
user scripts override it in sub classes.

Implement this behavior in mkxp to prevent infinite recursion.
2014-10-24 18:35:05 +02:00
Jonas Kulla 8b31f97bb4 MRuby: Fix compilation 2014-10-24 18:26:10 +02:00
Jonas Kulla ecf9b065c8 MRI: Revise 'MKXP.data_directory' behavior
This function which was formerly a simple wrapper around
SLD_GetPrefPath() is changed to instead return the directory
assembled from org/app name specified in mkxp.conf, so one
can be sure that both mkxp and user scripts will always write
into the same directory when a custom path is preferred.
2014-10-22 04:16:15 +02:00
Jonas Kulla af8f3a36d2 MRI: Move former 'System' module into 'MKXP' module
This breaks script compatibility.

'System' is way too generic of a name to reserve for mkxp use,
and I have already seen at least one occurance in the wild of
it being used by user scripts.

Ideally, all mkxp RGSS extensions would be moved under this
module, but I feel like the core modules (Input, Graphics etc)
are more safe as users are hesitant to directly extend these.
2014-10-22 04:15:40 +02:00
Jonas Kulla 8e1852a281 Remove left-over dead code 2014-10-21 19:51:08 +02:00
Jonas Kulla 4a8b0f30c8 MRI: Add 'System.raw_key_states' to query full keyboard state
Returns a byte array with all key states (0 = released,
1 = pressed) indexed via SDL_SCANCODE_* enums.
2014-10-20 10:27:01 +02:00
Jonas Kulla e44a1e32fa Reorder some lines 2014-10-20 10:20:08 +02:00
Jonas Kulla 6145c59305 fluid-fun: Don't dlclose libfluidsynth, ever
Some versions of the library do nasty things with thread
local storage without cleaning up after themselves.
2014-10-20 10:17:48 +02:00
Jonas Kulla 1c1d72b03e README: VX / VX Ace support is no longer experimental 2014-10-18 02:21:19 +02:00
Jonas Kulla e1a45c29e2 README: Add OSX build by Ali and clarify SDL2 patch note 2014-10-18 02:15:00 +02:00
Jonas Kulla 5094f5c7c1 Add minor assert 2014-10-16 09:10:27 +02:00
Jonas Kulla 47851718eb MRI: Handle exceptions raised in preloaded scripts 2014-10-15 06:27:43 +02:00
Jonas Kulla 2cd70b9edd Window: Don't update anything if width*height == 0
Fixes GL errors.
2014-10-15 06:26:46 +02:00
Jonas Kulla 19b1c3d7c2 README: Mention SDL patch needed for F1 menu 2014-10-12 14:54:30 +02:00
Jonas Kulla 64a26b4911 README: Add link to prebuilt binaries 2014-10-12 02:38:28 +02:00
Jonas Kulla dd73db2e9d Introduce F1 menu to reconfigure key bindings at runtime 2014-10-11 20:48:44 +02:00
Jonas Kulla af145c3a01 mkxp.pro: Make MRI version a qmake config option
Example: qmake MRIVERSION=2.2
2014-10-11 15:36:21 +02:00
Jonas Kulla 520162f36a Use safe way to get at a vector's data pointer
&std::vector<C>[0] is not guaranteed to not throw if the
vector is empty. Better safe than sorry.
2014-10-09 19:02:29 +02:00
Jonas Kulla 1b7ed5ed78 Font: Fix default 'shadow' value for RGSS1 2014-10-09 18:53:24 +02:00
Jonas Kulla 0c08fc2d16 gl-fun.h: Fix function type signature 2014-10-06 21:10:19 +02:00
Jonas Kulla 18076c9ae4 Merge branch 'master' of github.com:Ancurio/mkxp
Conflicts:
	src/tileatlasvx.cpp

I fucked up somehow.
2014-10-03 20:21:07 +02:00
Jonas Kulla c1d89e4f8d CMakeLists.txt: Bump default MRI version to 2.1 2014-10-03 20:15:52 +02:00
Jonas Kulla 55a2cf562e TileAtlasVX: Followup fix
Use rectangle intersection to correctly clip source
rectangles with origin != (0,0).
2014-10-03 06:58:54 +02:00
Jonas Kulla df73045d81 TileAtlasVX: Followup fix
Use rectangle intersection to correctly clip source
rectangles with origin != (0,0).
2014-10-03 06:51:39 +02:00
Jonas Kulla db78e55371 TileAtlasVX: Clamp blit src rect to tileset bitmap size 2014-10-02 16:41:53 +02:00
Jonas Kulla 95cda4035e fluid-fun: Fix fluidsynth soname on OSX 2014-10-01 19:19:25 +02:00
Jonas Kulla 7b65977eb9 Silence "uninitialized" warnings 2014-10-01 06:29:47 +02:00
Jonas Kulla fa911b8018 gl-fun: Don't rely on SDL_opengl.h for function type definitions 2014-10-01 04:48:23 +02:00
Jonas Kulla 5ea964eee8 CMakeLists.txt: Link against libiconv on OSX 2014-09-30 14:17:33 +02:00
Jonas Kulla 51a0f3903c Audio: Clean up threading and add AudioStream fadein (RGSS3) 2014-09-30 09:13:12 +02:00
Jonas Kulla 46497eae01 CMakeLists.txt: Add missing shader source 2014-09-30 01:34:10 +02:00
Jonas Kulla 3dd703f732 MRI: Use ruby 2.0 compatible function name 2014-09-30 00:48:22 +02:00
Jonas Kulla 4a015c6397 Bitmap: Add font shadow rendering 2014-09-29 10:30:41 +02:00
Jonas Kulla 9e64dff01c Bitmap: Fix mem leak 2014-09-29 10:30:16 +02:00
Jonas Kulla 9758e660c4 Tilemap/VX: Ensure proxy objects don't outlive their parents
Either of these would previously crash (same for VX):

tm = Tilemap.new
at = tm.autotiles
tm = nil
GC.start
at[0] = Bitmap.new(1, 1)

tm = Tilemap.new
at = tm.autotiles
tm.dispose
at[0] = Bitmap.new(1, 1)

Funnily, this makes RMXP itself crash too, but crashing is
never acceptable except for possibly resource exhaustion.
2014-09-26 18:21:50 +02:00
Jonas Kulla e9d0d0566b RGSSError is a subclass of StandardError 2014-09-26 18:20:27 +02:00
Jonas Kulla d223d83cbf Implement F12 game reset (MRI only)
Can be disabled with "enableReset=false".

While at it, also replace the flakey volatile bool flags
with proper atomics.
2014-09-26 06:25:47 +02:00
Jonas Kulla 3a2e560139 Input: Fix default keybinds 2014-09-26 06:25:47 +02:00
Jonas Kulla 2550fd8ccc WindowVX: Initialize all dirty flags and connect tmp tone 2014-09-26 06:24:43 +02:00
Jonas Kulla 81ac0780f8 Revert Disposable concept back into core
Pretty much a revert of
e858bbdcf5.

We need this in core to properly implement F12 reset.
2014-09-23 21:12:58 +02:00
Jonas Kulla 3983fe66e9 Config: Print parsing errors instead of ignoring them 2014-09-23 19:23:11 +02:00
Jonas Kulla 17efcbbbbd tl;dr: I fucking suck at coding (fix double free)
MRI: Filesystem: A garbage collected SDL_RWops file handle
will call close on itself even if 'close' was explicitly
called on it on the script side before.
2014-09-23 17:26:30 +02:00
Jonas Kulla 8d67b7c91d MRI: Init default font names to correct value (RGSS2) 2014-09-23 12:05:28 +02:00
Jonas Kulla 5c3c73ee94 README: Remove erroneous line about cmake 2014-09-15 09:42:09 +02:00
Jonas Kulla 3a29385df0 MRI: load_data: Catch exceptions and pass onto ruby 2014-09-13 07:26:42 +02:00
Jonas Kulla 05041fdb03 Couple fixes to last SDL_sound patch 2014-09-13 07:26:42 +02:00
Jonas Kulla 61b77c2027 Merge pull request #69 from cremno/check-ruby-string-for-embedded-null-bytes
MRI: check Ruby strings for embedded null bytes
2014-09-12 23:30:07 +02:00