Moving some code around
This commit is contained in:
@ -33,7 +33,7 @@ void skywallInit(primitive_t *primitive) {
|
||||
// Determine the X/Z for the given radian
|
||||
x = SKYWALL_SIZE * (float)cos(r);
|
||||
z = SKYWALL_SIZE * (float)sin(r);
|
||||
y = SKYWALL_SIZE * 1.333f;
|
||||
y = SKYWALL_SIZE * 1;
|
||||
|
||||
// Get the start index for the ertices
|
||||
n = i * SKYWALL_VERTICES_PER_SLICE;
|
||||
|
@ -22,20 +22,15 @@ bool pokerGameInit(game_t *game) {
|
||||
// Initialize the world
|
||||
pokerWorldInit(pokerGame);
|
||||
|
||||
vnCharacterInit(pokerGame->scene.characters, &pokerGame->assets.pennyTexture,
|
||||
vncharacter_t *character = pokerGame->scene.characters + 0;
|
||||
vnCharacterInit(character, &pokerGame->assets.pennyTexture,
|
||||
1000, 1920,
|
||||
367,256, 280,280
|
||||
);
|
||||
|
||||
vnCharacterInit(pokerGame->scene.characters + 1, &pokerGame->assets.pennyTexture,
|
||||
1000, 1920,
|
||||
367,256, 280,280
|
||||
);
|
||||
(pokerGame->scene.characters + 0)->x -= 0.3f;
|
||||
(pokerGame->scene.characters + 1)->x += 0.3f;
|
||||
(pokerGame->scene.characters + 1)->talking = true;
|
||||
character->y = -1.7f;
|
||||
character->z = -0.3f;
|
||||
|
||||
pokerGame->scene.characterCount = 2;
|
||||
pokerGame->scene.characterCount++;
|
||||
|
||||
|
||||
// Initialize the UI.
|
||||
|
@ -17,7 +17,7 @@ void pokerWorldRender(
|
||||
) {
|
||||
// Render the wall
|
||||
shaderUseTexture(&assets->shader, &assets->roomTexture);
|
||||
shaderUsePosition(&assets->shader, 0, 0, 0, 0,0,0);
|
||||
shaderUsePosition(&assets->shader, 0,2,0, 0,0,0);
|
||||
primitiveDraw(&world->skywall, 0, -1);
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@ void vnCharacterInit(
|
||||
int32_t faceWidth, int32_t faceHeight
|
||||
) {
|
||||
character->x = 0;
|
||||
character->y = -2.2f;
|
||||
character->z = -0.3f;
|
||||
character->y = 0;
|
||||
character->z = 0;
|
||||
|
||||
character->yaw = 0;
|
||||
character->pitch = 0;
|
||||
|
@ -35,8 +35,8 @@ void vnSceneDispose(vnscene_t *scene) {
|
||||
void vnSceneRenderWorld(vnscene_t *scene, engine_t *engine, shader_t *shader) {
|
||||
// Adjust 3D Space position
|
||||
cameraLookAt(&scene->camera,
|
||||
0.5, -0.5f, 0.5f,
|
||||
0.5, -0.5f, -0.5
|
||||
0, 0, 0.5f,
|
||||
0, 0, -0.5
|
||||
);
|
||||
|
||||
// Set Camera Perspective
|
||||
|
Reference in New Issue
Block a user