1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-13 19:56:54 +00:00
Commit graph

26 commits

Author SHA1 Message Date
James Le Cuirot
43d41feeb8 Migrate from TinyXML v1 to v2. Not bundled (yet). 2014-06-08 21:11:23 +01:00
fgenesis
b8af382bd9 SceneEditor: Hack for german keyboard layout 2014-03-28 03:52:24 +01:00
fgenesis
2cec85fd05 Improve camera zooming behavior + camera related cleanups
- Now, the camera will now no longer be pulled towards the upper left
  or lower rigtht corner.
- cameraPos was never used as an interpolating vector, cleaned up related code.
- Core::invGlobalScale is now updated whenever Core::globalScale is changed
  (Not a nice solution but it does work)
- Increase cull radius by 10%, should prevent tiles from disappearing when
  zoomed in a lot.
2014-03-07 17:59:36 +01:00
fgenesis
900b481f99 Reload stringbank on map editor map reload 2013-12-12 23:14:37 +01:00
fgenesis
ab74abe903 Fix some SceneEditor crashes/quirks and remove some dead code in the process. 2013-09-24 16:54:43 +02:00
fgenesis
fdae0fe9a4 New action: ACTION_PLACE_AVATAR. Add Lua functions:
- entity_getBoneLockData()
- entity_getWeight()
2013-09-04 16:09:58 +02:00
fgenesis
1bbd9e097d Initial supported for scripted ingredients, not fully tested.
This adds a few additional interface functions, to be defined in:
scripts/global/cooking.lua, or
_mods/XYZ/scripts/cooking.lua

Added functions:
cookFailure(a,b,c) - Called when no recipe could be found for ingredients a,b,c
getIngredientString() - Called by the menu. Expected to return effects description
                        for scripted ingredient..
useIngredient(name) - Called when a scripted ingredient will be eaten.
                      Return true to eat.

Use a line like this in ingredients.txt:
LuaLoaf sealoaf Loaf (script)
to enable calling useIngredient() upon eating.
2013-06-20 04:49:20 +02:00
fgenesis
366838d800 little enhancement to scene editor: show more entity details 2012-12-23 22:43:46 +01:00
fgenesis
0f13f08357 Remove unused stuff
- entity group IDs
- entity node groups (?!)
- WaterFont.[cpp|h]
2012-12-13 19:57:30 +01:00
fgenesis
5d74665323 Faster mousewheel zoom for SceneEditor + reload songbank when reloading a map in the editor 2012-12-13 18:36:13 +01:00
fgenesis
82e0be355c Fix possible crash on End key in SceneEditor (thx KS-10 for reporting).
This was due to a logic bug mistaking tile indices with array indices.
2012-09-17 03:25:13 +02:00
fgenesis
5d41c93c5b Little SceneEditor on-sreen text enhancement, regarding (auto-)save 2012-09-02 02:29:12 +02:00
fgenesis
83dbb7e310 minor things, added entity_loadSkin function 2012-04-01 18:14:02 +02: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
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
dd05ed18fd very little SceneEditor enhancements 2012-01-03 04:45:28 +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
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
e64fb75f84 sync with icculus repo 2011-11-20 15:44:17 +01: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
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
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
13c3d8a7af fix a little crash 2011-08-08 03:55:40 +02:00
fgenesis
3096eaf5e2 initial commit. This is icculus version 5542b94cae02a6333845854bbbd1abe0a259f1a4 2011-08-03 22:05:33 +02:00