Commit graph

153 commits

Author SHA1 Message Date
Gered ab9c3a1d9a fix compile errors after libgdx 1.0.0 update 2014-04-26 22:36:13 -04:00
Gered 61cdeea7bb add Screenshot class (for taking screenshots programmatically, duh) 2014-04-22 18:08:34 -04:00
Gered f5462fef38 change method access to public (it can be useful in certain situations) 2014-04-21 10:55:23 -04:00
Gered 4f89ca6781 fix incorrect pre-transition-out sanity check 2014-04-21 09:18:57 -04:00
Gered 7956585cf6 add StateManager.pop which allows popping arbitrary (active) GameStates 2014-04-19 12:26:01 -04:00
Gered 24de53b6a4 ensure that GameState.onPush is invoked after the StateInfo object is registered in the 'states' list 2014-04-19 12:12:57 -04:00
Gered a65e55651c add similar getters but which allow restricting to certain state types 2014-04-19 12:01:39 -04:00
Gered d96316f44f add getters for retrieving GameStates before/after the one given 2014-04-19 11:48:55 -04:00
Gered cb7cf983d6 add helper class for some simple screen effect transition abstraction 2014-04-17 10:09:10 -04:00
Gered 4dd1fec431 default fade speed is too fast (specially now that we have split the update event into frame and state events) 2014-04-17 10:07:34 -04:00
Gered ff8016d53c refactor the path/filename combining stuff 2014-04-16 13:23:23 -04:00
Gered 9aaf622a14 update TextureAtlas loading to allow for relative texture atlas image filenames to be specified (if no path, assume same dir as the json atlas file) 2014-04-16 13:15:40 -04:00
Gered 80ef969802 add helper method for combining paths 2014-04-16 13:15:02 -04:00
Gered 814ceecacd rename JsonTextureAtlasDefinition 2014-04-16 07:57:54 -04:00
Gered 5bc98d5285 add MaterialTileMapping.hasMappings 2014-04-15 17:27:46 -04:00
Gered d970335a40 load up the material mapping info into the TextureAtlas's MaterialTileMapping object 2014-04-15 17:24:18 -04:00
Gered fe3611da0f this is not a dependency anymore as it's loaded inline with the rest of the TextureAtlas's info 2014-04-15 17:21:13 -04:00
Gered fc4aebc03f the TextureAtlas json definition will now itself contain material mapping info 2014-04-15 17:20:35 -04:00
Gered 4b392a4e28 invert dependency back the way it was before. kindof
to be quite honest, given this kind of "A -> B, B -> A" type of design,
TextureAtlas and MaterialTileMapping could be merged into one class.
however, for now I think I like their respective functionality to be
in separate classes just to keep the code a bit more separate
functionality-wise
2014-04-15 17:18:29 -04:00
Gered 7aa79d4652 add TextureAtlas asset loading support for a MaterialTileMapping reference 2014-04-15 16:56:37 -04:00
Gered de6f7ecc77 add optional MaterialTileMapping instance to TextureAtlas 2014-04-15 16:55:22 -04:00
Gered d8cb3f2a4a add materialMapping property 2014-04-15 16:50:50 -04:00
Gered c30e638901 add JsonMaterialMapping 2014-04-15 16:50:37 -04:00
Gered a5a063cf2f take out the TextureAtlas dependency. we'll reverse it (optional dependency) 2014-04-15 16:50:21 -04:00
Gered ef12cab540 add MaterialTileMapping 2014-04-15 16:21:12 -04:00
Gered f6bf494ee8 add TextureAtlasAnimator.reset method 2014-04-15 15:53:16 -04:00
Gered b609be05d6 add method to TextureAtlasAnimator for adding all TextureAtlas objects currently loaded in an AssetManager 2014-04-15 15:46:53 -04:00
Gered acf6ece6f4 dont do this TextureAtlasAnimator in the TextureAtlas loading params
we'll add another way to do this shortly. i forsee too many weird
issues doing it this way (mostly surrounding inconsistently
registering atlases with the animator object)
2014-04-15 15:40:44 -04:00
Gered 02d65f6a7d use AssetLoadingException for throwing exceptions during asset loading
duh
2014-04-15 15:38:44 -04:00
Gered ebbd00c265 add AssetLoadingException 2014-04-15 15:28:55 -04:00
Gered c53ae6cc7b rename this subpackage again for fun and profit 2014-04-15 15:11:05 -04:00
Gered b89171654c make TextureAtlasJsonLoader private
should really be using libgdx's AssetManager for this kind of thing
2014-04-15 14:56:50 -04:00
Gered 7f2eb3cb46 remove support for loading via json file without an AssetManager 2014-04-15 12:28:42 -04:00
Gered c5184a40d4 'loaders' is probably a better name for it 2014-04-15 10:03:22 -04:00
Gered fd057318f0 all custom asset loading to be under a common sub-package 2014-04-15 10:02:34 -04:00
Gered 5fc54e26f3 convenience methods for loading a bit easily 2014-04-15 10:01:25 -04:00
Gered 49885cb5d8 TextureAtlasDesc can really just be a static class like it was before.. 2014-04-15 09:57:51 -04:00
Gered 8e1d8bf3d0 add AssetManager instance to GameApp. initialize with our custom loaders 2014-04-14 15:55:48 -04:00
Gered 6e0e41151d change TextureAtlasLoader to a libgdx asset loader class 2014-04-14 14:48:32 -04:00
Gered 6356c97f2f add TextureAtlasDesc 2014-04-14 14:32:57 -04:00
Gered ad15f2850c add method to register/copy all animations from a TextureAtlas at once 2014-04-14 14:19:45 -04:00
Gered fff74d0b16 use separate Animation class for now to hold info. new addAnimation method. TextureAtlasAnimator will read through these and set up it's own data structures from them 2014-04-14 14:15:18 -04:00
Gered b6de4a38c2 add animations collection to TextureAtlas 2014-04-14 14:09:15 -04:00
Gered 7d2b164f53 fix font rendering (for cases when e.g. rendering a font from a Skin)
in those cases, the glyph src coordinates will be relative to the
font's subtexture region in the Skin, whereas the glyph uv coords will
be correct if rendering from a texture region or a standalone texture
2014-03-10 18:00:24 -04:00
Gered 208a118bc0 add missing call to trigger onResize event in the StateManager 2014-02-16 16:15:40 -05:00
Gered fd60e74393 handleBasicMovementCollision now moves the swept-sphere entity right up to the collision point 2014-01-02 09:32:30 -05:00
Gered 216ee98acc onRender()'s 'delta' param renamed to better reflect its purpose 2013-12-30 15:46:12 -05:00
Gered 8def4a12d6 ScreenEffects should also have both onUpdateGameState and onUpdateFrame 2013-12-30 15:36:52 -05:00
Gered bf659f7bc2 split up onUpdate() methods into onUpdateGameState and onUpdateFrame
this will help avoid needing to place a lot of update logic that is
tied to the frame rate (e.g. anything not related to physics
integration) in onRender()
2013-12-30 14:31:26 -05:00
Gered 8d9457b872 rework the main loop to use a different method for fixed timestep
Use Glenn Fiedler's "Fix your timestep!" article's approach instead.
Just need to remember to always interpolate between prevState and
currentState and not extrapolate from the currentState when rendering
(for best results!)
2013-12-30 14:00:14 -05:00