Commit graph

59 commits

Author SHA1 Message Date
CatWindow
be151cbfcc Sprite.smooth 2026-08-18 19:29:10 +03:00
CatWindow
529650b84c simple 3D 2026-08-16 16:14:35 +03:00
CatWindow
c7bbb02473 viewport rotation 2026-08-15 16:17:37 +03:00
CatWindow
c2fd913ff2 viewport scale and audio fix 2026-08-14 17:22:53 +03:00
DepressedTWM
885b56b3dc Test 2026-08-01 00:10:23 +04:00
niko(depressedTWM)
e14614a7a9 Replacing standart C library methods with SDL methods 2026-07-14 12:43:43 -04:00
Issac332
8727da2834 sigc is wrapped in signal.h, added the ability to move window from ruby 2026-07-13 02:05:46 +03:00
Issac332
681fc6a456 бырыбыб mirrors 2026-07-05 14:32:36 +03:00
Issac332
e33ba85c03 DYNAMIC LIGHT OMG MEOW MEOW MEOW 2026-07-01 00:00:07 +03:00
whitecum1488
ee3e60581c Глупенькие изменения гояью 2026-06-29 01:49:43 +04:00
Issac332
4f913f36b5 water optimizations 2026-06-22 16:58:57 +03:00
Issac332
1365577393 time in shaders 2026-06-10 20:27:57 +03:00
Issac332
9e29de6cae CRT shader, some pictures center and picture names debug 2026-06-10 00:04:26 +03:00
DepressedTWM
0ef68d8ad3 sprite.cpp cleanup 2026-06-03 09:10:33 -04:00
Issac332
5b18134bf0 Revert "Meow"
This reverts commit c5589bff11.
2026-05-31 20:37:15 +03:00
DepressedTWM
c5589bff11 Meow 2026-05-31 06:28:58 -04:00
Issac332
7763b998a6 Dynamic Water in Barrens and Glen 2026-05-28 22:42:10 +03:00
DepressedTWM
e4de91bde2 im looks like shit 2026-05-28 12:33:48 +04:00
Issac332
50edfe0e12 shader using 2026-05-27 19:38:45 +03:00
Issac332
04a964e45f WM effect and npc names debug 2026-05-26 17:25:33 +03:00
Issac332
da0fe12086 WME TRAVEL MENU lksxfjglk;jfsdgk;ljfsg;ljkhdfg;kljhdfsgjk;l
So far, only for barrens
2026-05-24 19:00:36 +03:00
DepressedTWM
acbac0b959 космитические изменения и обновление oneshot.conf 2026-05-19 08:27:52 +04:00
ZakatTeamI2P
cbac6c0c6f i hate ruby 2026-04-04 01:25:41 +04:00
ZakatTeamI2P
f7ab2765aa Kill me x2 2026-03-30 20:53:04 +04:00
Vinyl Darkscratch
8921e23ba5 Merge remote-tracking branch 'MKXP/master' into new-mkxp 2018-03-06 18:43:36 -08:00
Jonas Kulla
f172f58c74 Sprite: Fix regression with "mirror" attribute
FloatRect::hFlipped() returns a rectangle with negative width,
which was clobbered by the clamping further down.

Regression introduced in 55cec53911.
2017-08-10 21:39:17 +02:00
Jonas Kulla
fba20e6294 Sprite: Check for disposed state before accessing bitmap 2017-07-30 23:00:18 +02:00
Jonas Kulla
55cec53911 Sprite: Clamp src_rect to bitmap bounds 2017-02-17 19:29:38 +01:00
Mathew Velasquez
ba0203169e Added obscured/scratched window puzzle 2016-02-17 17:14:16 -05:00
Jonas Kulla
384249c31a Unify float literals to use f suffix and avoid double promotions
I might have missed some.
2015-07-21 12:13:24 +02:00
Jonas Kulla
87462fd7b0 Use more explicit vector math via method overloads 2015-02-10 17:04:00 +01:00
Jonas Kulla
4864f63c6c Sprite: Fix visibility calculation
The previous code assumed the scene origin to always be 0,0.
2015-02-04 15:17:45 +01:00
Jonas Kulla
3c0a530eba Sprite: Add special case shader for translucent effect
Translucent sprites (opacity < 255) are very common,
so using a custom shader instead of the full blown effect one
helps a lot, especially on mobile.
2014-12-31 18:52:19 +01:00
Jonas Kulla
11cfe887c2 Fix several classes not accepting disposed bitmaps
Fixes an error in Alpha Kimori.
2014-12-22 08:22:45 +01: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
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
f8c26fc515 Core/MRI: Fix handling of Etc/Font properties
The gist of it is that for Etc and Font props, the assignment
operator (eg. 'sprite.color=') does not take a reference of the
right hand parameter and replaces its previous one with it (this
was the old behavior). Rather, it keeps its internal property
object and copies the parameter object into it by value.
The getter is unchanged; it still returns a reference to the
internal property object.

s = Sprite.new
c = Color.new
s.color = c
p s.color == c # => true
p s.color.object_id == c.object_id # => false (true before)
c = s.color
p s.color.object_id == c.object_id # => true
2014-09-05 01:58:41 +02:00
Jonas Kulla
d8bb6aa2fc Replicate RMVX/VXA's broken sprite Z sorting implementation
Fixes Window_NameBox visual appearance in Skyborn.

Also nuke the second SceneElement constructor that has been
obsolete since the Tilemap mapViewport rewrite.
2014-08-31 01:10:32 +02:00
Jonas Kulla
55f1542c76 Merge separate RGSS version build configs into one
Setup active RGSS version at runtime. Desired version can be
specified via config, or as default, auto detected from the game
files. This removes the need to build specifically for each
version, which should help packaging a lot.

This also greatly reduces the danger of introducing code that
wouldn't compile on all RGSS version paths (as certain code paths
were completely ifdef'd out).

This can be optimized more, eg. not compiling shaders that aren't
needed in the active version.
2014-08-28 23:22:05 +02:00
Jonas Kulla
b1981055e1 Core: Remove ifdefs that don't influence RGSS specific behavior
This is the first step in eliminating the build time RGSS
versioning.
2014-08-28 19:43:13 +02:00
Jonas Kulla
e208bc49e8 Sprite: Implement Y based Z draw ordering (RGSS2)
If two sprites have the same Z, their order is decided based
on their Y coordinate first, and only then (if equal) by creation
time.
2014-08-16 16:12:51 +02:00
Jonas Kulla
840ecee084 Fix 'uninitialized value used' warnings 2014-08-16 11:47:07 +02:00
Jonas Kulla
d128375d62 DisposeWatch: Make private and constify members 2014-08-12 21:41:59 +02:00
Jonas Kulla
e858bbdcf5 Lift 'Disposable' concept from core into bindings
Instead of replicating the RGSS Disposable interface in C++
and merely binding it, redefine the 'disposed' state as the
entire core object being deleted (and the binding object's
private pointer being null).

This makes the behavior more accurate in regard to RMXP.
It is now for example possible to subclass disposable classes
and access their 'dispose'/'disposed?' methods without
initializing the base class first (because the internal pointer
is simply null before initialization). Accessing any other
base methods will still raise an exception.

There are some quirks and irregular behavior in RMXP; eg.
most nullable bitmap attributes of disposable classes
(Sprite, Plane etc.) can still be queried afterwards, but
some cannot (Tilemap#tileset), and disposing certain
attributes crashes RMXP entirely (Tilemap#autotiles[n]).
mkxp tries to behave as close possible, but will be more
lenient some circumstances.

To the core, disposed bitmap attributes will look
identically to null, which slightly diverges from RMXP
(where they're treated as still existing, but aren't drawn).
The Disposable interface has been retained containing a
single signal, for the binding to inform core when
objects are disposed (so active attributes can be set to null).
2014-08-09 21:21:38 +02:00
Jonas Kulla
af9039f58d Sprite: Implement wave effect (RGSS2)
This initial implementation emulates the way RMVX splits
the sprite into "chunks" of about 8 pixels, which it then
scrolls left/right on a vertical sine wave. It even
replicates the weird behavior when wave_amp < 0, namely
"shrinking" the src_rect horizontally.

As with bush_opacity, this effect in combination with
rotation will render differently from RMVX.
2014-02-03 15:32:50 +01:00
Jonas Kulla
e0a4dfe372 Bitmap: Make #get_pixel/#set_pixel more accurate
This gets rid of the "batch/flush" semantics for #set_pixel
and instead just directly uploads the pixel color to the
texture, circumventing the float conversion entirely.
Also makes a lot of code simpler in many places as calling
'flush()' is no longer required for bitmaps.
2014-01-31 10:19:16 +01:00
Jonas Kulla
2adf8ab265 Transition from QtCore to stdc++ / STL / boost
This looks like a pretty major change, but in reality,
80% of it is just renames of types and corresponding
methods.

The config parsing code has been completely replaced
with a boost::program_options based version. This
means that the config file format slightly changed
(checkout the updated README).

I still expect there to be bugs / unforseen events.
Those should be fixed in follow up commits.

Also, finally reverted back to using pkg-config to
locate and link libruby. Yay for less hacks!
2013-12-29 13:59:26 +01:00
Jonas Kulla
0035c23641 Shader: Group all shaders in one collective struct
Makes sharedstate.{cpp|h} a lot easier to read, and
adding new shaders a one liner.
2013-12-11 05:22:13 +01:00
Jonas Kulla
8ac70b7879 Sprite: Perform CPU visibility culling 2013-12-06 15:55:18 +01:00
Jonas Kulla
6e3b1d9466 Sprite: Don't draw when opacity == 0 2013-12-05 18:27:53 +01:00