diff --git a/data/map project.tiled-session b/data/map project.tiled-session index 0cc20a5..3ded4a8 100644 --- a/data/map project.tiled-session +++ b/data/map project.tiled-session @@ -1,20 +1,23 @@ { "activeFile": "overworld.tsx", "expandedProjectPaths": [ - ".", - "templates" + "templates", + "." ], "fileStates": { + ":/automap-tiles.tsx": { + "scaleInDock": 1 + }, "entities.tsx": { "scaleInDock": 1, "scaleInEditor": 1 }, "map.tmj": { - "scale": 4, + "scale": 3, "selectedLayer": 1, "viewCenter": { - "x": 6622.75, - "y": 6689.625 + "x": 6909.5, + "y": 6948.166666666666 } }, "overworld.tsx": { diff --git a/data/map.tmj b/data/map.tmj index b639e2b..0ded389 100644 --- a/data/map.tmj +++ b/data/map.tmj @@ -28,15 +28,15 @@ }, { "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + 1, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 115, 115, 115, 115, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1], "height":16, "width":16, "x":432, @@ -182,16 +182,16 @@ }, { "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 49, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 67, 49, 49, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 67, 49, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 67, 49, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 67, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 49, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 49, 49, 67, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 49, 49, 67, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 49, 49, 49, 49, 1, 1, 1, 1, 1, + 1, 1, 49, 49, 49, 49, 49, 49, 49, 49, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -203,13 +203,13 @@ "y":432 }, { - "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + "data":[1, 115, 115, 115, 115, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 115, 115, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 115, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 115, 115, 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 115, 115, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -270,7 +270,6 @@ }], "height":32, "id":1, - "locked":true, "name":"Base Layer", "opacity":1, "startx":384, @@ -285,16 +284,16 @@ "chunks":[ { "data":[0, 0, 0, 2, 3, 3, 3, 3, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 11, 11, 11, 6, 3, 3, 3, 3, 3, 3, 3, - 0, 0, 0, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 0, 0, 0, 10, 11, 11, 11, 11, 14, 19, 19, 19, 19, 19, 19, 19, - 0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 11, 11, 11, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 18, 19, 19, 19, 19, 20, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 98, 99, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 0, 0, 116, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 0, 0, 0, 99, 99, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0], + "height":16, + "width":16, + "x":432, + "y":416 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 66, 0, 68, 0, 85, 0, 71, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 69, 54, 52, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 39, 0, 66, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 82, 69, 0, 52, 0,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 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":16, + "width":16, + "x":432, + "y":432 }], "height":32, "id":5, - "locked":true, "name":"Overlay Base Layer", "opacity":1, "startx":400, - "starty":400, + "starty":416, "type":"tilelayer", "visible":true, - "width":32, + "width":48, "x":0, "y":0 }, { "draworder":"topdown", "id":3, + "locked":true, "name":"Object Layer 1", "objects":[ { @@ -356,6 +421,18 @@ "template":"templates\/NPC.tx", "x":6737, "y":6672.91666666667 + }, + { + "gid":257, + "height":16, + "id":6, + "name":"Player Spawn", + "rotation":0, + "type":"player_spawn", + "visible":true, + "width":16, + "x":6743.33333333333, + "y":6989.33333333333 }], "opacity":1, "type":"objectgroup", @@ -364,7 +441,7 @@ "y":0 }], "nextlayerid":6, - "nextobjectid":5, + "nextobjectid":7, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.11.1", @@ -375,11 +452,11 @@ "source":"overworld.tsx" }, { - "firstgid":65, + "firstgid":257, "source":"entities.tsx" }, { - "firstgid":129, + "firstgid":321, "source":":\/automap-tiles.tsx" }], "tilewidth":16, diff --git a/data/overworld.tsx b/data/overworld.tsx index 7109f0e..d1617f7 100644 --- a/data/overworld.tsx +++ b/data/overworld.tsx @@ -1,4 +1,4 @@ - - + + diff --git a/data/templates/NPC.tx b/data/templates/NPC.tx index 1026303..f76ec07 100644 --- a/data/templates/NPC.tx +++ b/data/templates/NPC.tx @@ -1,5 +1,5 @@ diff --git a/data/tilemap.png b/data/tilemap.png index 51b3391..b636c0f 100644 Binary files a/data/tilemap.png and b/data/tilemap.png differ diff --git a/data/tilemap.pxo b/data/tilemap.pxo index bd4b351..3ad9091 100644 Binary files a/data/tilemap.pxo and b/data/tilemap.pxo differ diff --git a/src/dusk/entity/player.c b/src/dusk/entity/player.c index 02c6c19..c7e37ad 100644 --- a/src/dusk/entity/player.c +++ b/src/dusk/entity/player.c @@ -9,6 +9,7 @@ #include "assert/assert.h" #include "input.h" #include "display/render.h" +#include "world/world.h" void playerInit() { entity_t *ent = &ENTITIES[0]; @@ -16,8 +17,8 @@ void playerInit() { entityInit(ent, ENTITY_TYPE_PLAYER); ent->id = PLAYER_ENTITY_ID; - ent->x = 32; - ent->y = 32; + ent->x = WORLD_PLAYER_SPAWN_X; + ent->y = WORLD_PLAYER_SPAWN_Y; } void playerNPCInit(entity_t *entity) { diff --git a/src/duskraylib/display/draw/drawoverworld.c b/src/duskraylib/display/draw/drawoverworld.c index 3f1f7b7..051d359 100644 --- a/src/duskraylib/display/draw/drawoverworld.c +++ b/src/duskraylib/display/draw/drawoverworld.c @@ -47,6 +47,7 @@ void drawOverworldDraw(void) { }; uint8_t colorCount = sizeof(colors) / sizeof(Color); + BeginBlendMode(BLEND_ALPHA_PREMULTIPLY); do { // Base layer for(uint8_t i = 0; i < CHUNK_TILE_COUNT; i++) { @@ -98,6 +99,7 @@ void drawOverworldDraw(void) { chunk++; } while(chunk < CHUNK_MAP.chunks + CHUNK_MAP_COUNT); + EndBlendMode(); // Entities entity_t *entity = ENTITIES; diff --git a/src/duskraylib/display/render.c b/src/duskraylib/display/render.c index c3090a5..2c47328 100644 --- a/src/duskraylib/display/render.c +++ b/src/duskraylib/display/render.c @@ -45,7 +45,7 @@ void renderDraw(void) { // Draw the render texture to the screen. BeginDrawing(); - ClearBackground(WHITE); + ClearBackground(RED); // Keep aspect and center the render int32_t renderWidth, renderHeight, renderX, renderY; const int32_t width = GetScreenWidth(); @@ -74,6 +74,8 @@ void renderDraw(void) { void renderDispose(void) { UnloadRenderTexture(RENDER_SCREEN_TEXTURE); + UnloadTexture(RENDER_TILEMAP_TEXTURE); + UnloadTexture(RENDER_ENTITIES_TEXTURE); CloseWindow(); } diff --git a/tools/mapcompile/mapcompile.py b/tools/mapcompile/mapcompile.py index dceab99..7b09840 100644 --- a/tools/mapcompile/mapcompile.py +++ b/tools/mapcompile/mapcompile.py @@ -365,8 +365,11 @@ for chunkY in range(mapHeightInRealChunks): f.write(f" .entities = {{\n") for entity in entities: # Entities are center aligned in tiled. - localX = entity['x'] - (topLeftTileX * TILE_WIDTH) - localY = entity['y'] - (topLeftTileY * TILE_HEIGHT) + localX = round(entity['x'] - (topLeftTileX * TILE_WIDTH)) + localY = round(entity['y'] - (topLeftTileY * TILE_HEIGHT)) + + if 'type' in entity and entity['type'] not in ENTITY_TYPE_MAP: + continue f.write(" {\n") f.write(f" .id = {entity['id']},\n") @@ -379,6 +382,20 @@ for chunkY in range(mapHeightInRealChunks): f.write("};\n\n") +# Determine map global things +playerSpawnX = 0 +playerSpawnY = 0 + +for ob in objectLayer['objects']: + if 'type' not in ob or ob['type'] != 'player_spawn': + continue + if 'x' not in ob or 'y' not in ob: + print(f"Error: Player spawn object does not contain 'x' or 'y' key.") + sys.exit(1) + playerSpawnX = round(ob['x']) + playerSpawnY = round(ob['y']) + break + # Output header file. headerPath = os.path.join(worldDir, "world.h") with open(headerPath, 'w') as f: @@ -404,5 +421,7 @@ with open(headerPath, 'w') as f: f.write("NULL, ") f.write("\n") f.write("};\n\n") + f.write(f"#define WORLD_PLAYER_SPAWN_X {playerSpawnX}\n") + f.write(f"#define WORLD_PLAYER_SPAWN_Y {playerSpawnY}\n") print(f"chunks.h generated at: {headerPath}") \ No newline at end of file