1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00
Commit graph

1104 commits

Author SHA1 Message Date
fgenesis
bd5b2b3495 Rework + optimize map tile storage & rendering, initial working draft.
class Element is completely gone.
(The files are still there but no longer compiled in. Will delete later)

Broken still:
- support for vertical flip
- the editor
- culling
2023-07-14 00:19:33 +02:00
fgenesis
e8c405cd9e more drafting for tile redering optimization
This is the last commit before the old Element class gets ripped
2023-07-11 22:30:28 +02:00
fgenesis
0818fbcdb4 fix worldmap selected tile not rendering properly 2023-07-11 04:39:55 +02:00
fgenesis
ff3ae5a0c4 fix tile effects 5 & 6 (wavy when passing by)
This only used to work because grid updates via tile effect wavy did
not set the update flag, so the grid didn't update itself afterward,
resetting the prev. written walues
2023-07-11 03:52:22 +02:00
fgenesis
6686080ddb invert two x,y loops for more efficient grid updating 2023-07-11 03:49:49 +02:00
fgenesis
d94219e91c restore water surface wobbling 2023-07-10 17:24:02 +02:00
fgenesis
976ce8ff3e split grid rendering off from Quad, to a new RenderGrid class 2023-07-10 17:23:19 +02:00
fgenesis
0f0f3e9023 fix typo that never loaded tileset idx 0 2023-07-10 16:28:04 +02:00
fgenesis
ca14476514 implement editor function to move everything on a map 2023-07-10 02:30:19 +02:00
fgenesis
c09098e13c wip towards Element draw refactor; still using old render path 2023-07-10 02:29:21 +02:00
fgenesis
578c8ecc45 remove parallax settings from config
there's no reason for this to exist, at all
2023-07-05 03:59:41 +02:00
fgenesis
1b02efc96d Fix wrong tile rotation due to fix in 4b52730be2
I'm very, VERY sorry for this but can't think of anything better
that is transparent and also preserves backwards compat.
2023-07-03 19:51:33 +02:00
fgenesis
4b52730be2 Fix parallax horizontal flip rotation bug, but now maps are wrong
Unfortunatelx maps were designed with this bug present,
and now tile rotation on parallax layers is wrong for flipped tiles.
This also affected background fish swarms and anything that
was on a parallax layer and flipped horizontally.
Need to fix maps next...

See also: commit 76ba2b1211
2023-07-03 19:00:12 +02:00
fgenesis
9d7dbe5435 Remove unused maxZoom attrib and related code 2023-07-03 18:37:57 +02:00
fgenesis
69ffb75746 Remove unused Quad, Element tags from map, and worldMapIndex attrib 2023-07-03 18:34:59 +02:00
fgenesis
27f7e2f014 Remove support for unused map bg, bg2, bgRepeat, backdrop and related code
In the map XML file, also <Level ...> attribs of the same name.
Some old maps had those, but either the maps were unused,
or the respective graphics never visible.
2023-07-03 18:28:15 +02:00
fgenesis
aaed341569 Cleanup underwater checks, fix rectangular water bubbles
Long/thin rectangular nodes were not handled correctly,
because it would only check the nearest waterbubble node
for overlap, not all on the map.

+ Lua func: isUnderWater(x, y, radius)
2023-06-23 15:05:05 +02:00
fgenesis
5e75bc486c fixup core resource (un/re)load 2023-06-23 14:27:41 +02:00
fgenesis
825670f651 More fixes for breakage introduced in 70b8dcdc3a:
- fix typo that broke repeat-scale loading
- fix broken tile effects loading
- fix randomly shuffled world map tiles (as textures were loaded in a random order)
- reload tileset on editor reload (because we want to edit textures duh)
2023-06-02 01:32:37 +02:00
fgenesis
478857f149 Quad texture coords are never interpolated, make those a normal Vector 2023-06-01 20:24:14 +02:00
fgenesis
3ba31b6aa0 remove bool Element::elementActive, use _hidden instead
Element is always alone, never has parent or children,
and can use the normal RenderObject::_hidden logic
to determine visibility and update calls.
2023-06-01 20:23:34 +02:00
fgenesis
76b391e1fc hide the cursor layer when taking screenshot 2023-06-01 20:20:30 +02:00
fgenesis
fc76b2de12 fix hidden checks, oops
Turns out any part of the hierarchy can be hidden, not just the parent.
Esp. the game menu does this.
2023-06-01 20:19:37 +02:00
fgenesis
36ea0fb8fb oops 2023-06-01 13:49:22 +02:00
fgenesis
f15771f79b skip an extra 1 second black-screen time on startup whenever possible
The transition time is still there when entering the title
from another game state where it makes sense;
especially the intro.
2023-06-01 13:04:57 +02:00
fgenesis
d740aa06e1 very slightly more verbose loading 2023-06-01 12:59:07 +02:00
fgenesis
263bff3659 update precacher.txt, file is now in the repo, and speedup loading a little bit more on slow machines 2023-06-01 12:58:00 +02:00
fgenesis
e5fad1e72e fix harmless typo added in 70b8dcdc3a91c9; kill unused variable 2023-06-01 04:41:13 +02:00
fgenesis
e00940b2ae better way to skip the logo; do post-load transitions in a single place now 2023-06-01 04:19:41 +02:00
fgenesis
b9798a1889 tweaks to loading screen; skip short logo entirely because even waiting 2 seconds for nothing is unnecessary 2023-06-01 03:56:26 +02:00
fgenesis
ccd22f2015 Can now quit the intro sequence on Esc (finally!)
Apparently this was planned, but never worked.
Also removed watch() canQuit parameter because during watch(),
input is disabled.
Moved the quitting logic to DSQ::run() and added the canQuit param there.
Game still didn't get the ACTION_ESC for some reason so an extra check for
a raw Esc keypress seems like a good solution.

Game scripts calling watch() and watchForVoice() never used the canQuit
parameter (presumably because it was broken?) so i've felt it's an ok
thing to take it out completely.
2023-06-01 02:31:50 +02:00
fgenesis
1743e1a996 script compat: entity_toggleBone() and Lua platform detection is deprecated; forgot newproxy() is a valid Lua 5.1 function 2023-05-31 18:10:55 +02:00
fgenesis
d1cbc6f783 support loading *.qoi images
Now png/qoi/jpg are supported, and some subset of tga
because we need that to load zga files for savegame thumbnails
2023-05-31 18:07:55 +02:00
fgenesis
1719fb5e74 eliminate DSQ::game, singe game is already a global ptr and we don't need both 2023-05-31 17:52:06 +02:00
fgenesis
73c58b3153 preparations for gems save format update; not yet sure how to best do this so i'm leaving it at that 2023-05-31 17:46:44 +02:00
fgenesis
9047e5e083 remove dsq->game-> indirection inside Game 2023-05-31 17:43:27 +02:00
fgenesis
dc5d385864 remove self-refs (core->...) in Core 2023-05-31 17:40:41 +02:00
fgenesis
fd1ac85af3 remove pointless self-refs (dsq->... and core->...) in DSQ 2023-05-31 17:37:20 +02:00
fgenesis
dbda4d0bf8 Texture loading, part 3: Drop recache property from mod XML, this is now automatic 2023-05-31 17:13:24 +02:00
fgenesis
7041143ef8 Texture loading, part 2: make TextureMgr work with special paths; some fixes
Ie. explicit relativs paths (./) or absolute paths that are not part of
the regular texture search dirs

Also forgot to clear a free()'d pointer.
2023-05-31 17:12:14 +02:00
fgenesis
4e632f9f6c BmpFont usage is now a ref instead of a ptr, const-ify glfont 2023-05-31 17:08:52 +02:00
fgenesis
69ae4bdb20 Fix uninitialized glLineWidth() when rendering nodes; use green color for nodes that have a script
That would explain why nodes were drawn with thin lines whenever DebugText was on screen...
2023-05-31 17:06:33 +02:00
fgenesis
9cd9601485 Drop textures when no longer needed
Textures used to be unloaded as soon as they were unreferenced.
The TextureMgr cache keeps an active reference to prevent load-unload-load
cycles so it only unloads things when explicitly asked.
This does require some more peak VRAM during map/tileset transitions
especially, since old textures are unloaded only after the next map
has been loaded, but the shortened load times should be worth it.
2023-05-31 01:36:50 +02:00
fgenesis
6dc9dc7e8f now that textures are no longer the bottleneck, speed up editor map reload 2023-05-31 01:10:39 +02:00
fgenesis
70b8dcdc3a Rework texture loading, part 1
Major code/logic cleanups + it has a multithreaded batch mode now.
The VFS code doesn't like multiple threads at all,
so for now there's a big lock in front of where it matters.
Changed precacher, map/tileset, and worldmap loading to batched mode.

Still TODO:
- fix broken mod preview images
- reloading resources on debug key
- make mod recache entirely unnecessary
- actually drop resources when no longer needed
2023-05-31 00:55:16 +02:00
fgenesis
1100e286a6 don't spam log when bone not found 2023-05-30 00:41:16 +02:00
fgenesis
c7c9cae999 remove semi-broken editor tile alignment functions and related code 2023-05-25 17:54:38 +02:00
fgenesis
74ad8f7804 Build fixes for Linux, some warnings and compatibility fixes for C++17 and up 2023-05-25 16:58:08 +02:00
fgenesis
924bc058b4 oh come on, another tiny simplification now that IDs are really unique 2023-05-09 05:39:15 +02:00
fgenesis
e3eebf63e9 Remove pointer from EntitySaveData
Can properly address entities by ID now that they are really unique.
2023-05-09 05:28:16 +02:00