Disconnected world code temporarily.

This commit is contained in:
2021-05-16 17:51:46 -07:00
parent e77893f01c
commit 3aa6a220b1
22 changed files with 1 additions and 8 deletions

View File

@ -0,0 +1,46 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../../libs.h"
#include "tile.h"
#include "chunk.h"
#include "../../display/texture.h"
#include "../../display/tileset.h"
/** Width of map (in chunks) */
#define MAP_WIDTH 3
/** Height of map (in chunks) */
#define MAP_HEIGHT MAP_WIDTH
/** Depth of map (in chunks) */
#define MAP_DEPTH 2
/** Count of chunks in the world */
#define MAP_CHUNK_COUNT MAP_WIDTH * MAP_HEIGHT * MAP_DEPTH
#define MAP_ASSET_TEXTURE "world/tileset.png"
typedef struct {
/** Tile definitions */
tiledef_t *tileDefinitions;
/** Tileset predivided */
tileset_t *tileset;
/** Texture of the tileset */
texture_t *texture;
/** Current (chunk) coordinates of the first chunk in the chunk list */
int32_t x, y, z;
/** Current chunk list, ordered */
chunk_t *chunkList[MAP_CHUNK_COUNT];
/** Chunk array, unordered */
chunk_t chunks[MAP_CHUNK_COUNT];
} map_t;
extern map_t MAP_STATE;