1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-16 14:50:01 +00:00
Commit graph

472 commits

Author SHA1 Message Date
fgenesis
52881c97a3 these should not be in the repo 2012-01-31 18:10:20 +01:00
fgenesis
eeaa723cd7 Animation editor enhancements
Bone positioning now takes into account its parent's absolute rotation,
and compensates it. That means bones with rotated parents follow exactly
the mouse when dragged, instead of going anywhere except where they should.

Repaired selecting bones with the mouse, and made that the default
(can be switched to keyboard with M key).

The timeline grid size and timestep unit size are now variable,
and can be changed with the U, I, O, P keys or the added UI buttons.

Bone borders and joint points can be displayed with B key.

Removed the ignorebone0 button and related functionality.

Minor cosmetical things.
2012-01-31 18:02:18 +01:00
fgenesis
a551d70a6d little fix, replaying ryan's patch to libogg and an oversight in GridRender that got lost 2012-01-18 03:16:00 +00:00
fgenesis
9dbdac547e Corrected shot bouncing logic
There was a problem calculating how shots with the BOUNCE_REAL attribute
would bounce off walls. The calculation was triggered when the shot
was already obstructed, which possibly got the shot stuck,
and later killed by a wrong obstruction check, which almost always killed
fast shots in narrow tunnels.

Also added some const.
2012-01-10 22:27:52 +01:00
fgenesis
1ab32b585f Fixes for Linux
- fixed warning about PlaySfx::handle
- fixed displaying subtitles - if the path was not full lowercase it didn't find its txt files.
- CMake: removed SDLMAIN_FOUND, which is seemingly only defined on windows and does more harm than good.
- glpng: always use new libpng API (fixes windows build)
2012-01-10 19:34:31 +01:00
fgenesis
2d795b5bf7 Update libpng, libogg, libvorbis to newest versions
This also fixes a sneaky divide by zero in glpng, because some PNG's width was read incorrectly by the old libpng. (I wonder why it worked anyway...)
2012-01-10 18:43:28 +00:00
fg
b2517ec38b missed this one 2012-01-10 18:09:44 +00:00
fgenesis
39f4f3c856 Fix 2 little bugs
- set default freq/pan for voice playback
- spinycrab script: fix pointer tpe mismatch
2012-01-08 20:22:56 +01:00
fgenesis
ef8d13c3e4 Fixed an oversight where a channel's pitch or pan could be applied to background music 2012-01-03 04:49:47 +01:00
fgenesis
dd05ed18fd very little SceneEditor enhancements 2012-01-03 04:45:28 +01:00
fgenesis
4320b8296b Add a safe pointer model to ScriptInterface, additional bug/crash fixes.
This commit introduces pointer checks to various functions;
so that entity_* will no longer crash or produce weird results
if passed a Node pointer, etc.
The checks are disabled by default, but can be enabled in
ScriptInterface.cpp.

Fixed possible crashes in a few more functions due to missing NULL-checks.

There was a "feature" in the single Lua state that it would keep globals
intact until the game was quit. That made any globals from mods "leak"
into the game or other mods. Now it resets the Lua state when a mod
is loaded or closed.
2012-01-03 04:38:28 +01:00
fgenesis
becd31770c Fix some small performance bottlenecks:
- Vector interpolation. Also removed unused interpolation trigger events.
- GridRender::onRender() (removed Andrew's hack, use fixed map file!)
- make use of glVertex3i() & memchr() in GridRender
- very minor misc things
2012-01-02 21:34:29 +01:00
fgenesis
16ae453431 Revert "Fix some small performance bottlenecks:"
This reverts commit 2d7eeb4781.
2012-01-02 16:02:32 +01:00
fgenesis
b26eac658a Clear recent save slot when entering the title screen or starting a mod.
This fixes a bug where loading a normal saved game and then dying in a mod
(or vice versa) would cause the game to attempt loading the save game
in the wrong context, resulting in a blank error map and many
"tile dummy" error messages.
2011-12-14 19:40:36 +01:00
fgenesis
2d7eeb4781 Fix some small performance bottlenecks:
- Vector interpolation. Also removed unused interpolation trigger events.
- Game::collideCircleWithGrid()
- GridRender::onRender() (removed Andrew's hack, use fixed map file!)
- make use of glVertex3i() & memchr() in GridRender
2011-12-13 21:43:27 +01:00
fgenesis
99e32e0ee7 Positional audio fixup.
- Finetuned default distance by aspect ratio
- Added a hack to allow entity_sound() to use freq values around 1000 instead of changing all related scripts
- Changed anglerfish bite pitch, 40% only sounds awkward
2011-12-13 18:07:23 +01:00
fgenesis
ac2091fb69 Fixed positional audio & pitch shift.
Apparently this was half implemented but not fully finished.
Mono samples work fine, for stereo, L/R panning does not work (due to OpenAL's limitation)
Also fixed: entity sounds should not play if a cutscene is currently skipped.
2011-11-26 21:00:24 +01:00
fgenesis
ff195c6b16 additional seahorse/Li spirit form/riding fix.
This patch enables movement after going into spirit form while hugged,
and fixes getting off a seahorse if returning near an actual spirit crystal.
2011-11-21 02:01:29 +01:00
fgenesis
47c31660ca minor script fixes
- restored leach.lua 1.1.1 compatibility (entity_*TargetLeaches still works)
- fixed possible script warning when picking up a collectible
- made energy bariers ignore damage
2011-11-21 00:01:12 +01:00
fgenesis
e6e33f2f9d Little path correction for win32, this repairs screenshot and frame dumping functions. 2011-11-20 23:47:24 +01:00
fgenesis
d903e74bf6 Core: tgaSave() should free memory passed in. SceneEditor: Add support for grid map dumping (in TGA format).
This allows reconstructing the map templates, which were never shipped with the game.
This patch also fixes insane memory leaking when taking screenshots, or dumping screen frames.
2011-11-20 22:58:36 +01:00
fgenesis
a97629b52b animation editor: fixed widescreen bug that caused bones to jump a distance to the left when clicked. reposition mouse only if necessary. one additional output text. 2011-11-20 18:35:49 +01:00
fgenesis
3be5e4e637 Revert "animation editor: fixed widescreen bug that caused bones to jump a distance to the left when clicked. reposition mouse only if necessary. one additional output text."
This reverts commit 5c1169727c.
2011-11-20 18:34:41 +01:00
fgenesis
32f78fac61 Revert "SceneEditor: Add support for grid map dumping (in TGA format)."
This reverts commit 1ee532f39e.
2011-11-20 18:22:32 +01:00
fgenesis
1ee532f39e SceneEditor: Add support for grid map dumping (in TGA format).
This allows reconstructing the map templates, which were never shipped with the game.
2011-11-20 17:49:32 +01:00
fgenesis
5c1169727c animation editor: fixed widescreen bug that caused bones to jump a distance to the left when clicked. reposition mouse only if necessary. one additional output text. 2011-11-20 17:39:45 +01:00
fgenesis
0d4e9f33e2 Use mods root dir for the files that were in data/ subdir before. Little correction for my prev. patches for compatibility with the iPad version. 2011-11-20 17:33:42 +01:00
fgenesis
b250d4c1bd Added support for world maps in mods.
Mods with a <Properties hasWorldMap="1"> tag in their XML definition
can now open a native world map like the original game.

Fixed an oversight that the world map visited area was updated
while the editor was open.
Fixed missing field in worldmap.txt saving.
Removed the limitation that world map tiles had to be 256x256 -
all tile sizes work now.

The game does now read _mods/#/data/stringbank.txt from a mod and merges
it with the main stringbank.txt, and uses _mods/#/data/worldmap.txt
as a full replacement.

Load _mods/#/[map|premap]_mapname.lua scripts to properly
initialize the Naija map token.

Improved the builtin worldmap editor a little.
2011-11-20 17:16:48 +01:00
fgenesis
e7c8b0093b randVector() & generateEmptyTexture() cleanup 2011-11-20 17:03:09 +01:00
fgenesis
385d05f905 restore debug.log output on non-win32 platforms 2011-11-20 16:27:55 +01:00
fgenesis
7d2b3965a9 more ignore 2011-11-20 15:44:57 +01:00
fgenesis
e64fb75f84 sync with icculus repo 2011-11-20 15:44:17 +01:00
fgenesis
3b39173397 animation editor: fixed widescreen bug that caused bones to jump a distance to the left when clicked. reposition mouse only if necessary. one additional output text. 2011-11-15 10:30:13 +01:00
fgenesis
25dfb44a93 unlock movement & camera when activating spirit form on seahorse 2011-11-13 02:24:08 +01:00
fgenesis
fa844f29dd Use mods root dir for the files that were in data/ subdir before. Little correction for my prev. patches for compatibility with the iPad version. 2011-11-07 20:23:54 +01:00
fgenesis
54199272e8 If Aquaria is playing a mod, try to load the file "data/ingredients.txt"
in the mod first, then load the main ingredients file if nothing has been loaded

 (Original patch by Yogoda)
2011-11-07 15:21:37 +01:00
fgenesis
7039f1d2cc Enable radial blur post processing effect for spirit form.
Code for this existed, but it was wrong and never enabled.
This replaces most of the code, and makes it work on widescreen.
2011-10-31 18:28:57 +01:00
fgenesis
0ff37defc1 repaired & improved noteEffects 2011-10-31 18:17:48 +01:00
fgenesis
f7f0a9ff7c fixed loading custom songs when loading a mod's saved game 2011-10-10 18:01:29 +02:00
fgenesis
9508d6de73 Fixed a typo in my last entity cleanup 2011-10-06 06:05:14 +02:00
fgenesis
35b52af0ac ParallaxLock fix + little layer hiding improvement
Fixed an oversight where not all parallax layers got their parallaxLock
status cleared in case the map file was missing this attribute, or not all
affected layers were listed there.

The editor does now no longer switch to a layer when hiding it
(Alt+Layer key). It is still possible to edit invisible layers, though.
2011-09-19 19:38:01 +02:00
fgenesis
90b613b1fb Fixed problem with RLT_FIXED and sun form charge glow
Sometimes the glow render object was added to an array position before
darkness on the layer, which made the glow never visible and never light
up the screen.
Added the same fix to createQuad() Lua func - nodes which spawned a quad
on the dark layer in their init() function had the same problem.
2011-09-19 16:54:14 +02:00
fgenesis
b20ae992a6 Added support for world maps in mods.
Mods with a <Properties hasWorldMap="1"> tag in their XML definition
can now open a native world map like the original game.

Fixed an oversight that the world map visited area was updated
while the editor was open.
Fixed missing field in worldmap.txt saving.
Removed the limitation that world map tiles had to be 256x256 -
all tile sizes work now.

The game does now read _mods/#/data/stringbank.txt from a mod and merges
it with the main stringbank.txt, and uses _mods/#/data/worldmap.txt
as a full replacement.

Load _mods/#/[map|premap]_mapname.lua scripts to properly
initialize the Naija map token.

Improved the builtin worldmap editor a little.
2011-09-18 23:23:02 +02:00
fgenesis
c78d4d7a11 Fixed some script interface functions, error handling & code cleanups
== Script interface changes: ==

Removed entity_setClampOnSwitchDir(), which was a no-op.

Added entity_getFlag() function, for fairness, as nodes already have one.

Added node_getLabel() function, which does not return the _full_ node string, but only the first part before parameters.

dofile() supports relative paths now, and it is no longer necessary to use appendUserDataPath() + full path from a mod.

entity_color() does now support all interpolation functions that similar vector-manipulation functions support (loop, ping-pong, ease).

added entity_getVel() function (an entity_setVel() can be emulated with entity_clearVel(), followed by entity_addVel()).

*_getNearestNode() and *_getNearestEntity() allow an optional ignore parameter.
node_getNearestNode() allowed to specify a node to exclude from the search,
the others not -- now the interface is more consistent.

Deprecated entity_[incr/decr]TargetLeaches(entity) - the attached leach amount was never handled
by any entity other than Naija. Replaced them with avatar_[incr/decr]Leaches(), but kept the old
ames for now, too. Should be removed in a while.


== Script interface & related fixes: ==

Added bool loudScriptErrors to control displaying script syntax error and global variable usage warnings.
So far, syntax errors always went do debugLog(), but it is less time consuming when writing scripts
to have them displayed right away.

*_getNearestNode now scan by label, and not full name.
This allows searching for nodes but ignoring its parameters. The original game scripts never search
for nodes that have parameters, so this does not break anything,
but allows modding without an exploding amount of specialized node scripts.

entity_setBoneLock() failed for certain entites with throwLuaErrors=true,
allowing to burst through them (gears, grouper, big mithalas jelly, probably more).

Removed unnecessary int-casts in entity_setHealth(), entity_changeHealth(), and a few others,
which truncated float fractional parts.

Fixed possible crashes in many functions due to missing NULL-pointer checks,
if wrong data were passed to Lua.

Optimized entity_getNearestEntity() a little - do nocasecmp() after checking all other params

UPPERCASE global variables as used in mod include files are now tolerated, even with all warnings on.
This makes sense because it was impossible to include a custom flags definition file
(which _must_ have globals, otherwise the including scripts won't see them) in a mod without beeing buried in spam.
They won't change, or clobber any states, and UPPERCASE sort of implies a constant/#define, imho.

Added better control over warnings about not-existing files. map_*.lua and premap_*.lua files are optional,
and no warning should be given if they do not exist. Missing Entity scripts and mod-init.lua must be
warned about, however.

Fixed a crash in global variable access warning (NULL pushed into std::ostringstream)

Fixed 2 random warnings i found in scrips


== Misc stuff: ==

Related to the changes above, cleaned out unused variables from the Entity class,
and removed the code that had to do with them somehow. Some parts of the removed code
were still in use, although totally unnecessary.
Saves a few bytes of memory per entity, and less code that can cause headache.
2011-09-18 23:12:02 +02:00
fgenesis
7d0c2351ed Revert "Added support for world maps in mods."
This reverts commit b0d9fdc1cc.
2011-09-18 22:32:25 +02:00
fgenesis
2bc86c21ee Some scene editor enhancements.
Added Shift+Mousewheel as faster alternative to E and R for tile selection
(had to change the undocumented and probably unused Shift+R action to Alt+R).

Allow applying element effects (numpad 0-9) to multiple selected tiles,
and not only one.

A new node does no longer have "NewPath" as default text when created,
which always forces the user to hammer backspace 6 times before own text can be entered.
2011-09-18 22:02:29 +02:00
fgenesis
b0d9fdc1cc Added support for world maps in mods.
Mods with a <Properties hasWorldMap="1"> tag in their XML definition
can now open a native world map like the original game.
Fixed an oversight that the world map visited area was
updated while the editor was open; fixed worldmap.txt saving;
removed the limitation that world map tiles had to be 256x256 -
all tile sizes work now.
Improved the builtin worldmap editor a little.
The game does now read _mods/#/data/stringbank.txt from a mod and merges
it with the main stringbank.txt, and uses _mods/#/data/worldmap.txt
as a full replacement.
Load _mods/#/[map|premap]_mapname.lua scripts to properly
initialize the Naija map token.
2011-09-18 20:53:27 +02:00
fgenesis
d4282221fc Revert "Revert "move around some files to keep the size of the next commit down""
This reverts commit b2abcff02d.
2011-09-15 20:17:23 +02:00
fgenesis
b2abcff02d Revert "move around some files to keep the size of the next commit down"
This reverts commit 0951283b31.
2011-09-15 19:19:14 +02:00
fgenesis
56c6833220 Revert "added partial VFS support - enough to read static data from any source"
This reverts commit fa3e9e7329.
2011-09-15 19:18:53 +02:00