From bafbf2ec2ff27778f5fc59486ec64095ffca6c22 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Fri, 8 May 2026 23:11:20 -0500 Subject: [PATCH] Fix compile error --- assets/cutscenes/MoveCubeCutscene.js | 15 ++++++++------- src/duskdolphin/asset/assetdolphinfat.c | 4 ++-- src/duskdolphin/asset/assetdolphinfat.h | 2 ++ src/duskpsp/asset/assetpbp.c | 2 +- src/duskpsp/asset/assetpbp.h | 2 ++ 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/assets/cutscenes/MoveCubeCutscene.js b/assets/cutscenes/MoveCubeCutscene.js index 418da840..64d9debb 100644 --- a/assets/cutscenes/MoveCubeCutscene.js +++ b/assets/cutscenes/MoveCubeCutscene.js @@ -1,21 +1,22 @@ -var SPEED = 3.0; -var DURATION = 2.0; function MoveCubeCutscene(params) { Cutscene.call(this); this.cube = params.cube; - var startX = this.cube.position.position.x; + var SPEED = 3.0; + var DURATION = 2.0; this.anim = new Animation([ [ - { time: 0.0, value: startX, easing: Easing.outQuad }, - { time: DURATION, value: startX - SPEED * DURATION, easing: Easing.inOutQuad }, - { time: DURATION * 2, value: startX } + { time: 0.0, value: 0, easing: Easing.inOutQuad }, + { time: DURATION, value: -(SPEED * DURATION), easing: Easing.inOutQuad }, + { time: DURATION * 2, value: 0 } ] ]); - this.anim.onComplete = function() { Cutscene.finish(); }; + this.anim.onComplete = function() { + Cutscene.finish(); + }; } MoveCubeCutscene.prototype = Object.create(Cutscene.prototype); diff --git a/src/duskdolphin/asset/assetdolphinfat.c b/src/duskdolphin/asset/assetdolphinfat.c index 38bcfdba..c5e7e1a6 100644 --- a/src/duskdolphin/asset/assetdolphinfat.c +++ b/src/duskdolphin/asset/assetdolphinfat.c @@ -21,7 +21,7 @@ errorret_t assetInitDolphinFAT(void) { if(!fatInitDefault()) errorThrow("Failed to initialize FAT filesystem."); 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'; do { DIR *pdir = opendir(*dolphinSearchPath); @@ -35,7 +35,7 @@ errorret_t assetInitDolphinFAT(void) { snprintf( foundPath, - ASSET_FILE_PATH_MAX, + ASSET_DOLPHIN_FAT_PATH_MAX, "%s/%s", *dolphinSearchPath, ASSET_FILE_NAME diff --git a/src/duskdolphin/asset/assetdolphinfat.h b/src/duskdolphin/asset/assetdolphinfat.h index 77543729..ded5d023 100644 --- a/src/duskdolphin/asset/assetdolphinfat.h +++ b/src/duskdolphin/asset/assetdolphinfat.h @@ -8,6 +8,8 @@ #pragma once #include "error/error.h" +#define ASSET_DOLPHIN_FAT_PATH_MAX FILENAME_MAX + static const char_t *ASSET_DOLPHIN_PATHS[] = { "/", "/Dusk", diff --git a/src/duskpsp/asset/assetpbp.c b/src/duskpsp/asset/assetpbp.c index 46ebedd1..4092bfda 100644 --- a/src/duskpsp/asset/assetpbp.c +++ b/src/duskpsp/asset/assetpbp.c @@ -12,7 +12,7 @@ errorret_t assetInitPBP(const char_t *pbpPath) { assertNotNull(pbpPath, "PBP path cannot be null."); 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"); if(ASSET.platform.pbpFile == NULL) { diff --git a/src/duskpsp/asset/assetpbp.h b/src/duskpsp/asset/assetpbp.h index 40fc2187..f9ac848d 100644 --- a/src/duskpsp/asset/assetpbp.h +++ b/src/duskpsp/asset/assetpbp.h @@ -12,6 +12,8 @@ #define ASSET_PBP_SIGNATURE_SIZE 4 #define ASSET_PBP_SIGNATURE "\0PBP" +#define ASSET_PBP_PATH_MAX FILENAME_MAX + typedef struct { char_t signature[ASSET_PBP_SIGNATURE_SIZE]; uint32_t version;