diff --git a/src/Audio.h b/src/Audio.h index b1640dc39..a4a2b2123 100644 --- a/src/Audio.h +++ b/src/Audio.h @@ -62,6 +62,7 @@ cc_result Audio_Play(struct AudioContext* ctx); /* Returns the number of buffers being played or queued */ /* (e.g. if inUse is 0, no audio buffers are being played or queued) */ cc_result Audio_Poll(struct AudioContext* ctx, int* inUse); +cc_result Audio_Pause(struct AudioContext* ctx); /* Only implemented with OpenSL ES backend */ /* Plays the given audio data */ cc_result Audio_PlayData(struct AudioContext* ctx, struct AudioData* data); diff --git a/src/AudioBackend.c b/src/AudioBackend.c index 1769b20af..532159ed9 100644 --- a/src/AudioBackend.c +++ b/src/AudioBackend.c @@ -698,7 +698,7 @@ cc_result Audio_QueueChunk(struct AudioContext* ctx, void* chunk, cc_uint32 size return (*ctx->playerQueue)->Enqueue(ctx->playerQueue, chunk, size); } -static cc_result Audio_Pause(struct AudioContext* ctx) { +cc_result Audio_Pause(struct AudioContext* ctx) { return (*ctx->playerPlayer)->SetPlayState(ctx->playerPlayer, SL_PLAYSTATE_PAUSED); } diff --git a/src/BlockPhysics.c b/src/BlockPhysics.c index ca07827d6..bedeef71d 100644 --- a/src/BlockPhysics.c +++ b/src/BlockPhysics.c @@ -527,7 +527,6 @@ void Physics_Init(void) { Physics.OnRandomTick[BLOCK_SAND] = Physics_DoFalling; Physics.OnRandomTick[BLOCK_GRAVEL] = Physics_DoFalling; - Physics.OnPlace[BLOCK_SAPLING] = Physics_HandleSapling; Physics.OnRandomTick[BLOCK_SAPLING] = Physics_HandleSapling; Physics.OnRandomTick[BLOCK_DIRT] = Physics_HandleDirt; Physics.OnRandomTick[BLOCK_GRASS] = Physics_HandleGrass; diff --git a/src/Platform_PSP.c b/src/Platform_PSP.c index 43398dbf2..3667b5dee 100644 --- a/src/Platform_PSP.c +++ b/src/Platform_PSP.c @@ -85,11 +85,12 @@ cc_uint64 Stopwatch_Measure(void) { /*########################################################################################################################* *-----------------------------------------------------Directory/File------------------------------------------------------* *#########################################################################################################################*/ -extern int __path_absolute(const char *in, char *out, int len); +static const cc_string root_path = String_FromConst("ms0:/PSP/GAME/ClassiCube/"); + static void GetNativePath(char* str, const cc_string* path) { - char tmp[NATIVE_STR_LEN + 1]; - String_EncodeUtf8(tmp, path); - __path_absolute(tmp, str, NATIVE_STR_LEN); + Mem_Copy(str, root_path.buffer, root_path.length); + str += root_path.length; + String_EncodeUtf8(str, path); } #define GetSCEResult(result) (result >= 0 ? 0 : result & 0xFFFF) @@ -438,6 +439,9 @@ void Platform_Init(void) { // *tx = vel->x == 0.0f ? MATH_LARGENUM : Math_AbsF(dx / vel->x); // TODO: work out why this error is actually happening (inexact or underflow?) and properly fix it pspSdkDisableFPUExceptions(); + + // Create root directory + Directory_Create(&String_Empty); } void Platform_Free(void) { }