akgl API update
This commit is contained in:
@@ -36,10 +36,10 @@ akerr_ErrorContext AKERR_NOIGNORE *music_toggle(akgl_Actor *obj, SDL_Event *even
|
|||||||
{
|
{
|
||||||
SDL_PropertiesID bgmprops = 0;
|
SDL_PropertiesID bgmprops = 0;
|
||||||
PREPARE_ERROR(errctx);
|
PREPARE_ERROR(errctx);
|
||||||
if ( MIX_TrackPlaying(game.tracks[AKGL_GAME_AUDIO_TRACK_BGM]) ) {
|
if ( MIX_TrackPlaying(akgl_tracks[AKGL_GAME_AUDIO_TRACK_BGM]) ) {
|
||||||
FAIL_ZERO_RETURN(
|
FAIL_ZERO_RETURN(
|
||||||
errctx,
|
errctx,
|
||||||
MIX_StopTrack(game.tracks[AKGL_GAME_AUDIO_TRACK_BGM], 0),
|
MIX_StopTrack(akgl_tracks[AKGL_GAME_AUDIO_TRACK_BGM], 0),
|
||||||
AKGL_ERR_SDL,
|
AKGL_ERR_SDL,
|
||||||
"%s",
|
"%s",
|
||||||
SDL_GetError());
|
SDL_GetError());
|
||||||
@@ -47,7 +47,7 @@ akerr_ErrorContext AKERR_NOIGNORE *music_toggle(akgl_Actor *obj, SDL_Event *even
|
|||||||
SDL_SetNumberProperty(bgmprops, MIX_PROP_PLAY_LOOPS_NUMBER, -1);
|
SDL_SetNumberProperty(bgmprops, MIX_PROP_PLAY_LOOPS_NUMBER, -1);
|
||||||
FAIL_ZERO_RETURN(
|
FAIL_ZERO_RETURN(
|
||||||
errctx,
|
errctx,
|
||||||
MIX_PlayTrack(game.tracks[AKGL_GAME_AUDIO_TRACK_BGM], bgmprops),
|
MIX_PlayTrack(akgl_tracks[AKGL_GAME_AUDIO_TRACK_BGM], bgmprops),
|
||||||
AKGL_ERR_SDL,
|
AKGL_ERR_SDL,
|
||||||
"%s",
|
"%s",
|
||||||
SDL_GetError());
|
SDL_GetError());
|
||||||
@@ -78,6 +78,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||||||
game.screenheight = 480;
|
game.screenheight = 480;
|
||||||
|
|
||||||
CATCH(errctx, akgl_game_init());
|
CATCH(errctx, akgl_game_init());
|
||||||
|
CATCH(errctx, akgl_registry_load_properties("assets/properties.json"));
|
||||||
|
|
||||||
for ( int i = 0; i < numsprites ; i++) {
|
for ( int i = 0; i < numsprites ; i++) {
|
||||||
strcpy((char *)&dirnamebuf, spritepaths[i]);
|
strcpy((char *)&dirnamebuf, spritepaths[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user