1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 22:35:45 +00:00
Commit graph

1030 commits

Author SHA1 Message Date
fgenesis
010f44d264 Add a thread pool for background job processing, and use it for OggDecoder.
The pool adjusts to the amount of required threads.
The implementation is as simple as possible, but should be enough
for future extensions.

This brings down decoder thread creation/destruction even more.

Also fix OpenALSystem::release() to close channels properly on shutdown,
otherwise it would deadlock with the pool, because it waits until all
threads have died off, which did not necessarily happen.
2012-02-09 16:08:35 +01:00
fgenesis
9e675be651 Fix obstruction grid edge rendering.
This patch adds the functionality of the removed hack added in 07bc370c1680,
but without the runtime performance impact.
OT_* obstruction types are now a bitmask; as a side effect,
Game::baseGrid is no longer needed, which reduces memory usage by
4 MB.
2012-02-07 22:25:17 +01:00
fgenesis
ed767d150b Little hack to bring audio thread creation down.
Do not play sounds with volume 0 that would never get audible.
This helps against stuttering on maps with many entities that play
sounds in regular intervals, but are too far away to be heard.
This needs to be removed once audio position updating is implemented.
2012-02-06 19:54:28 +01:00
fgenesis
1d12576322 Fix 2 minor typos from the script update patch, and one in SoundManager
The latter one caused sounds in mods not being properly cached (and not
played), if the internal mod path started with "./", which is the case
on windows since an earlier commit.
2012-02-06 17:36:07 +01:00
fgenesis
ac822ec91d Fix missed logic bugs in reordering of RenderObjects within a layer.
Because of wrongly set firstFreeIdx some pointers were NULL, where they
shouldn't be, which caused hard to track down crashes.
This is an addition to af04d0c37698.
2012-02-05 20:31:17 +01:00
fgenesis
99375127e1 Fixed a shader related crash that occured if the following conditions were met:
- BBGE_BUILD_SHADERS defined
- Blur enabled in config
- Entering a "warplocalnode"-Node while taking damage

These conditions caused it to enable shader related code while taking the
screenshot for the warp transition, that caused a crash because the shader-
related gl*() function pointers were not initialzed, because the current
code never loads any shaders.
2012-02-05 20:26:23 +01:00
fgenesis
7ff0caaed8 Script interface improvements & extensions.
- Pointer typechecks are now enabled by default.

- enabled all script warnings for non-FULL or DEMO builds by default

- Added generic obj_* functions that operate on any type of RenderObject.
  These give quite low-level control about the renderer, and are quite
  dangerous too.
  Subsequently, many functions sharing the same code (*_setPosition, for example)
  could be removed, and simply call the generic functions after a type check.

- Added interface function deathNotify(). The original logic of death
  notifiers was never used, so i thought i'd make use of it.
  This is useful in scripts to safely drop dangling pointers.

- removed sendEntityMessage, entity_setCollideWithAvatar, entity_setTouchDamage,
  which were essentially no-ops.

- Replaced all unnecessary luaReturnNum(0) and luaReturnInt(0),
  now it does only push a return value on the stack if the function
  is actually supposed to have a retun value.

- Allow variadic calling of entity_msg(). Now any parameters can be passed
  to the function, and the target entity will receive all of them.
  Any values returned from the entity's msg() callback will be returned
  by entity_msg() to the original caller. This allows nice RPC-like
  entity communication.

- fixed possible crash in debugLog, bone_update, entity_debugText

- added an override function for loadfile() that is case-insensitive like dofile()

- entity_createEntity returns the created entity now

- spawnParticleEffect returns the associated RenderObject

- Added some text rendering functions

- Added beam_setFirer()

- removed the underflow check in avatar_decrLeaches() I added earlier

- added a panic function for Lua.

- added the Lua debug library

- fixed a stupid typo in ScriptObject::isType() that made the type checks a lot less accurate

- misc stuff I forgot
2012-02-05 20:22:54 +01:00
fgenesis
f2d112b693 Minor debug improvements + misc
- Spend less time starting up when not compiled with AQUARIA_FULL/DEMO
- removed entity_setTouchDamage and bone_setTouchDamage, the used variable was never read
- repositioned debug overlay texts, that they are not in the way on wide resolutions
- show used Lua memory in debug text
- very slow slowmo on Shift+F devkey
- fixed RenderObject::isfhr()/isfvr() to be really recursive
  (they were never used until the animation editor fixes - this rotates
   bones on one or more h.flipped parents in the same direction as
   never h.flipped ones)
- removed some unused stuff
2012-01-31 19:25:13 +01:00
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