1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 22:19:07 +00:00
Commit graph

135 commits

Author SHA1 Message Date
fgenesis
204152a783 Little optimization for molestPath() 2013-12-10 03:48:40 +01:00
fgenesis
373ccff7e4 Fix build on linux 2013-11-14 20:37:50 +01:00
fgenesis
ab752e1156 replace CreateDirA() and mkdir() scattered everywhere by createDir() with some more error checking. 2013-11-14 20:07:39 +01:00
fgenesis
7de589e275 Add custom upper<->lowercase translation tables for better localization support.
Translation tables by Henrik Holst.
2013-11-14 17:58:33 +01:00
fgenesis
cccd42227f Merge branch 'experimental' 2013-11-05 16:51:26 +01:00
fgenesis
1701c9a67d More Lua functions:
- entity_hasSkeletal()
- entity_getNumAnimLayers()
- filterNearestEntities() to fill an internal filter buffer
- getNextFilteredEntity() to iterate over the filter buffer
2013-11-02 15:22:55 +01:00
fgenesis
3fe9ffc2cd Fix setGemPosition(), add more Lua functions:
- isShader()
- isParticleEffect()
- pe_start()
- pe_stop()
- pe_isRunning()
- isMiniMapCursorOkay()
2013-10-25 01:47:24 +02:00
fgenesis
69e25640fb Reload shaders on resolution change. 2013-10-25 01:44:34 +02:00
C.W. Betts
e306347577 The released version of SDL2 (According to the OS X framework) replaced KMOD_META with KMOD_GUI. 2013-09-23 01:12:36 -06:00
C.W. Betts
2465c87844 Fix overreleasing in Cocoa code 2013-09-23 01:12:36 -06:00
fgenesis
396f091c85 Add Lua functions:
- quad_isRenderBeforeParent()
- quad_setRenderBorder()
- quad_isRenderBorder()
- quad_setRenderCenter()
- quad_isRenderCenter()
- quad_borderAlpha()
- quad_getBorderAlpha()
- node_getShape()
- text_setAlign()

Constants: ALIGN_CENTER, ALIGN_LEFT, PATHSHAPE_RECT, PATHSHAPE_CIRCLE
2013-08-31 16:14:05 +02:00
fgenesis
d4038c1ad9 Fix build on Linux/OSX 2013-08-26 22:25:36 +02:00
fgenesis
69890093bd Add special memory allocator for Lua that should take some memory stress away from heavy scripting. 2013-08-26 21:02:46 +02:00
fgenesis
c857722213 Minor things. Most importantly: Game receives ACTION_SWIMLEFT and ACTION_SWIMLEFT now, for use in nodes' action() callback. 2013-08-26 20:57:38 +02:00
fgenesis
41929955d3 Fix ScriptInterface developer mode settings not applying.
Minor changes:
- clean out some Lua functions registered twice
- Correct bool cast in quad_setSegs()
- Show nested mains in debug console
- One less //HACK comment
2013-08-03 22:37:10 +02:00
fgenesis
f825ad9fb7 Fix crash on minimize + reactivate 2013-07-26 02:15:40 +02:00
fgenesis
cf6556b94d Implement stereo to mono mixing for proper L/R separation even for stereo samples.
This mixes only those sounds that are supposed to be played positional.
All centered (default) sounds are played in stereo, as usual.
2013-07-24 19:57:13 +02:00
fgenesis
66802e1935 Change AL distance model to AL_NONE, and implement a custom distance attenuation model.
This avoid the problems with AL_INVERSE_DISTANCE_CLAMPED (doesn't reach 0),
and sounds way better than AL_LINEAR_DISTANCE_CLAMPED, which has an
all-too-sudden decay when a sound goes out of audible range.
2013-07-24 04:36:36 +02:00
fgenesis
6e8cc8cecd Remove FMOD::Channel::setPan(), which is now defunct. 2013-07-22 13:35:45 +02:00
fgenesis
55bc002cc5 Leftover win32 junk 2013-07-22 05:36:01 +02:00
fgenesis
f5da61fe78 Horrible hack to attenuate stereo sources properly.
OpenAL refuses to pan stereo sources, so apparently
it needs to be done this way.
2013-07-22 05:35:50 +02:00
fgenesis
e6680da428 Implemenet proper positional audio, one issue still.
With this patch, entities can serve as a sound source whose position
updates relative to the listener. This implements the last missing
feature of my previous positional audio patch, which is moving sound sources.
Previously, all sounds were relative to the listener with the listener
centered at (0, 0, 0), and once a sound started playing, the position could
not be changed. Volume was set as an estimation of the distance to the listener.

These restrictions are now gone; OpenAL will handle the volume & panning
based on the distance.

The remaining problem is that stereo sounds are not attenuated, at all.

Lua additions:
- playSfx() takes an additional parameter now.
- entity_setStopSoundsOnDeath()
2013-07-22 03:29:57 +02:00
fgenesis
c2506d5bb2 Make some ints floats. 2013-07-20 20:17:57 +02:00
fgenesis
7fb9204e97 Minor changes & simplifications to Lua interface. 5 new functions.
This changes all typical vector interpolation functions that get
value, time, loopType, pingPong, ease as args from the Lua state;
use unified functions for all value type occurances.
This fixes the slightly annoying problem that it was not possible to
pass a boolean true to pingPong or ease, because lua_tonumber() would
always return 0 in that case.

Also changed:
- obj_getWorldPosition() now takes optional x,y-vector

New:
- obj_getWorldPositionAndRotation() is a more efficient shortcut,
	as often both position and rotation are retrieved together,
	and the underlying matrix chain operation is rather expensive.
- entity_getEmitter()
- entity_getNumEmitters()
- setSceneColor2()
- getSceneColor2()
2013-07-20 17:44:27 +02:00
fgenesis
d0623c2e8f Fix crash on shutdown with active SDL_gamecontroller + work around rumble effect not stopping
Tested on WinXP with wired XBox360 controller.
2013-07-19 13:43:26 +02:00
fgenesis
03f99058c3 Apply SDL2 patch by ryan, with some adjustments to apply properly.
The fix as suggested by Jonas Kulla on the mailing list is also in.
There hasn't been any extensive testing, and it may not yet compile
on platforms other than win32.
2013-07-18 23:29:55 +02:00
fgenesis
93c59fdb28 Minor extensions to script interface:
- quad_setRepeatTexture()
- quad_setRepeatScale()
- quad_isRepeatTexture()

(bone, entity, ... as well)

- getOldDT() - return unmodified dt
- getDT() - as passed to update(), for complicated edge cases
            where dt is unavailable but required.
2013-07-15 03:22:41 +02:00
fgenesis
0431932b2b More extensions to script interface:
- obj_fadeAlphaWithLife()
- obj_setOverrideRenderPass()
- setLayerRenderPass()
- debugBreak()
- saveMenu()
- setGemPosition()
- removeGem()
2013-07-11 15:06:38 +02:00
fgenesis
c2689bb71c Fix build on OSX 2013-06-26 15:15:19 +02:00
fgenesis
1897329071 Allow downloading data while the game is minimized.
With this change, downloads should no longer abort when the game is
minimized for more than a few seconds.
2013-06-24 03:39:48 +02:00
fgenesis
93abd03c27 Merge branch 'experimental'
Conflicts:
	BBGE/Shader.cpp
2013-06-24 02:48:17 +02:00
fgenesis
26d056d924 Slightly more sensible error/msgbox handling 2013-06-23 18:50:10 +02:00
fgenesis
8da8b5462b Remove unnecessary exception handling. Hopefully fixes build on linux. 2013-06-21 20:35:24 +02:00
fgenesis
0d98efadc4 Seems this line was lost... 2013-06-19 18:45:19 +02:00
fgenesis
4e1c2746ef Add support for "override" data directory (as suggested by smls).
Now it loads in this order:

AQUARIA_DEFAULT_DATA_DIR
AQUARIA_DEFAULT_DATA_DIR/override
AQUARIA_EXTRA_DATA_DIR
2013-06-19 18:44:24 +02:00
fgenesis
13eca9785f Intial support for package paths (as suggested by smls).
This commit is mainly intended to ease packaging for linux.
Unless environment variable AQUARIA_DATA_PATH is set, there are two
directories which are checked by the game:
If AQUARIA_DEFAULT_DATA_DIR is defined, it will chdir there for main
operation. If it's not defined, it chdirs into the directory where
the executable is located.
Then, if AQUARIA_EXTRA_DATA_DIR is defined, it will mount this directory
and all contents into the working path, so that the files present there
will override those from the working directory when accessed by the game.

Setting the environment variable AQUARIA_DATA_PATH will disable this
behavior altogether and use *only* AQUARIA_DATA_PATH as working dir.
2013-06-19 02:08:24 +02:00
fgenesis
6962a3e3ab Improvements to shader API; use handles instead of raw pointers. 2013-06-15 04:11:11 +02:00
fgenesis
486e8f92ad Make the dark layer affected by postprocessing shaders.
This has the side effect that elements on the dark layer will now properly
wiggle when affected by water ripples.
Before this patch, the dark layer was always drawn above the postprocessed
screen content, unaffected.
2013-06-15 03:00:20 +02:00
fgenesis
836de14093 Implement multi-pass postprocessing shader.
This allows attaching multiple shader programs, processing the entire
screen as texture. Chaining shaders works, each shader will use
the output of the previous shader as input.
2013-06-15 02:38:49 +02:00
fgenesis
3485199bec temp commit - work on shaders 2013-06-15 00:58:32 +02:00
fgenesis
0611568d3e Add precacher for mods 2013-05-24 03:34:10 +02:00
fgenesis
cfd9b0ca5b Fix bug in shader uniform assignment 2013-05-15 01:56:50 +02:00
fgenesis
8c80cf6318 Add shader interface API to Lua API 2013-05-12 00:06:26 +02:00
fgenesis
2ac3ad9fb1 Fixes & enhancements to shader interface code 2013-05-12 00:05:57 +02:00
fgenesis
c62d9f2370 Re-introduce AfterEffect shader functonality, part 1.
This repairs pixel/vertex shader code that was seemingly
experimented with during testing, but it was never used and no
shaders ever made it to the data files.
2013-05-10 22:22:35 +02:00
fgenesis
12ea97f051 Disable all glEnable/glDisable() calls for GL_CULL_FACE, except one glDisable() during renderer init.
GL_CULL_FACE is effectively always disabled, except for quad strip
rendering, and keeping GL_CULL_FACE disabled there does not seem
to cause any visual artifacts.
Instead, it enhances skeletal animation possibilities
(e.g. flipping bone strips over without it disappearing)
2013-05-02 04:31:07 +02:00
fgenesis
55ead19076 Remove spirit form dependency on WorldType, and add related Lua interfaces.
This commit introduces a second pause mode:
Full game pause (as in menu), and world pause (as in spirit form).
All related checks are no longer done against WT_* constants,
but against the new world pause which is functionally equivalent,
but more flexible. Continuity::worldType is now only used to toggle
world pause correctly, and to apply some related graphical effects.
The world pause can also be controlled via script without actually
switching forms.
Added Lua functions:
+ node_setSpiritFreeze()
+ quad_setPauseLevel()
+ isWorldPaused()
+ setWorldPaused()
2013-04-25 02:51:54 +02:00
fgenesis
cba3535487 Keep track of total number of GL render calls 2013-04-22 23:36:31 +02:00
fgenesis
0c768a711d Cause less memory stress in InterpolatedVector assignment 2013-04-21 18:47:51 +02:00
fgenesis
23e0707c5b Add Lua func entity_getSkeletalName() and do not abort when a skin file is not found. Also warn on missing skeletal file. 2013-02-27 01:54:38 +01:00