Trying to put it all together.
This commit is contained in:
@ -45,9 +45,7 @@ void vnCharacterInit(
|
||||
);
|
||||
|
||||
// Buffer the base quad, this never changes (currently)
|
||||
_vnCharacterBuffer(character,
|
||||
0, 0, baseWidth, baseHeight, 0, 0, 0
|
||||
);
|
||||
_vnCharacterBuffer(character, 0, 0, baseWidth, baseHeight, 0, 0, 0);
|
||||
_vnCharacterFaceBuffer(character, 0, VN_CHARACTER_QUAD_EYEBROWS);
|
||||
_vnCharacterFaceBuffer(character, 0, VN_CHARACTER_QUAD_EYES);
|
||||
_vnCharacterFaceBuffer(character, 0, VN_CHARACTER_QUAD_MOUTH);
|
||||
@ -62,11 +60,9 @@ void _vnCharacterBuffer(vncharacter_t *character,
|
||||
float tpx = 1.0f / (float)character->texture->width;
|
||||
float tpy = 1.0f / (float)character->texture->height;
|
||||
|
||||
// Center on the X axis
|
||||
x -= (float)character->baseWidth / 2.0f;
|
||||
|
||||
// Put on the feet
|
||||
y -= character->baseHeight;
|
||||
// Center inside the character
|
||||
x -= (float)character->baseWidth / 2;
|
||||
y += (float)character->baseHeight / 2;
|
||||
|
||||
quadBuffer(&character->primitive, 0.001f * (float)i,
|
||||
(float)x * ps, 1 - (float)y * ps,
|
||||
@ -110,10 +106,6 @@ void vnCharacterUpdate(vncharacter_t *character, engine_t *engine) {
|
||||
}
|
||||
_vnCharacterFaceBuffer(character, mouth, VN_CHARACTER_QUAD_MOUTH);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// float n;
|
||||
// // Update the blinking frames
|
||||
// n = (engine->time.current - character->blinkStart) * 3.0f;
|
||||
@ -143,7 +135,7 @@ void vnCharacterUpdate(vncharacter_t *character, engine_t *engine) {
|
||||
// Update the scale frames for breathing / talk breathing
|
||||
float speed, amount;
|
||||
speed = 0.2f;
|
||||
amount = 300.0f;
|
||||
amount = 90.0f;
|
||||
t = animForwardAndBackwardScaled(
|
||||
mathModFloat(engine->time.current, 1 / speed) * speed
|
||||
);
|
||||
|
Reference in New Issue
Block a user