1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00
Commit graph

1290 commits

Author SHA1 Message Date
fgenesis
fe77a8ea5a Now is the time to finally switch on AQUARIA_SAVE_MAPVIS_RAW for good 2024-11-16 06:01:02 +01:00
fgenesis
0ae1250146 fix old fixme, remove unused code 2024-11-16 06:00:00 +01:00
fgenesis
5516c89576 fix gem scaling, attempt #2
This sort-of-reverts 4a71c5e12f and fixes overlooked cases
2024-11-16 04:55:56 +01:00
fgenesis
da7cd05ffa Fix a couple oversights in gem data loading 2024-11-16 04:53:23 +01:00
fgenesis
78005c1a51 obvious rant 2024-11-16 02:30:34 +01:00
fgenesis
c333b6b2a5 flip gem load cases around; prefer to load newer formats 2024-11-16 02:29:58 +01:00
fgenesis
de80af5612 improvements to gem storage
gems from old saves are still compatible but won't be associated to map tiles
2024-11-16 02:21:41 +01:00
fgenesis
4a71c5e12f fix worldmap gem scaling 2024-11-15 06:39:29 +01:00
fgenesis
925eb92d86 fix alpha handling for prev commit
also, with proper uncovering now done also for prerevealed maps,
don't set a prerevealed maps as actually revealed on load.
This applies the correct alpha now.
2024-11-15 06:12:32 +01:00
fgenesis
9d142bbd0c show exploration progress on prerevealed maps, too
also clean up map tile dirty/refresh handling a bit;
it's less error prone and a bit more efficient now
2024-11-15 05:09:57 +01:00
fgenesis
08c42f0d52 change text of user-placed gems on double-click
also don't move the worldmap around when input is mapped to eg. WASD
and the those keys are pressed to enter text
2024-11-15 04:28:01 +01:00
fgenesis
b732b85bbb add some more variation for user-placeable minimap gems 2024-11-15 04:24:44 +01:00
fgenesis
46d7a68034 remove GRID_DRAW_WORLDMAP and some associated code 2024-11-15 03:28:11 +01:00
fgenesis
c44c67a063 Worldmap overhaul, part 1
In short:
- No more grid-for-alpha; everything uses generated textures now
  (With proper bilinear filtering so it looks like the old method)
- All tiles are now shown partially uncovered at the same time;
  selecting one is no longer needed
- Gems can now be local (associated to a tile) or global.
  Local games move with their tile, global ones stay where they were placed

Background:
Originally there were two possible implementations of how to render the world map:
- One used write-alpha-to-texture to implement graual uncovering.
- The other (permanently enabled) used the DrawGrid to render the map tiles
  as a fine grid, each little square having its own alpha value
The downside of the first method was that it didn't look as good as the
second, so i guess that's why it was never fully finished.
The main downside of the second method was that it burned a lot of vertices
just to do alpha, so only one tile at a time could show the detailed grid.

I also never liked how an entire tile was effectively fully uncovered once
the map was first entered, taking away a lot of the exploration feeling
that could have been there if everything that hasn't been explored would be
completely invisible.
I've added this worldmap uncovering method as an optional config param,
<WorldMap revealMethod="1"/> but i've decided to fully switch over now.

Things left to be done:
- create a WorldMapRender instance only once and keep the tiles across map loads
- add debug option to reload/recreate worldmap at runtime
- cleanup gem storage and carry over the player gem properly (ged rid of std::list)
- remove "worldmap" grid render type
- Add more user "pyramid" gems as world map markers. More colors!
- check that gems and beacons still work as they should
2024-11-15 03:12:14 +01:00
fgenesis
97cea29235 remove old world map reveal method
Note that this makes the world map highly inefficient for now because
the number of draw calls goes up crazy high. Will investigate.
2024-11-09 03:46:52 +01:00
fgenesis
dff6fbfafb remove some unused things from WorldMapRender 2024-11-09 03:46:52 +01:00
fgenesis
b7eb5777ae save savefile previews as png. this finally kills .zga format, but it's kept for backwards compat 2024-11-09 03:46:52 +01:00
fgenesis
fb1f31e3b5 ompo script is used in vanilla maps, and causes warnings; move it from _unused and disable the rest of the code 2024-11-09 03:46:52 +01:00
fgenesis
91b7c0bf3f Support _mods/modname/mod-info.xml in addition to the old _mods/modname.xml
Needs directory enumeration; I'm not sure that it builds on linux.
Will fix if it doesn't.
2024-11-04 22:38:29 +01:00
fgenesis
b59fb507ca Reduce Game::fillGrid() complexity from O(n^2) to O(n) when trimming
Eliminates stutter on slow machines or in debug mode when operating doors.
Also the game shouldn't freeze anymore when marking very large tiles
as obstructing.
2024-11-04 04:47:34 +01:00
fgenesis
4702cd238c fix grid of type OT_BLACKINVIS being drawn like OT_BLACK after map load
reconstructGrid() or editor use fixed this, but that usually didn't happen
when playing vanilla maps normally

Again, the dreaded black edges, should now be fixed for good...
2024-11-04 04:42:42 +01:00
fgenesis
441fe9f332 Disable WaterSurfaceRender glCopyImageSubDataEXT code path
Fixes graphics problems as soon as the water surface was on screen
2024-11-01 22:31:22 +01:00
fgenesis
c598fde5e8 Change entity_setFillGrid() to allow skeleton grid filling, and whether to trim
entity_isFillGrid() returns two bools now
2024-10-17 06:00:51 +02:00
fgenesis
2149fcd01e fix typo that broke predefined text input 2024-10-16 06:10:10 +02:00
fgenesis
55a37e7728 fix missed break in prev^2 commit 2024-10-15 04:11:30 +02:00
fgenesis
5f2a0119be Add Lua functions:
+ quad_borderColor()
+ quad_getBorderColor()
2024-10-15 04:08:12 +02:00
fgenesis
b8a9815de7 Change the text input box to use SDL textinput events
Add a cheap replacement for SDL1 that doesn't have textinput events.
2024-10-15 04:07:22 +02:00
fgenesis
22e682cebc don't lose tile flags when changing solidness; update grid when flipping solid tile 2024-09-23 23:29:10 +02:00
fgenesis
fef32b042c keep texture data in host RAM when pixel data are needed, eg. for collision calculations
This avoids downloading from the GPU *every single time*
the pixel data are needed
2024-09-23 03:28:03 +02:00
fgenesis
c7aa3e2ec3 typo; fix tile wavy-effect flip (this effectively made numpad 5+6 effects the same) 2024-09-22 04:32:18 +02:00
fgenesis
08913e68f4 tbsp lib update 2024-09-22 03:24:08 +02:00
fgenesis
798b6193ab fix a warning 2024-09-22 03:23:51 +02:00
fgenesis
e9998dd427 Fix grid rendering -- it rendered original obs, not trimmed obs (black border poking out left/right in some cases)
Also avoid unnecessary recomputation in some cases.
2024-09-22 03:23:14 +02:00
fgenesis
2c2153de9d Add MOUSE_BUTTON_REAL_* mapping IDs because sometimes we need to handle unmapped mouse buttons
One such case is the editor; if Ctrl was mapped to RMB then rotating
tiles in 45° increment mode is impossible
(since the editor checks for Ctrl to enable increment mode,
and it did the wrong thing when releasing "both" at the same time)
2024-09-22 02:36:18 +02:00
fgenesis
beb726e65d editor: hide ghost sprite when any tile is selected 2024-09-22 01:22:34 +02:00
fgenesis
47aa41de19 fix wrong(?) assert that may break stuff on macos.
Time to rip out this old lib. soon, hopefully
2024-08-04 00:35:36 +02:00
fgenesis
9251278e46 compat stubs: fix warnings on death-reload 2024-07-16 03:37:13 +02:00
fgenesis
98c6b716d7 tiny more unfuck 2024-07-16 03:14:51 +02:00
fgenesis
ab9193d1a9 unfuck freetype.cmake 2024-07-16 03:10:17 +02:00
fgenesis
296c89ee7e keep on tryin' 2024-07-16 02:57:09 +02:00
fgenesis
62c29dc2c9 fix build failing when the Aquaria repo was located in a path containing spaces
(thx NinjaKittyc4)
2024-07-16 02:53:02 +02:00
fgenesis
6047dd61b1 cmake: don't set build type when building with msvc
msvc has its own build type handling;
with this asserts are on in debug/relwithdebinfo mode and off in release mode,
as they should be.
2024-07-14 01:52:27 +02:00
fgenesis
5c4e4450ba editor: fix entity rotation logic
entity will no longer insta-rotate when clicked
2024-07-14 01:51:13 +02:00
fgenesis
0153c977df couple more fixes for apple clang build 2024-07-13 19:33:10 +02:00
fgenesis
64c0c649cd compile fixes for apple clang 2024-07-13 06:49:32 +02:00
fgenesis
a046038c33 very minor perf thing: skip some RenderObject child checks when there are no children 2024-07-13 06:48:30 +02:00
fgenesis
1573eea051 optimize moving tiles to front/back a bit
First i thought this would fix the bug fixed in the prev. commit,
but it was unrelated.
Now that i've changed it and made it more readable, may as well keep it.
2024-07-13 06:47:07 +02:00
fgenesis
2f47d11271 fix editor bug (tile confusion) when moving tiles to front or back while also dragging them 2024-07-13 06:44:41 +02:00
fgenesis
b54d8d05ac correctly update VBO of GridRender(OT_BLACK) after trimGrid()
This fixes blackness showing occasionally even though it was no longer there
2024-07-08 03:54:00 +02:00
fgenesis
a5b25af6d5 ocd fix 2024-07-08 01:54:13 +02:00