About to draw chunk
This commit is contained in:
@@ -11,4 +11,8 @@ TILE_WIDTH = 16.0
|
||||
TILE_HEIGHT = 16.0
|
||||
TILE_DEPTH = 16.0
|
||||
|
||||
RPG_CAMERA_FOV = 70
|
||||
RPG_CAMERA_PIXELS_PER_UNIT = 1.0
|
||||
RPG_CAMERA_Z_OFFSET = 24.0
|
||||
|
||||
ASSET_LANG_CHUNK_CHAR_COUNT = 6144
|
||||
@@ -15,10 +15,7 @@
|
||||
#include "display/screen.h"
|
||||
#include "rpg/rpgcamera.h"
|
||||
#include "util/memory.h"
|
||||
|
||||
#define TILE_WIDTH 16.0f
|
||||
#define TILE_HEIGHT 16.0f
|
||||
#define TILE_DEPTH 11.36f
|
||||
#include "duskdefs.h"
|
||||
|
||||
errorret_t sceneMapInit(scenedata_t *data) {
|
||||
// Init the camera.
|
||||
@@ -26,7 +23,7 @@ errorret_t sceneMapInit(scenedata_t *data) {
|
||||
data->sceneMap.camera.projType = CAMERA_PROJECTION_TYPE_PERSPECTIVE_FLIPPED;
|
||||
data->sceneMap.camera.viewType = CAMERA_VIEW_TYPE_LOOKAT_PIXEL_PERFECT;
|
||||
glm_vec3_zero(data->sceneMap.camera.lookatPixelPerfect.offset);
|
||||
data->sceneMap.camera.lookatPixelPerfect.offset[1] = TILE_HEIGHT;
|
||||
data->sceneMap.camera.lookatPixelPerfect.offset[1] = RPG_CAMERA_Z_OFFSET;
|
||||
glm_vec3_copy(
|
||||
(vec3){ 0.0f, 0.0f, 0.0f },
|
||||
data->sceneMap.camera.lookatPixelPerfect.target
|
||||
@@ -35,8 +32,10 @@ errorret_t sceneMapInit(scenedata_t *data) {
|
||||
(vec3){ 0.0f, 1.0f, 0.0f },
|
||||
data->sceneMap.camera.lookatPixelPerfect.up
|
||||
);
|
||||
data->sceneMap.camera.lookatPixelPerfect.pixelsPerUnit = 1.0f;
|
||||
data->sceneMap.camera.perspective.fov = glm_rad(90.0f);
|
||||
data->sceneMap.camera.lookatPixelPerfect.pixelsPerUnit = (
|
||||
RPG_CAMERA_PIXELS_PER_UNIT
|
||||
);
|
||||
data->sceneMap.camera.perspective.fov = glm_rad(RPG_CAMERA_FOV);
|
||||
|
||||
errorOk();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user