39 lines
875 B
C
39 lines
875 B
C
/**
|
|
* Copyright (c) 2021 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "../libs.h"
|
|
#include "../display/texture.h"
|
|
#include "../display/primitive.h"
|
|
#include "../display/tileset.h"
|
|
|
|
#define VN_CHARACTER_BLINK_TIME_RANGE_MAX 6
|
|
#define VN_CHARACTER_SIZE 0.5
|
|
|
|
/** How many quads the VN Character has. Base, Eyes, Mouth and Eyebrows */
|
|
#define VN_CHARACTER_QUAD_COUNT 4
|
|
|
|
#define VN_CHARACTER_QUAD_BASE 0
|
|
#define VN_CHARACTER_QUAD_EYEBROWS 1
|
|
#define VN_CHARACTER_QUAD_EYES 2
|
|
#define VN_CHARACTER_QUAD_MOUTH 3
|
|
|
|
typedef struct {
|
|
float x, y, z;
|
|
float yaw, pitch, roll;
|
|
float scaleX, scaleY;
|
|
|
|
bool talking;
|
|
float blinkStart;
|
|
|
|
primitive_t primitive;
|
|
texture_t *texture;
|
|
|
|
int32_t baseWidth, baseHeight;
|
|
int32_t faceX, faceY;
|
|
int32_t faceWidth, faceHeight;
|
|
} vncharacter_t;
|