1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 14:09:06 +00:00
Commit graph

99 commits

Author SHA1 Message Date
fgenesis
fc7fa440da Fix currents not displaying correctly after resolution change. 2012-04-01 21:24:31 +02:00
fgenesis
83dbb7e310 minor things, added entity_loadSkin function 2012-04-01 18:14:02 +02:00
fgenesis
e94de627eb Really fix variadic calls (including self). Also fix avatar_setPullTarget() failing because entities are userdata now.
This does now allow constructs like this, in an entity script:

  function msg(me, a)
      if a > 1 then
          a = a * entity_msg(me, a - 1)
      end
      return a
  end

So that entity_msg(thing, 5) == 120 is true.
2012-03-14 20:11:14 +01:00
fgenesis
0cdbc66c02 Minor script fixes
- Bigmouth & Grabbyarm will no longer spam "entity invalid pointer"
- Make Huggys follow through local warps (thx to Andrew Church for this)
2012-03-14 01:00:46 +01:00
fgenesis
273b608214 Misc fixes and cleanups; fixed variadic Lua calls to self.
Script interface:
- entity_msg() will no longer corrupt the Lua stack if sending messages to itself.
- added more info to non-critical Lua errors ("attempt to call a nil value", etc)
- replaced many lua_tostring() with getString(), which does never return NULL.
  This prevents possible crashes when a non-string parameter is passed to functions
  expecting a string.

Misc:
- Removed classes BoxElement, DFSprite, Datafile, and related references.
  They were essentially unused.
- Removed unused Element class member variables.
- Show more lines in the in-game console.
2012-03-14 00:58:59 +01:00
fgenesis
bd9648aa60 Fix particle & shot loading on linux (fix file name case) 2012-03-12 03:13:34 +01:00
fgenesis
4891fcc339 Fix "tile dummy" error.
When a mod without a world map was loaded from a saved game,
and the player died and respawned at the last save, the game
would spam this error message.
Now it loads world map explored data only if a world map is present.
2012-03-11 18:48:18 +01:00
fgenesis
9b63b400d5 Misc code cleanups, little SkeletalSprite loading improvement.
- Removed some unused member variables.

- The BBGE_BUILD_WIDESCREEN define is now gone.

- Added an TiXMLDocument cache to prevent parsing the same file
once for each entity on the map with the same skeletal.

- Removed Lua func entity_warpToPathStart, which was essentially a no-op
because Entity::followingPath was always NULL. Removed related code.

- Set texture wrap only when required.

(Some changes taken from https://bitbucket.org/mattbierner/ios-aquaria,
special thanks for changeset 72d6460d9e60)
2012-02-19 04:57:04 +01:00
fgenesis
568178bbb4 Some fixes for node script init/cleanup.
An Errorneous script could cause a node script instance leaking,
preventing the leaked inctances from unloading, and thus
locking the whole file, preventing it from re-loading when relaoding
the map, until the mod was exited.

Also init nodes properly when cloned or changed.
2012-02-18 23:35:30 +01:00
fgenesis
0cd0971671 Revert "Add a thread pool for background job processing, and use it for OggDecoder."
This reverts commit 010f44d264.

Conflicts:

	BBGE/MT.cpp
	BBGE/MT.h
2012-02-12 03:27:54 +00:00
fgenesis
c06e66d3b7 Missing include on linux 2012-02-12 02:31:40 +00:00
fgenesis
ea780f2ac9 Added a blockEditor="1" property to a mod xml. 2012-02-12 01:15:46 +01:00
fgenesis
3f0be8c79e Double the amount of available save slot pages for the non-dev version. 2012-02-11 23:58:08 +01:00
fgenesis
9b2c18ecaa Build fixes for clang; little CMake config update 2012-02-10 20:28:35 +01:00
fgenesis
f738c19757 ScriptInterface: one more errorLog that should not be there 2012-02-10 01:22:21 +01:00
fgenesis
88a62567ed Fix some bugs introduced in my prev. commits:
- Game::reconstructEntityGrid() now really clears only entity grid,
and not the tile grid as well
(Added OT_INVISIBLEENT do further distinguish entity from tile obstruction)

- Invalid script pointers should not pop up message boxes

- Lost an include and CMakeLists changes
2012-02-10 01:06:44 +01:00
fgenesis
75e7b137d6 Drop use of tempfiles when loading compressed files.
Also simplified .zga texture and .aqs savegame loading.
Dropped support for "crunched" .sav files (those were never used),
and the corresponding crunch functions.

To be done: Temp files are still used when compressing files,
will address this in a later commit.
2012-02-10 00:10:50 +01:00
fgenesis
321a65a9fb sync with icculus repo 2012-02-09 17:40:35 +01:00
fgenesis
5623b11f83 little (harmless) typo in IceChunkCommon.lua
Caused a warning, nothing more.
2012-02-09 16:09:17 +01:00
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