1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 17:53:47 +00:00
Commit graph

32 commits

Author SHA1 Message Date
Valentin Ochs
f9357e7fca Merge branch 'gccwarn' into controllerfixup 2017-01-17 11:15:47 +01:00
Valentin Ochs
fe0ab0418b Get rid of a lot of gcc warnings
Mostly signed/unsigned comparisons. Also some bugs, but I don't remember
where :D
2017-01-14 18:10:20 +01:00
fgenesis
8472718fb7 Major include refactor; changes to pretty much everything
This untangles some of the gigantic kitchen sink headers
in an attempt to split things into smaller files.
Also don't include gl.h, glext.h, windows.h,
and other such nonsense *everywhere*.

Lots of cleanups on the way too. More dead/unused code removal.

Remove incrFlag(), decrFlag() Lua functions.
2016-07-09 04:18:40 +02:00
fgenesis
9bb4226626 Remove RenderObjectLayer::sort() and related 2016-05-14 17:20:13 +02:00
fgenesis
65179870a9 Fix possible crash when loading applying a skeletal twice in one frame.
Possibly a regression from 300f326777.
2016-05-12 00:25:00 +02:00
fgenesis
d6dc3a8a09 Merge branch 'experimental' into moreclean
Conflicts:
	Aquaria/Avatar.cpp
	Aquaria/BoxElement.cpp
	Aquaria/BubbleRender.cpp
	Aquaria/FFTNotes.cpp
	Aquaria/StarRenderer.cpp
	Aquaria/WaterFont.cpp
	Aquaria/resource.h
	BBGE/AnimatedSprite.cpp
	BBGE/AnimatedSprite.h
	BBGE/BloomEffect.cpp
	BBGE/CShim.cpp
	BBGE/Collision.cpp
	BBGE/Collision.h
	BBGE/Core.cpp
	BBGE/Core.h
	BBGE/Cube.cpp
	BBGE/Cutscene.cpp
	BBGE/DFSprite.cpp
	BBGE/DFSprite.h
	BBGE/Datafile.cpp
	BBGE/Datafile.h
	BBGE/Flags.h
	BBGE/Interpolator.cpp
	BBGE/Light.cpp
	BBGE/Light.h
	BBGE/LightCone.cpp
	BBGE/Model.cpp
	BBGE/Model.h
	BBGE/OggStream.cpp
	BBGE/PackRead.cpp
	BBGE/PointSprites.cpp
	BBGE/RenderObject.cpp
	BBGE/SkeletalSprite.cpp
2016-05-10 18:40:01 +02:00
False.Genesis
0ced7c1d50 Merge pull request #27 from nbraud/unifdef
More cleanups
2016-05-10 10:20:36 +02:00
fgenesis
2f0940f1df Fix yet another oopsie RenderObject::setTexture()
Didn't apply empty ("") texture when another texture was already set.
2016-05-09 08:15:41 +02:00
fgenesis
e7791c5ddc Remove RenderObject::collisionRects.
Another vector that was always empty, optionally filled when specified
by a skeletal file, but none actually did this. Should be safe to remove.

Also small related optimization in Game::collideSkeletalVsCircle().
2016-05-07 01:00:16 +02:00
fgenesis
35a3888c94 Remove RenderObject::collidePosition and related code
This was always (0, 0) and optionally used for bones if defined in skeletal files.
None of the official skeletal files used this, so this should be safe to remove.
2016-05-07 00:47:45 +02:00
Nicolas Braud-Santoni
eb128e65a4 Remove commented-out code 2016-05-05 19:57:50 +02:00
Nicolas Braud-Santoni
276265be1d Eliminating obsolete #ifdefs and friends (#26)
The following options have been applied globally, using unifdef(1):
```c
 #undef BBGE_BUILD_DIRECTX

 #define BBGE_BUILD_OPENGL 1
 #define GL_GLEXT_LEGACY   1
 #define HAVE_PUTENV       1
 #define TIXML_USE_STL     1
 #define BBGE_BUILD_SDL    1
```
2016-05-05 03:49:41 +02:00
fgenesis
62c949f640 Fix rare texture loading problems introduced in 8bd40be8aa and f0d580d873. 2016-03-13 01:37:43 +01:00
fgenesis
d8da8576e8 Fix moveToBack/moveToFront when used on objects that have a parent 2015-11-28 23:42:39 +01:00
Jan Beich
b0a144c858 BBGE: use vector glm functions
glm-0.9.5 removed scalar rotate() and translate()
2015-09-17 21:43:31 +00:00
fgenesis
9faa503f32 Use glm for matrix math instead of the OpenGL stack
Should cause less GL pipeline stalling / driver spinlocking if enabled.
Disable AQUARIA_USE_GLM (default: true) in CMake to use the old GL pipeline version.

Based on the implementation by Matt Bierner:
https://bitbucket.org/mattbierner/ios-aquaria
2015-07-12 22:16:55 +02:00
fgenesis
8bd40be8aa Fix oversight in texture loading that could cause the cape to appear as white blorb. Thx Daxar. 2015-06-10 01:49:12 +02:00
fgenesis
f0d580d873 Refactor texture loading code; should fix a crash that started appearing recently. 2015-03-24 00:06:51 +01:00
fgenesis
9973afbac6 Allow custom capes in mods 2015-03-09 04:55:03 +01:00
fgenesis
ba9c37f704 Make RenderObject::moveTo[Front|Back]() work for things that have a parent. 2015-01-14 21:42:54 +01:00
fgenesis
26dc8560b7 Fix gcc compile (broke in 300f326777) 2014-09-15 20:59:21 +02:00
fgenesis
300f326777 Use std::vector instead of std::list for RenderObject children 2014-07-21 22:21:22 +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
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
1350876b3d Restore & correct collision radius rendering. Enabled toggling the debug console on Mac.
Collision rendering is now mapped to Ctrl+Shift+Return instead of capslock.
Also fixed one float->int truncation in script interface,
and removed useless debug message when particle effect "" was supposed
to be spawned (but does never exist).
2012-05-05 17:00:46 +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
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
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
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
3096eaf5e2 initial commit. This is icculus version 5542b94cae02a6333845854bbbd1abe0a259f1a4 2011-08-03 22:05:33 +02:00