Fixed many casting issues.
This commit is contained in:
@ -35,9 +35,9 @@
|
||||
#define FONT_SPACE ' '
|
||||
|
||||
// Heights
|
||||
#define FONT_LINE_HEIGHT FONT_TEXTURE_SIZE*0.75
|
||||
#define FONT_INITIAL_LINE FONT_LINE_HEIGHT*0.75
|
||||
#define FONT_SPACE_SIZE FONT_TEXTURE_SIZE*0.45
|
||||
#define FONT_LINE_HEIGHT FONT_TEXTURE_SIZE*0.75f
|
||||
#define FONT_INITIAL_LINE FONT_LINE_HEIGHT*0.75f
|
||||
#define FONT_SPACE_SIZE FONT_TEXTURE_SIZE*0.45f
|
||||
|
||||
/** Maximum number of characters a font text info can hold. */
|
||||
#define FONT_TEXT_INFO_CHARS_MAX 1024
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define EPOCH_FIXED_STEP 0.016
|
||||
#define EPOCH_SMALLEST_STEP 0.001
|
||||
#define EPOCH_FIXED_STEP 0.016f
|
||||
#define EPOCH_SMALLEST_STEP 0.001f
|
||||
|
||||
typedef struct {
|
||||
/**
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MATH_PI ((float)M_PI)
|
||||
|
||||
/**
|
||||
* Returns the modulous a result for b. Consdiders negative numbers correctly.
|
||||
* @param a Number to modulo against. (a % b)
|
||||
@ -48,18 +50,18 @@
|
||||
* @param n Degrees to convert.
|
||||
* @returns The number in radians.
|
||||
*/
|
||||
#define mathDeg2Rad(n) (n * M_PI / 180.0)
|
||||
#define mathDeg2Rad(n) (n * MATH_PI / 180.0f)
|
||||
|
||||
/**
|
||||
* Convert radians to degrees.
|
||||
* @param n Radians to convert.
|
||||
* @returns The number in degrees.
|
||||
*/
|
||||
#define mathRad2Deg(n) (n * 180 / M_PI)
|
||||
#define mathRad2Deg(n) (n * 180.0f / MATH_PI)
|
||||
|
||||
/**
|
||||
* Sign the given number, essentially clamps > 0 to 1, and < 0 to -1.
|
||||
* @param n Number to sign.
|
||||
* @returns The signed number.
|
||||
*/
|
||||
#define mathSign(n) (n>=0 ? 1 : -1)
|
||||
#define mathSign(n) (n>=0 ? 1.0f : -1.0f)
|
@ -19,7 +19,7 @@
|
||||
* Generates a random floating point number.
|
||||
* @returns A random floating point number.
|
||||
*/
|
||||
#define randFloat() (((float)randInt32()) * M_PI)
|
||||
#define randFloat() (((float)randInt32()) * MATH_PI)
|
||||
|
||||
/**
|
||||
* Generates a random uint32_t
|
||||
|
@ -14,26 +14,19 @@
|
||||
#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
|
||||
|
||||
typedef struct {
|
||||
float x, y, z;
|
||||
float yaw, pitch, roll;
|
||||
float scaleX, scaleY;
|
||||
float blinkStart;
|
||||
|
||||
char *name;
|
||||
|
||||
bool talking;
|
||||
|
||||
tileset_t tilesetEyes;
|
||||
tileset_t tilesetMouth;
|
||||
|
||||
texture_t *textureEyes;
|
||||
texture_t *textureBody;
|
||||
texture_t *textureMouth;
|
||||
texture_t *textureFace;
|
||||
primitive_t primitive;
|
||||
texture_t *texture;
|
||||
|
||||
primitive_t primitiveEyes;
|
||||
primitive_t primitiveBody;
|
||||
primitive_t primitiveMouth;
|
||||
primitive_t primitiveFace;
|
||||
} vncharacter_t;
|
||||
int32_t baseWidth, baseHeight;
|
||||
int32_t faceWidth, faceHeight;
|
||||
} vncharacter_t;
|
Reference in New Issue
Block a user