1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-21 21:24:58 +00:00
Commit graph

242 commits

Author SHA1 Message Date
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
4f6447b58e Script interface extensions:
- shot_setTargetPoint()
- shot_getTargetPoint()
- entity_getTargetPriority()
- fix oversight in entity_doEntityAvoidance()
- entity_getTargetRange()
- getJoystickAxisLeft()
- getJoystickAxisRight()
2013-08-29 03:58:50 +02:00
fgenesis
18a19ca115 Disable path finding debug spam. 2013-08-28 04:33:12 +02:00
fgenesis
01d9211a34 Little script interface changes:
- Add avatar_isSwimming()
- toggleInput() does now parse bools correctly
- pickupGem() returns gem ID
- Change in entity_doCollisionAvoidance():
  * Add support for ignore obs
  * One arg was shifted, this is now fixed but not sure if it adds a problem somewhere.
2013-08-28 04:20:36 +02:00
fgenesis
a7447cc599 Allow nodes to catch ACTION_SECONDARY. 2013-08-27 01:42:31 +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
fefb30a7b3 Allow entities and nodes to update while the game is paused.
Added Lua functions:
- node_setPauseFreeze()
- entity_setPauseFreeze()
- getFPS()

Also fixed possible crash in entity_setStateTime().
2013-08-26 20:56:34 +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
212a680541 Close singing interface + abort any song when avatar_setBlockSinging(true) is called 2013-07-29 16:32:18 +02:00
fgenesis
d107503d71 modselector: Clean out some old code, add support to open URL via webbrowser. 2013-07-27 00:41:15 +02:00
fgenesis
5c7401b877 Gfx changes for mod selector 2013-07-26 23:33:27 +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
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
49b6234ac8 Some new Lua functions for shots. Shots will now respect the prov. unused BouncePrt property.
- shot_setDamageType()
- shot_setCheckDamageTarget()
- shot_isCheckDamageTarget()
- shot_setTrailPrt()
2013-07-21 17:09:47 +02:00
fgenesis
c6ae568ed8 More Lua functions; allow specifying ingredient type by ID
- avatar_setBlockBackflip()
- avatar_isBlockBackflip()
- inv_getNumItems()
- inv_getItemName()
- getIngredientDataSize()
- getIngredientDataName()
2013-07-21 04:28:45 +02:00
fgenesis
08821f5156 Oops, copypaste typo 2013-07-20 23:25:00 +02:00
fgenesis
06e0be0856 Fix (harmless?) division by zero, show gamespeed in console 2013-07-20 22:49:28 +02:00
fgenesis
c2506d5bb2 Make some ints floats. 2013-07-20 20:17:57 +02:00
fgenesis
9f4c55c177 More new Lua functions.
- shot_getMaxSpeed()
- shot_setMaxSpeed()
- shot_getHomingness()
- shot_setHomingness()
- shot_getLifeTime()
- shot_setLifeTime()
- getScreenVirtualSize()
2013-07-20 20:16:26 +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
34fbbae71a Add Lua function rumble() to script force feedback 2013-07-20 04:03:15 +02:00
fgenesis
b945343326 Fix compile on win32. 2013-07-20 03:51:13 +02:00
fgenesis
f4ea746497 Merge branch 'master' into sdl2
Conflicts:
	CMakeLists.txt
2013-07-20 03:43:58 +02:00
fgenesis
45ba35ca4b Get rid of AQUARIA_FULL define and move the setting to usersettings.xml. Some changes regarding AQUARIA_DEMO.
This means there are no longer two builds necessary (one normal,
one dev), and all mod deveopment can be done using one build,
by setting

Demo builds now allow browsing the online mod list, but neither
downloading nor starting mods or applying patches.
2013-07-20 02:27:53 +02:00
fgenesis
1386e9edb3 Win32 resource file update, icons, and one little float->int cast fix in ScriptInterface 2013-07-20 00:54:28 +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
8ac88b9749 Fix logic bug causing oil drops to rotate. Really fixed now!
This corrects 211eb80c0a.
2013-07-15 03:19:42 +02:00
fgenesis
76cfa6fe33 Implement node messaging (node_msg() function); there is no reason entities have this but nodes do not.
Also made node script error messages a bit nicer.
2013-07-12 03:07:40 +02:00
fgenesis
3ad6eedd37 Add support for suppressing game actions from being handled, minor changes to actions
This allows to e.g. prevent ACTION_TOGGLEHELPSCREEN from being handled by
the game, and instead use a node's catch action functionality to handle the event.

Add related Lua functions:
- setIgnoreAction()
- isIgnoreAction()
- sendAction()
2013-07-11 23:49:39 +02:00
fgenesis
9e66c4cd69 Correct wrong mod precache logic 2013-07-11 15:07:39 +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
51ee827d98 Fix unsafe entity iteration.
It was possible to crash the game by creating many entities in a script
callback that iterates over entities, for example.
2013-07-05 00:06:28 +02:00
fgenesis
153dd522c9 Fixed handling of IET_SCRIPT, rename Lua callback func getIngredientString() to getIngredientEffectString(), compile fix 2013-06-26 00:34:35 +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
9b658cb531 Allow overriding title screen version nuber completely. 2013-06-24 03:09:58 +02:00
fgenesis
aba216d1dd Fix little problem added in 54d609a8b5.
Respecting maxspeed lerp is not a good idea, there are nodes that set this
(normalpass, energypass, just to name two).
This causes way too fast swimming while the maxspeed lerp is > 1.
2013-06-24 02:54:57 +02:00
fgenesis
93abd03c27 Merge branch 'experimental'
Conflicts:
	BBGE/Shader.cpp
2013-06-24 02:48:17 +02:00
fgenesis
f8ed78d331 High framerate problem wasn't fully fixed, let's try this again.
Little addition to 7891a2f011.
2013-06-23 22:41:35 +02:00
fgenesis
7dca65351c Implement loading/saving some more state data.
This is the final commit for android savegame compatibility.
Thanks to Andrew Church for explaining the new attributes
and their format.
2013-06-23 22:28:46 +02:00
fgenesis
26d056d924 Slightly more sensible error/msgbox handling 2013-06-23 18:50:10 +02:00
fgenesis
7faee73f14 Android save compat: Support "ch" (current health) value, and make maxHealth float. 2013-06-23 04:43:24 +02:00
fgenesis
318811f92d Savefile: Use ingr only if ingrNames does not exist.
Using ingrNames is a lot safer for changing ingredients.txt.
2013-06-23 03:18:23 +02:00
fgenesis
7891a2f011 Fix naija not moving properly on machines with very high FPS.
This bug occured when standing still and attempting to move,
having high FPS and very low difftime.
With near-zero vel, it was not built up enough per frame,
therefore velLen was always < 2 and was subsequently reset back to 0,
which resulted in naija never actually moving.
This bug could be reproduced by holding Shift+F with 60 FPS, and then
holding an arrow key.

Thanks to `Nax for reporting the problem.

(Cleaned out some cruft too, the actual change is the last line of the diff)
2013-06-23 02:53:47 +02:00
fgenesis
211eb80c0a Fix typo setting ingredient rotKind default value to the opposite of what it should be 2013-06-22 23:51:29 +02:00
fgenesis
2c99f010a4 Fixes to scripted ingredients, now it actually works 2013-06-21 03:33:35 +02:00
fgenesis
46516eefc8 ooops 2013-06-21 00:41:07 +02:00
fgenesis
fe5f6faa46 More save data compat with android version (world map gem data) 2013-06-21 00:40:19 +02:00