Fix compile error

This commit is contained in:
2026-05-08 23:11:20 -05:00
parent 7415944e0a
commit bafbf2ec2f
5 changed files with 15 additions and 10 deletions
+8 -7
View File
@@ -1,21 +1,22 @@
var SPEED = 3.0;
var DURATION = 2.0;
function MoveCubeCutscene(params) { function MoveCubeCutscene(params) {
Cutscene.call(this); Cutscene.call(this);
this.cube = params.cube; this.cube = params.cube;
var startX = this.cube.position.position.x; var SPEED = 3.0;
var DURATION = 2.0;
this.anim = new Animation([ this.anim = new Animation([
[ [
{ time: 0.0, value: startX, easing: Easing.outQuad }, { time: 0.0, value: 0, easing: Easing.inOutQuad },
{ time: DURATION, value: startX - SPEED * DURATION, easing: Easing.inOutQuad }, { time: DURATION, value: -(SPEED * DURATION), easing: Easing.inOutQuad },
{ time: DURATION * 2, value: startX } { time: DURATION * 2, value: 0 }
] ]
]); ]);
this.anim.onComplete = function() { Cutscene.finish(); }; this.anim.onComplete = function() {
Cutscene.finish();
};
} }
MoveCubeCutscene.prototype = Object.create(Cutscene.prototype); MoveCubeCutscene.prototype = Object.create(Cutscene.prototype);
+2 -2
View File
@@ -21,7 +21,7 @@ errorret_t assetInitDolphinFAT(void) {
if(!fatInitDefault()) errorThrow("Failed to initialize FAT filesystem."); if(!fatInitDefault()) errorThrow("Failed to initialize FAT filesystem.");
char_t **dolphinSearchPath = (char_t **)ASSET_DOLPHIN_PATHS; char_t **dolphinSearchPath = (char_t **)ASSET_DOLPHIN_PATHS;
char_t foundPath[ASSET_FILE_PATH_MAX]; char_t foundPath[ASSET_DOLPHIN_FAT_PATH_MAX];
foundPath[0] = '\0'; foundPath[0] = '\0';
do { do {
DIR *pdir = opendir(*dolphinSearchPath); DIR *pdir = opendir(*dolphinSearchPath);
@@ -35,7 +35,7 @@ errorret_t assetInitDolphinFAT(void) {
snprintf( snprintf(
foundPath, foundPath,
ASSET_FILE_PATH_MAX, ASSET_DOLPHIN_FAT_PATH_MAX,
"%s/%s", "%s/%s",
*dolphinSearchPath, *dolphinSearchPath,
ASSET_FILE_NAME ASSET_FILE_NAME
+2
View File
@@ -8,6 +8,8 @@
#pragma once #pragma once
#include "error/error.h" #include "error/error.h"
#define ASSET_DOLPHIN_FAT_PATH_MAX FILENAME_MAX
static const char_t *ASSET_DOLPHIN_PATHS[] = { static const char_t *ASSET_DOLPHIN_PATHS[] = {
"/", "/",
"/Dusk", "/Dusk",
+1 -1
View File
@@ -12,7 +12,7 @@
errorret_t assetInitPBP(const char_t *pbpPath) { errorret_t assetInitPBP(const char_t *pbpPath) {
assertNotNull(pbpPath, "PBP path cannot be null."); assertNotNull(pbpPath, "PBP path cannot be null.");
assertStrLenMin(pbpPath, 1, "PBP path cannot be empty."); assertStrLenMin(pbpPath, 1, "PBP path cannot be empty.");
assertStrLenMax(pbpPath, ASSET_FILE_PATH_MAX, "PBP path is too long."); assertStrLenMax(pbpPath, ASSET_PBP_PATH_MAX, "PBP path is too long.");
ASSET.platform.pbpFile = fopen(pbpPath, "rb"); ASSET.platform.pbpFile = fopen(pbpPath, "rb");
if(ASSET.platform.pbpFile == NULL) { if(ASSET.platform.pbpFile == NULL) {
+2
View File
@@ -12,6 +12,8 @@
#define ASSET_PBP_SIGNATURE_SIZE 4 #define ASSET_PBP_SIGNATURE_SIZE 4
#define ASSET_PBP_SIGNATURE "\0PBP" #define ASSET_PBP_SIGNATURE "\0PBP"
#define ASSET_PBP_PATH_MAX FILENAME_MAX
typedef struct { typedef struct {
char_t signature[ASSET_PBP_SIGNATURE_SIZE]; char_t signature[ASSET_PBP_SIGNATURE_SIZE];
uint32_t version; uint32_t version;