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

1095 commits

Author SHA1 Message Date
fgenesis
7e93956e9c dump obs as png, not as tga. also fix upside-down and memleak 2023-04-17 18:55:52 +02:00
fgenesis
c11d72f8e0 fix shot script canShotHit() API function 2023-03-19 18:11:57 +01:00
fgenesis
66b0aa710f Add Lua functions for bonelock control. Also make quad_setRepeatTexture() update tex params properly.
+ entity_setBoneLockRotation()
+ entity_setBoneLockOffset()
2023-03-19 15:26:45 +01:00
fgenesis
04cb3bba11 copy missing texture params when cloning Element 2023-03-19 15:18:11 +01:00
fgenesis
bbc6636c65 fix predatorytunicate always spitting out to the left, now it's the facing direction 2023-03-06 00:54:28 +01:00
fgenesis
0a3f57486b Simplify RenderObject::followCamera math, remove branches, cleanup followCamera related code.
It also appears that a RenderObject is always on a layer when rendered.
Assert this in the code. This saves some extra branches.
2023-03-05 21:25:59 +01:00
fgenesis
81bfcb2f65 more precise comment 2023-03-02 03:42:39 +01:00
fgenesis
28766f0d5a make RenderObject::followCamera not modified during rendering
This takes out the last of the RenderObject mutables.

This also fixes the long-standing editor bug that map tiles
that are once moved to parallax layers and then back to a
normal layer keep their scroll factor until the tile is deleted
or the map saved and reloaded.
2023-03-02 03:41:00 +01:00
fgenesis
76ba2b1211 make RenderObject::rotation not modified during rendering, simplify duplicated code 2023-03-02 03:29:04 +01:00
fgenesis
f4147b99c4 make RenderObject::scale not modified during rendering 2023-03-02 02:19:48 +01:00
fgenesis
7a5a5feb39 make RenderObject::position not modified during rendering; small cleanup 2023-03-02 02:12:32 +01:00
fgenesis
01295cda7a Changes to entity/node activation:
- Lua func node_activate() is now variadic and can pass any params to the target's activate()
- Add Lua func entity_activate() that works in the same manner
- Activating nodes/entities via RMB now passes (naija ptr, int input source) to activate()
- Don't delay entity activation by 1 frame
- Minor cleanups to some Lua functions; no functional changes there
2023-02-24 02:10:33 +01:00
fgenesis
66843d338d win build instructions for dummies 2023-02-21 23:00:41 +01:00
fgenesis
99eec85310 fix world map tile selection to actually select the closest tile 2023-02-16 18:33:25 +01:00
fgenesis
7d51a97145 show would map tile name when editing or selecting 2023-01-31 00:52:11 +01:00
fgenesis
c606409403 oops, forgot to remove deprecated functions from list 2022-12-10 01:05:27 +01:00
fgenesis
559a5b39e3 Fix possible world map crash 2022-12-09 04:21:46 +01:00
fgenesis
b17afecd4b Remove 3 unused Lua functions:
- entityFollowEntity()
- entity_followEntity()
- entity_isFollowingEntity()
2022-12-09 04:20:17 +01:00
fgenesis
0edb2d609a Remove unused Lua func entity_watchEntity() 2022-12-09 04:16:05 +01:00
fgenesis
0cc2f565d7 Remove 2 unused Lua functions that only the unused "squeezer" scripts called
- entity_grabTarget()
- entity_releaseTarget()
2022-12-09 04:10:13 +01:00
fgenesis
7f3e457559 Cleanup entity activation, add Lua getter
+ entity_getActivation()
2022-11-24 02:03:24 +01:00
fgenesis
9583375537 fix possible out of bounds access 2022-11-23 20:42:30 +01:00
fgenesis
ed98a3328e anim editor: allow to select anim by name (no more hammering PgUp/PgDown!) 2022-11-18 01:52:46 +01:00
fgenesis
92ab459736 Improve some skel anim edge cases; warning fixes. Also new Lua function.
+ entity_setAnimationTime()
2022-11-16 22:46:56 +01:00
fgenesis
da8faf2bd9 new Lua func to get elapsed time of anim currently playing
+ entity_getAnimationTime(e, layer)
2022-11-13 12:54:00 +01:00
fgenesis
37cf5134ba fix possible crash in anim editor 2022-11-13 12:30:03 +01:00
fgenesis
96f28702e4 fix anim editor not generating keyframes for newly inserted bones.
broke this during my recent anim editor work, oops
2022-11-13 12:29:11 +01:00
fgenesis
288fb6b7fa fix crash when saving skel after bones were removed 2022-10-12 18:59:25 +02:00
fgenesis
0469ab8dfb Add support for below-maxspeed shots
The game used to unconditionally enforce shots to go at close to their max speed;
it is now possible to turn that behavior off if needed:
In a shot txt file, set AlwaysMaxSpeed = 0

New Lua functions:
+ shot_setAlwaysMaxSpeed()
+ shot_isAlwaysMaxSpeed
2022-10-12 18:58:48 +02:00
fgenesis
cc1530b5e5 eliminate one gigantic global float->uint->float roundtrip cast
whyyyy
2022-09-25 06:02:22 +02:00
fgenesis
58e9ba340e Add skel/bone gridDrawOrder attrib to control the way the gris is drawn
Also ignore grid.z (used as worldmap alpha) by default because it's really
only needed for the world map and ignoring it results in less GL calls.
2022-09-25 04:30:38 +02:00
fgenesis
e35dfb9f68 anim edit: slightly more useful border modes 2022-09-24 05:25:54 +02:00
fgenesis
cf70cfe48d anim editor: highlight bspline'd bones 2022-09-24 04:58:14 +02:00
fgenesis
cfa5d45932 render: remove one mutable hack, border color is now per-quad 2022-09-24 04:57:08 +02:00
fgenesis
e47d253945 fix derp in 4c52a147b0 2022-09-23 18:21:36 +02:00
fgenesis
575a83abd6 Initial implementation of bspline support in the animation editor 2022-09-23 18:10:44 +02:00
fgenesis
4c52a147b0 harden SimpleIStringStream against user errors and kill operator bool()
Like this:
  size_t x;
  if(is >> x) {...}
This used to return true despite x never being populated, because
is was casted to bool, which is fine to shift by uninitialized, and
likely returned true. Whatever.
2022-09-23 18:09:26 +02:00
fgenesis
b74c5a2986 Invert Quad::renderGrid() draw loop to be more cache friendly 2022-09-14 05:36:46 +02:00
fgenesis
4b64147914 MSVC optimizer doesn't like refs to primitive types 2022-09-14 05:21:25 +02:00
fgenesis
a1005dafe2 Make Bone::ANIM_* a bitmask. This also changes Lua constant ANIM_ALL from 10 to 3. 2022-09-14 05:20:37 +02:00
fgenesis
8e979e0e05 simplify Quad::drawGrid 2022-09-14 05:11:56 +02:00
fgenesis
29fd4ec44e clean up interpolators; WIP towards bspline support in anim editor 2022-09-13 18:38:44 +02:00
fgenesis
55689228bf Attempt to fix crash when instantiating Core alone but this is definitely not enough 2022-09-12 00:12:41 +02:00
fgenesis
0afd09dc75 bspline wip more 2022-09-05 17:19:34 +02:00
fgenesis
214590742d wip splines 2022-09-04 17:16:35 +02:00
fgenesis
e920be599d add initial tbsp for later 2022-08-24 18:50:55 +02:00
fgenesis
a494a3f411 ignore mouse motion events generated by SDL_WarpMouse().
Also fix bug that mouse.change got stuck on a tiny value and constantly
move the camera in editor mode.
This is a continuation of 764d106d50 and seems to fix the
previous issues with SDL2 >= 2.0.17

Also remove some unused vars.
2022-08-24 14:16:25 +02:00
fgenesis
cf6464daa7 remove unused / reorg entity variables 2022-08-24 02:33:31 +02:00
fgenesis
e22cfec0e6 Overlooked a call to toggleVersionLabel()
As removed in fb3d27fcfe
2022-07-19 00:26:13 +02:00
fgenesis
9e2c640b51 attempt to fix crash when loading a saved game on a map with an already collected health upgrade
This problem might have been introduced in 06270eaac0 but not sure.
The crash could happen due to a use-after-free memory access:
When deleting an entity with skel in postInit(), deletion would be
delayed by 1 frame because that is how entity_delete() works.
During deletion, RenderObject::children were removed and deleted
but SkeletalSprite::bones still had those pointers.
Additionally an object would delete its children in onUpdate() after
safeKill(), and still proceed to run scripts, which would then possibly
access freed memory too.
This fix causes children to not be deleted until we're out of the update()
cycle, and instead delete children together with the root object.
2022-07-18 23:00:22 +02:00