Tilemaps can now load their own physics engines from map properties. The gravity for the arcade simulation is acting a little funny when populated from the map properties.
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
#define _TILEMAP_H_
|
||||
|
||||
#include <limits.h>
|
||||
#include "actor.h"
|
||||
#include "staticstring.h"
|
||||
#include <akgl/actor.h>
|
||||
#include <akgl/staticstring.h>
|
||||
#include <akgl/physics.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#define AKGL_TILEMAP_MAX_WIDTH 512
|
||||
@@ -98,6 +99,10 @@ typedef struct {
|
||||
float p_rate;
|
||||
akgl_Tileset tilesets[AKGL_TILEMAP_MAX_TILESETS];
|
||||
akgl_TilemapLayer layers[AKGL_TILEMAP_MAX_LAYERS];
|
||||
|
||||
// Different levels may have different physics.
|
||||
bool use_own_physics;
|
||||
akgl_PhysicsBackend physics;
|
||||
} akgl_Tilemap;
|
||||
|
||||
akerr_ErrorContext AKERR_NOIGNORE *akgl_tilemap_load(char *fname, akgl_Tilemap *dest);
|
||||
|
||||
Reference in New Issue
Block a user