Skip to content

Commit

Permalink
Engine: remove few more deprecated script api from exports table
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Feb 4, 2025
1 parent e4fed11 commit 5e852ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions Engine/ac/global_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ RuntimeScriptValue Sc_IsTranslationAvailable(const RuntimeScriptValue *params, i
}

// int ()
RuntimeScriptValue Sc_IsVoxAvailable(const RuntimeScriptValue *params, int32_t param_count)
RuntimeScriptValue Sc_IsSpeechVoxAvailable(const RuntimeScriptValue *params, int32_t param_count)
{
API_SCALL_INT(IsVoxAvailable);
API_SCALL_INT(IsSpeechVoxAvailable);
}

RuntimeScriptValue Sc_MoveSaveSlot(const RuntimeScriptValue *params, int32_t param_count)
Expand Down Expand Up @@ -722,7 +722,6 @@ void RegisterGlobalAPI(ScriptAPIVersion base_api, ScriptAPIVersion /*compat_api*
{ "CyclePalette", API_FN_PAIR(CyclePalette) },
{ "Debug", API_FN_PAIR(script_debug) },
{ "DeleteSaveSlot", API_FN_PAIR(DeleteSaveSlot) },
{ "DeleteSprite", API_FN_PAIR(free_dynamic_sprite) },
{ "DisableGroundLevelAreas", API_FN_PAIR(DisableGroundLevelAreas) },
{ "DisableInterface", API_FN_PAIR(DisableInterface) },
{ "Display", Sc_Display, ScPl_Display },
Expand All @@ -744,8 +743,6 @@ void RegisterGlobalAPI(ScriptAPIVersion base_api, ScriptAPIVersion /*compat_api*
{ "GetGameOption", API_FN_PAIR(GetGameOption) },
{ "GetGameSpeed", API_FN_PAIR(GetGameSpeed) },
{ "GetLocationType", API_FN_PAIR(GetLocationType) },
{ "GetRegionAt", API_FN_PAIR(GetRegionIDAtRoom) },
{ "GetRoomProperty", API_FN_PAIR(Room_GetProperty) },
{ "GetScalingAt", API_FN_PAIR(GetScalingAt) },
{ "GetTextHeight", API_FN_PAIR(GetTextHeight) },
{ "GetTextWidth", API_FN_PAIR(GetTextWidth) },
Expand All @@ -768,9 +765,9 @@ void RegisterGlobalAPI(ScriptAPIVersion base_api, ScriptAPIVersion /*compat_api*
{ "IsInterfaceEnabled", API_FN_PAIR(IsInterfaceEnabled) },
{ "IsKeyPressed", API_FN_PAIR(IsKeyPressed) },
{ "IsMusicVoxAvailable", API_FN_PAIR(IsMusicVoxAvailable) },
{ "IsSpeechVoxAvailable", API_FN_PAIR(IsSpeechVoxAvailable) },
{ "IsTimerExpired", API_FN_PAIR(IsTimerExpired) },
{ "IsTranslationAvailable", API_FN_PAIR(IsTranslationAvailable) },
{ "IsVoxAvailable", API_FN_PAIR(IsVoxAvailable) },
{ "MoveSaveSlot", API_FN_PAIR(MoveSaveSlot) },
{ "MoveSaveSlot", API_FN_PAIR(MoveSaveSlot) },
{ "PauseGame", API_FN_PAIR(PauseGame) },
Expand All @@ -785,7 +782,6 @@ void RegisterGlobalAPI(ScriptAPIVersion base_api, ScriptAPIVersion /*compat_api*
{ "RestoreWalkableArea", API_FN_PAIR(RestoreWalkableArea) },
{ "RunAGSGame", API_FN_PAIR(RunAGSGame) },
{ "Said", API_FN_PAIR(Said) },
{ "SaveScreenShot", API_FN_PAIR(SaveScreenShot) },

This comment has been minimized.

Copy link
@AlanDrake

AlanDrake Feb 5, 2025

Contributor

Was SaveScreenShot deprecated? What's the replacement?

This comment has been minimized.

Copy link
@ivan-mogilko

ivan-mogilko Feb 5, 2025

Author Contributor

DynamicSprite.CreateFromScreenshot +
DynamicSprite.SaveToFile

EDIT: Although, it's not marked as obsolete in the manual.

Maybe I got confused about this one.

This comment has been minimized.

Copy link
@ivan-mogilko

ivan-mogilko Feb 5, 2025

Author Contributor

I see now, this function may be restored, it may be still useful when you don't need an intermediate dynamic sprite.

{ "SendEvent", Sc_SendEvent, run_on_event },
{ "SetAmbientTint", API_FN_PAIR(SetAmbientTint) },
{ "SetAmbientLightLevel", API_FN_PAIR(SetAmbientLightLevel) },
Expand All @@ -808,7 +804,6 @@ void RegisterGlobalAPI(ScriptAPIVersion base_api, ScriptAPIVersion /*compat_api*
{ "SkipCutscene", API_FN_PAIR(SkipCutscene) },
{ "SkipUntilCharacterStops", API_FN_PAIR(SkipUntilCharacterStops) },
{ "StartCutscene", API_FN_PAIR(StartCutscene) },
{ "StopChannel", API_FN_PAIR(stop_and_destroy_channel) },
{ "TintScreen", API_FN_PAIR(TintScreen) },
{ "UnPauseGame", API_FN_PAIR(UnPauseGame) },
{ "UpdateInventory", API_FN_PAIR(UpdateInventory) },
Expand Down
2 changes: 1 addition & 1 deletion Engine/ac/global_audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void SetSpeechVolume(int newvol) {
play.speech_volume = newvol;
}

int IsVoxAvailable() {
int IsSpeechVoxAvailable() {
return play.voice_avail ? 1 : 0;
}

Expand Down
2 changes: 1 addition & 1 deletion Engine/ac/global_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "speech.h"

void SetSpeechVolume(int newvol);
int IsVoxAvailable();
int IsSpeechVoxAvailable();
int IsMusicVoxAvailable ();

struct CharacterInfo;
Expand Down

0 comments on commit 5e852ea

Please sign in to comment.