Merge
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "chunk.h"
|
||||
#include "util/memory.h"
|
||||
#include "assert/assert.h"
|
||||
#include "world/world.h"
|
||||
#include "rpg/world/world.h"
|
||||
|
||||
void renderChunkUpdated(chunk_t *chunk);
|
||||
|
||||
@@ -260,12 +260,12 @@ void chunkLoad(chunk_t *chunk, const uint16_t x, const uint16_t y) {
|
||||
};
|
||||
|
||||
// Load this entity.
|
||||
entityLoad(entity, data);
|
||||
// entityLoad(entity, data);
|
||||
data++;
|
||||
}
|
||||
|
||||
// Allow the rendering platform to know this chunk is loaded.
|
||||
renderChunkUpdated(chunk);
|
||||
// renderChunkUpdated(chunk);
|
||||
}
|
||||
|
||||
void chunkUnload(chunk_t *chunk) {
|
||||
|
@@ -7,15 +7,15 @@
|
||||
|
||||
#pragma once
|
||||
#include "tile.h"
|
||||
#include "display/render.h"
|
||||
#include "display/display.h"
|
||||
|
||||
#define CHUNK_WIDTH 8
|
||||
#define CHUNK_HEIGHT 8
|
||||
#define CHUNK_TILE_COUNT (CHUNK_WIDTH * CHUNK_HEIGHT)
|
||||
#define CHUNK_ENTITY_COUNT_MAX 8
|
||||
|
||||
#define CHUNK_MAP_WIDTH (((RENDER_WIDTH / TILE_WIDTH_HEIGHT)/CHUNK_WIDTH)+2)
|
||||
#define CHUNK_MAP_HEIGHT (((RENDER_HEIGHT / TILE_WIDTH_HEIGHT)/CHUNK_HEIGHT)+2)
|
||||
#define CHUNK_MAP_WIDTH (((DISPLAY_WIDTH / TILE_WIDTH_HEIGHT)/CHUNK_WIDTH)+2)
|
||||
#define CHUNK_MAP_HEIGHT (((DISPLAY_HEIGHT / TILE_WIDTH_HEIGHT)/CHUNK_HEIGHT)+2)
|
||||
#define CHUNK_MAP_COUNT (CHUNK_MAP_WIDTH * CHUNK_MAP_HEIGHT)
|
||||
|
||||
typedef struct {
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "chunk.h"
|
||||
#include "entity/entity.h"
|
||||
#include "rpg/entity/entity.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t layerBase[CHUNK_TILE_COUNT];
|
||||
|
@@ -7,9 +7,9 @@
|
||||
|
||||
#include "overworld.h"
|
||||
#include "chunk.h"
|
||||
#include "display/render.h"
|
||||
#include "display/display.h"
|
||||
#include "assert/assert.h"
|
||||
#include "entity/entity.h"
|
||||
#include "rpg/entity/entity.h"
|
||||
|
||||
uint32_t OVERWORLD_CAMERA_X;
|
||||
uint32_t OVERWORLD_CAMERA_Y;
|
||||
|
16
src/rpg/world/world.h
Normal file
16
src/rpg/world/world.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "rpg/world/chunkdata.h"
|
||||
|
||||
#define WORLD_WIDTH 1
|
||||
#define WORLD_HEIGHT 1
|
||||
|
||||
static const chunkdata_t *WORLD_CHUNKS[WORLD_HEIGHT * WORLD_WIDTH] = {
|
||||
NULL
|
||||
};
|
Reference in New Issue
Block a user