Commit graph

81 commits

Author SHA1 Message Date
Issac332
e33ba85c03 DYNAMIC LIGHT OMG MEOW MEOW MEOW 2026-07-01 00:00:07 +03: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
DepressedTWM
8d263cd046 Small changes bcz im stupiid and trash 2026-06-01 23:49:16 +03: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
bdac3bb955 dynamic water 2026-05-29 22:02:33 +03:00
DepressedTWM
749e97eebd Полировка движка 2026-05-28 18:19:24 +04:00
DepressedTWM
e4de91bde2 im looks like shit 2026-05-28 12:33:48 +04:00
ZakatTeamI2P
245b7f7153 a 2026-05-20 18:33:29 +04:00
DepressedTWM
f216f616a0 Оптимизация потребления ОЗУ(на байт 20 +-) 2026-05-19 23:26:08 +04:00
ZakatTeamI2P
908e9d7bca meow 2026-05-19 14:09:39 +04:00
DepressedTWM
acbac0b959 космитические изменения и обновление oneshot.conf 2026-05-19 08:27:52 +04:00
DepressedTWM
d5bb0f501a School is soooooo boooorrrrriiiiiinnnngggf 2026-05-18 09:50:04 +04:00
ZakatTeamI2P
c2af9b3ff9 im so shitttyyyy 2026-05-15 23:56:06 +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
Mathew Velasquez
5ff71744b5 Rudimentary map wrapping added 2016-01-05 14:50:18 -05:00
Mathew Velasquez
10f3419ac6 Maps no longer wrap at edges, but display blank tiles 2016-01-05 14:50:18 -05:00
Mathew Velasquez
3d2d1a9150 Manually rebased over latest mkxp commit. Some features, such as lighting, are not reimplemented yet. 2016-01-05 14:50:17 -05:00
Jonas Kulla
30465691ae Tilemap: Fix map viewport calculation
Calculation was completely off as it didn't take into
account the imposed viewport origin.

All in all, similar fixes as the previous ones to TilemapVX.
2015-07-21 12:13:25 +02: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
c63a8947ce Tilemap: Don't emit draw with zero quads
This is illegal on some mobile drivers.
2015-01-02 00:09:53 +01:00
Jonas Kulla
b42725ea20 Add config option working around buggy graphics drivers
"subImageFix=true" should fix missing text on radeonsi fglrx
as well as most mobile drivers. Also fixes tileset atlas on
mobile.
2015-01-01 23:38:11 +01:00
Jonas Kulla
60f101f2e6 Tilemap(VX): Factor out common code into tilemap-common.h
Renamed flashmap.h to tilemap-common.h as it already contained
shared functions.
2014-11-30 17:46:28 +01:00
Jonas Kulla
577f606dac Tilemap: Factor out flash tile code
This will be reused later in TilemapVX.
2014-10-26 20:00:56 +01: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
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
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
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
28421a0ce5 Tilemap: Remove RGSS2 viewport setter
This class is not used in RGSS2 at all.
2014-08-28 15:37:04 +02:00
Jonas Kulla
724d52f61e Tilemap: Finally get rid of that terrible name 'ScanRow'
Replacement: ZLayer
I'd really have loved to have used something alluding to physical
roof tiles (as that's the closest image I have to them), but without
reusing the word "tiles".. yeah, impossible.
2014-08-17 03:58:01 +02:00
Jonas Kulla
4742226e7c Tilemap: Fix typo 2014-08-15 15:20:32 +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
813130fbf6 More size_t fixes 2014-07-19 02:58:57 +02:00
Jonas Kulla
b8d861b4cd gl-util.h: Remove wrappers for things abstracted via GLMeta 2014-07-16 05:22:43 +02:00
Jonas Kulla
bae977d4ab GLMeta: "Finish" -> "End" 2014-07-16 04:53:08 +02:00
Jonas Kulla
a26c73930d GLMeta: Add framebuffer blitting support 2014-07-16 04:48:40 +02:00
Jonas Kulla
97708d25b6 Tilemap: Reduce a few unnecessary blits
No need to replicate static autotiles if we're not animating
at all.
2014-07-13 14:05:56 +02:00
Jonas Kulla
efb2fd2695 GLMeta: Add vertex array object support 2014-07-13 14:05:12 +02:00
Jonas Kulla
b73461721c Add meta path with fallback for EXT_unpack_subimage parameters 2014-07-13 05:51:04 +02:00
Jonas Kulla
a541cb1205 Some RGSS2/RGSS3 compile fixes 2014-07-13 05:34:18 +02:00
Jonas Kulla
91aefdc17a Tilemap: Fix map wrap around 2014-07-11 08:43:39 +02:00
Jonas Kulla
caae9c5689 Wrap IBO index type into one definition
Makes it easier to switch between types (eg. 32 -> 16 bit).
2014-07-11 02:09:53 +02:00
Jonas Kulla
295e0e5b15 Tilemap: Rewrite to only process and render visible region
Previously, on creation, we would parse the entire map data,
translating it into and uploading vertices once, then rendering
the entire map on every draw (to keep the draw calls minimal).
This worked great for smaller and medium sized maps, but starting
with larger maps (200x200+) it doesn't scale as the GPUs vertex
processing/culling is overwhelmed by the amount of data each frame.

This rewrite instead changes the strategy to only processing and
uploading a small subregion of the map (the currently visible part)
and regenerating all buffers if this subregion changes. The amount
of data transferred is small enough that it can be done every frame
without causing lag.

The changes also have the convenient side effect that we no longer
require 32 bit indices in mkxp, easing the road to possible GLES2
support in the future.
2014-07-11 02:00:30 +02:00
Jonas Kulla
56226c40c6 Tilemap: Use vertex shader based autotile animation strategy
Previously, we would just stuff the entire tilemap vertex data
four times into the buffers, with only the autotile vertices
offset according to the animation frame. This meant we could
prepare the buffers once, and then just bind a different offset
for each animation frame without any shader changes, but it also
lead to a huge amount of data being duplicated (and blowing up
the buffer sizes).

The new method only requires one buffer, and instead animates by
recognizing vertices belonging to autotiles in a custom vertex
shader, which offsets them on the fly according to the animation
index.

With giant tilemaps, this method would turn out to be a little
less efficient, but considering the Tilemap is planned to be
rewritten to only hold the range of tiles visible on the screen
in its buffers, the on the fly offsetting will become neglient,
while at the same time the amount of data we have to send to the
GPU everytime the tilemap is updated is greatly reduced; so a
net win in the end.
2014-07-06 19:44:19 +02:00
Jonas Kulla
6c481e5eb8 Eliminate GLEW dependency
GL entrypoint resolution is now done manually. This has a couple
immediate benefits, such as not having to retrieve hundreds of
functions pointers that we'll never use. It's also nice to have
an exact overview of all the entrypoints used by mkxp.

This change allows mkxp to run fine with core contexts, not sure
how relevant that is going to be in the future.

What's noteworthy is that  _all_ entrypoints, even the ones core
in 1.1 and guaranteed to be in every libGL, are resolved
dynamically.
This has the added benefit of not having to link directly against
libGL anymore, which also cleans up the output of `ldd` quite
a bit (SDL2 loads most system deps dynamically at runtime).

GL headers are still required at build time.
2014-06-13 18:46:45 +02:00
Jonas Kulla
2cc2ebca31 GLState: Get rid of GL_TEXTURE_2D enable/disable
This bit was deprecated/removed in core GL.

There was only one place where this was used (flash tiles
in Tilemap), and since the full shader rewrite, it was
effectively a no-op anyway (flash shader doesn't sample texture).
2014-05-30 23:13:58 +02:00