Refactoring some of the poker game logic again.

This commit is contained in:
2021-07-27 09:49:54 -07:00
parent a63c9d898b
commit 54559e761c
36 changed files with 99 additions and 304 deletions

30
temp/render/look.c Normal file
View File

@ -0,0 +1,30 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "look.h"
void pokerLookAtPlayer(camera_t *camera, uint8_t seat, float distance) {
float x, z, angle;
angle = POKER_SEAT_ANGLE(seat);
x = sin(angle) * (0.8 + distance);
z = cos(angle) * (0.8 + distance);
cameraLookAt(camera,
x, 0.3, z,
-x, 0.3, -z
);
}
void pokerLookAtHand(camera_t *camera, uint8_t seat) {
float x, z, angle;
angle = POKER_SEAT_ANGLE(seat);
x = sin(angle);
z = cos(angle);
cameraLookAt(camera,
x*0.1, 0.8, z*0.1,
-x*0.5, 0.2, -z*0.5
);
}