Add imagemap that uses a prerendered background
This commit is contained in:
2
TODO.txt
2
TODO.txt
@@ -24,8 +24,6 @@ Actors should be able to follow a path defined with a polyline on a layer on the
|
|||||||
|
|
||||||
Actors should be able to calculate their facing state automatically depending on their movement state (for path following)
|
Actors should be able to calculate their facing state automatically depending on their movement state (for path following)
|
||||||
|
|
||||||
Maps should be able to have image layers
|
|
||||||
|
|
||||||
Map parallax should work
|
Map parallax should work
|
||||||
|
|
||||||
Should implement support for rendering CLAY UI elements
|
Should implement support for rendering CLAY UI elements
|
||||||
|
|||||||
BIN
assets/ffbg2-scaled.png
Normal file
BIN
assets/ffbg2-scaled.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 484 KiB |
99
assets/imagemap.tmj
Normal file
99
assets/imagemap.tmj
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
{ "compressionlevel":-1,
|
||||||
|
"height":48,
|
||||||
|
"infinite":false,
|
||||||
|
"layers":[
|
||||||
|
{
|
||||||
|
"id":4,
|
||||||
|
"image":"../assets/ffbg2-scaled.png",
|
||||||
|
"name":"Image Layer 1",
|
||||||
|
"offsetx":5.6843418860808e-14,
|
||||||
|
"offsety":2.01612903225805,
|
||||||
|
"opacity":1,
|
||||||
|
"type":"imagelayer",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"draworder":"topdown",
|
||||||
|
"id":2,
|
||||||
|
"locked":true,
|
||||||
|
"name":"Object Layer 1",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"gid":147,
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"player",
|
||||||
|
"properties":[
|
||||||
|
{
|
||||||
|
"name":"character",
|
||||||
|
"type":"string",
|
||||||
|
"value":"little guy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"state",
|
||||||
|
"type":"int",
|
||||||
|
"value":24
|
||||||
|
}],
|
||||||
|
"rotation":0,
|
||||||
|
"type":"actor",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":440.510088317656,
|
||||||
|
"y":140.347239175702
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gid":149,
|
||||||
|
"height":16,
|
||||||
|
"id":2,
|
||||||
|
"name":"npc",
|
||||||
|
"properties":[
|
||||||
|
{
|
||||||
|
"name":"character",
|
||||||
|
"type":"string",
|
||||||
|
"value":"little guy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"state",
|
||||||
|
"type":"int",
|
||||||
|
"value":272
|
||||||
|
}],
|
||||||
|
"rotation":0,
|
||||||
|
"type":"actor",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":261.106052990594,
|
||||||
|
"y":156.523012852732
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"nextlayerid":5,
|
||||||
|
"nextobjectid":3,
|
||||||
|
"orientation":"orthogonal",
|
||||||
|
"renderorder":"right-down",
|
||||||
|
"tiledversion":"1.8.2",
|
||||||
|
"tileheight":16,
|
||||||
|
"tilesets":[
|
||||||
|
{
|
||||||
|
"columns":48,
|
||||||
|
"firstgid":1,
|
||||||
|
"image":"../assets/World_A1.png",
|
||||||
|
"imageheight":576,
|
||||||
|
"imagewidth":768,
|
||||||
|
"margin":0,
|
||||||
|
"name":"World_A1",
|
||||||
|
"spacing":0,
|
||||||
|
"tilecount":1728,
|
||||||
|
"tileheight":16,
|
||||||
|
"tilewidth":16
|
||||||
|
}],
|
||||||
|
"tilewidth":16,
|
||||||
|
"type":"map",
|
||||||
|
"version":"1.8",
|
||||||
|
"width":64
|
||||||
|
}
|
||||||
7
assets/properties.json
Normal file
7
assets/properties.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"some.key.with.a.value": "value",
|
||||||
|
"game.screenwidth": "640",
|
||||||
|
"game.screenheight": "480"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
deps/libakgl
vendored
2
deps/libakgl
vendored
Submodule deps/libakgl updated: 36dfd47a06...b8dee456ca
@@ -115,7 +115,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||||||
CATCH(errctx, akgl_load_start_bgm((char *)&dirnamebuf));
|
CATCH(errctx, akgl_load_start_bgm((char *)&dirnamebuf));
|
||||||
CATCH(errctx, music_toggle(NULL, NULL));
|
CATCH(errctx, music_toggle(NULL, NULL));
|
||||||
|
|
||||||
strcpy((char *)&dirnamebuf, "assets/tilemap.tmj");
|
strcpy((char *)&dirnamebuf, "assets/imagemap.tmj");
|
||||||
CATCH(errctx, akgl_tilemap_load((char *)&dirnamebuf, (akgl_Tilemap *)&gamemap));
|
CATCH(errctx, akgl_tilemap_load((char *)&dirnamebuf, (akgl_Tilemap *)&gamemap));
|
||||||
|
|
||||||
CATCH(errctx, akgl_text_loadfont("C64Pro", "assets/C64_Pro-STYLE.ttf", 18));
|
CATCH(errctx, akgl_text_loadfont("C64Pro", "assets/C64_Pro-STYLE.ttf", 18));
|
||||||
|
|||||||
Reference in New Issue
Block a user