match m409dll, implement some cosd/sind

This commit is contained in:
CreateSource 2024-07-27 12:48:18 -04:00
parent 13012f05ca
commit 9dfae92fe2
14 changed files with 1501 additions and 203 deletions

View file

@ -9,6 +9,7 @@
#include "game/objsub.h"
#include "game/gamework_data.h"
#include "math.h"
#include "ext_math.h"
#include "stdlib.h"
typedef struct bit_copy {
@ -409,11 +410,11 @@ static void CoinChgDisappear(omObjData* object, coinChg* coin_chg) {
OSu16tof32(&angle, &rot);
if (angle <= 90.0f) {
object->scale.x = 0.5 * cos((M_PI * rot) / 180.0);
object->scale.y = 2.5 * sin((M_PI * rot) / 180.0);
object->scale.x = 0.5 * cosd(rot);
object->scale.y = 2.5 * sind(rot);
} else {
object->scale.x = 2.5 * sin((M_PI * rot) / 180.0);
object->scale.y = 0.5 * cos((M_PI * rot) / 180.0);
object->scale.x = 2.5 * sind(rot);
object->scale.y = 0.5 * cosd(rot);
}
if (0.0f == object->scale.x) {
object->scale.x = 0.0001f;