Commit graph

106 commits

Author SHA1 Message Date
King_DuckZ
f142367a8a Use the system's PhysFS if present.
Also add an option to allow the user to override this and force the use of the supplied library.
Pass -DWITH_BUILTIN_PHYSFS=on to cmake to force using the supplied library.
2014-08-04 18:57:14 +02:00
King_DuckZ
164030202c Bouncing works but going too high causes an assertion.
This commit also reduces the jump size and the character's size.
2014-08-03 15:13:54 +02:00
King_DuckZ
df8f5ca6b2 Add a debug-only function to pretty-print Line objects. 2014-08-01 17:02:20 +02:00
King_DuckZ
c3baee5b9c Register the character's collision bar to the mover.
This fixes the non-working collision detection.
2014-08-01 17:01:58 +02:00
King_DuckZ
c12a6407d9 Bugfix in Line class.
A constructor was wrong and the loop was wrong as well.
2014-08-01 16:42:42 +02:00
King_DuckZ
3522ce37a3 Add an offset in HorzCollisionBar and reset it at the beginning of every frame. 2014-08-01 16:41:55 +02:00
King_DuckZ
cdd37fead7 Add code to register objects to the collider.
The character and the platforms can register now, but
collision is not triggered for some reason.
2014-08-01 00:50:49 +02:00
King_DuckZ
42fb50e93e Add the collision grouping logic. 2014-07-31 20:13:13 +02:00
King_DuckZ
1037e2e141 Fix the assert when quitting. 2014-07-31 12:00:29 +02:00
King_DuckZ
0bdaa63db1 Cut the verbosity, it's not useful here. 2014-07-31 11:22:08 +02:00
King_DuckZ
61d19865dd Fix the generation of new platforms so they stick to the average. 2014-07-31 11:20:50 +02:00
King_DuckZ
4166983809 Generate random platforms nicely.
This also fixes the build.
2014-07-30 13:46:50 +02:00
King_DuckZ
0e2303112f Assert fix. Enable clipping on platforms. 2014-07-28 11:04:02 +02:00
King_DuckZ
f52476a4ec Add some collision bars. 2014-07-28 11:03:39 +02:00
King_DuckZ
cdaffe0f2b Fix a mixup with template parameters. 2014-07-28 11:01:25 +02:00
King_DuckZ
54e8a27709 Working on the collision classes. 2014-07-28 11:00:55 +02:00
King_DuckZ
63bb31e728 Make the Prepare and Destroy step more customizable. 2014-07-28 10:58:15 +02:00
King_DuckZ
250600d8b2 Make the verbosity of the observers manager switchable from the cmake file. 2014-07-17 16:53:14 +02:00
King_DuckZ
06e3bfdeb7 New Line class and related algorithms and functions. 2014-07-16 23:42:37 +02:00
King_DuckZ
3f79507beb Assertion that the ObserverManager is empty when it's destroyed and verbosity. 2014-07-10 21:56:05 +02:00
King_DuckZ
9c660caec6 Use the new tree-based registration system in the mover. 2014-07-10 21:56:05 +02:00
King_DuckZ
61f0c28983 Revert "Refactoring in ObserversManager."
This reverts commit 9c2f61991869b7eacbb2bf3bfc257480aa1b24ba.

Conflicts:
	src/observersmanager.hpp
2014-07-10 21:56:05 +02:00
King_DuckZ
1682b1ade7 Use the new tree class instead of a flat array.
This is so that observers being registered can refer
"sub-observers" recursively. When such observer is deleted,
the whole underlying subtree is removed with it. This facilitates
the process of unregistering observers - ie: when the main
observer goes down because it is destroyed, all of its sub-observers
are removed as well, because in this architecture they are expected
to be aggregated to the main observer.
2014-07-10 21:56:05 +02:00
King_DuckZ
ad613dc3fd Import of the tree library.
See: http://tree.phi-sci.com/index.html
2014-07-10 21:56:05 +02:00
King_DuckZ
103689a29a Refactoring in ObserversManager.
Pull out the storage part so the class is more tidy.
2014-07-10 21:56:05 +02:00
King_DuckZ
173d5d2f99 README updated. 2014-07-10 21:56:05 +02:00
King_DuckZ
49d505815a README renamed, I'm writing it as markdown. 2014-07-10 21:56:04 +02:00
King_DuckZ
b4ddfa8f4f Fix for a crash occurring when the window is resized.
Temporary Platform objects were registering themselves.
The move ctor would then initialize the final object in
the circular buffer (see PlatformSystem), but it would
leave the address of the temporary object registered in
the ObserversManager.
2014-07-06 02:21:25 +02:00
King_DuckZ
0c8e9b2d7c Typo fix. 2014-07-05 22:46:09 +02:00
King_DuckZ
32d141e877 Look for Boost. 2014-07-05 20:49:18 +02:00
King_DuckZ
4a3a0a4782 Add some (badly) generated platforms that will scroll
down whenever the player's top side depasses the middle
of the screen.
WiP.
2014-07-05 20:33:16 +02:00
King_DuckZ
976d34f17e Movers moved into a separate directory. 2014-07-05 18:48:04 +02:00
King_DuckZ
9a8367c00c Bugfix.
Too many elements were trimmed from the end of the lists
due to a wrong calculation of the last unused chunk length.
2014-07-04 13:23:37 +02:00
King_DuckZ
765e28849c Add a circular buffer class.
This was necessary as the one provided by boost didn't work
with my use case (though I don't remember, I wrote this code
months ago and I'm only committing now).
2014-07-04 13:22:42 +02:00
King_DuckZ
b397fc2d7d Added a readme file 2014-05-13 11:49:51 +02:00
King_DuckZ
a95fcd629f Constructors that only throw if the operation they perform can throw. 2014-05-13 11:45:53 +02:00
King_DuckZ
fc50c6af55 Generate one platform and draw it. WiP. 2014-03-28 10:55:09 +01:00
King_DuckZ
4aef3a7c84 Grayscale png are not supported, this is rgb32 instead. 2014-03-28 10:52:17 +01:00
King_DuckZ
b21fe20459 Buildfix 2014-03-28 10:51:48 +01:00
King_DuckZ
bf8d9ea327 Call std::srand() at the beginning. 2014-03-28 10:50:33 +01:00
King_DuckZ
2a4ae78374 Move semantics in SizeNotifiable. 2014-03-26 23:00:02 +01:00
King_DuckZ
6fe884cd5a Platform and PlatformSystem added to the game. WiP. 2014-03-26 10:44:01 +01:00
King_DuckZ
4d9190b0db Swapping support added to SizeNotifiable. 2014-03-26 10:42:43 +01:00
King_DuckZ
79fbf0faf7 Support drawing textures without doing any clipping. 2014-03-25 10:32:34 +01:00
King_DuckZ
0674f2d28d Set the viewport size and resolution on resoultion change. 2014-03-25 00:21:10 +01:00
King_DuckZ
a1e507ef12 Clip texture before rendering. 2014-03-24 21:32:24 +01:00
King_DuckZ
8af4e432e7 Debug only code for printing vectors. 2014-03-24 00:28:21 +01:00
King_DuckZ
108c10883a Support for unary minus operator. 2014-03-23 22:07:01 +01:00
King_DuckZ
4cabdef306 New docs directory 2014-03-21 23:01:45 +01:00
King_DuckZ
06c244f87e gitignore updated 2014-03-21 23:00:54 +01:00