22 #ifndef MADE_SCRIPTFUNCS_H 23 #define MADE_SCRIPTFUNCS_H 25 #include "made/resource.h" 27 #include "audio/mixer.h" 29 #include "common/debug.h" 30 #include "common/system.h" 47 int16 callFunction(uint16 index, int16 argc, int16 *argv) {
48 if (index >= _externalFuncs.size())
49 error(
"ScriptFunctions::callFunction() Invalid function index %d", index);
50 debug(4,
"%s", _externalFuncNames[index]);
51 return (*_externalFuncs[index])(argc, argv);
54 void setupExternalsTable();
55 const char* getFuncName(
int index) {
return _externalFuncNames[index]; }
56 int getCount()
const {
return _externalFuncs.size(); }
67 int _soundCheckLength;
69 uint8 _gameAudioVolume;
79 int16 sfSystemCall(int16 argc, int16 *argv);
80 int16 sfInitGraf(int16 argc, int16 *argv);
81 int16 sfRestoreGraf(int16 argc, int16 *argv);
82 int16 sfDrawPicture(int16 argc, int16 *argv);
83 int16 sfClearScreen(int16 argc, int16 *argv);
84 int16 sfShowPage(int16 argc, int16 *argv);
85 int16 sfPollEvent(int16 argc, int16 *argv);
86 int16 sfGetMouseX(int16 argc, int16 *argv);
87 int16 sfGetMouseY(int16 argc, int16 *argv);
88 int16 sfGetKey(int16 argc, int16 *argv);
89 int16 sfSetVisualEffect(int16 argc, int16 *argv);
90 int16 sfPlaySound(int16 argc, int16 *argv);
91 int16 sfPlayMusic(int16 argc, int16 *argv);
92 int16 sfStopMusic(int16 argc, int16 *argv);
93 int16 sfIsMusicPlaying(int16 argc, int16 *argv);
94 int16 sfSetTextPos(int16 argc, int16 *argv);
95 int16 sfFlashScreen(int16 argc, int16 *argv);
96 int16 sfPlayNote(int16 argc, int16 *argv);
97 int16 sfStopNote(int16 argc, int16 *argv);
98 int16 sfPlayTele(int16 argc, int16 *argv);
99 int16 sfStopTele(int16 argc, int16 *argv);
100 int16 sfHideMouseCursor(int16 argc, int16 *argv);
101 int16 sfShowMouseCursor(int16 argc, int16 *argv);
102 int16 sfGetMusicBeat(int16 argc, int16 *argv);
103 int16 sfSetScreenLock(int16 argc, int16 *argv);
104 int16 sfAddSprite(int16 argc, int16 *argv);
105 int16 sfFreeAnim(int16 argc, int16 *argv);
106 int16 sfDrawSprite(int16 argc, int16 *argv);
107 int16 sfEraseSprites(int16 argc, int16 *argv);
108 int16 sfUpdateSprites(int16 argc, int16 *argv);
109 int16 sfGetTimer(int16 argc, int16 *argv);
110 int16 sfSetTimer(int16 argc, int16 *argv);
111 int16 sfResetTimer(int16 argc, int16 *argv);
112 int16 sfAllocTimer(int16 argc, int16 *argv);
113 int16 sfFreeTimer(int16 argc, int16 *argv);
114 int16 sfSetPaletteLock(int16 argc, int16 *argv);
115 int16 sfSetFont(int16 argc, int16 *argv);
116 int16 sfDrawText(int16 argc, int16 *argv);
117 int16 sfHomeText(int16 argc, int16 *argv);
118 int16 sfSetTextRect(int16 argc, int16 *argv);
119 int16 sfSetTextXY(int16 argc, int16 *argv);
120 int16 sfSetFontDropShadow(int16 argc, int16 *argv);
121 int16 sfSetFontColor(int16 argc, int16 *argv);
122 int16 sfSetFontOutline(int16 argc, int16 *argv);
123 int16 sfLoadMouseCursor(int16 argc, int16 *argv);
124 int16 sfSetSpriteGround(int16 argc, int16 *argv);
125 int16 sfLoadResText(int16 argc, int16 *argv);
126 int16 sfSetClipArea(int16 argc, int16 *argv);
127 int16 sfSetSpriteClip(int16 argc, int16 *argv);
128 int16 sfAddScreenMask(int16 argc, int16 *argv);
129 int16 sfSetSpriteMask(int16 argc, int16 *argv);
130 int16 sfSoundPlaying(int16 argc, int16 *argv);
131 int16 sfStopSound(int16 argc, int16 *argv);
132 int16 sfPlayVoice(int16 argc, int16 *argv);
133 int16 sfPlayCd(int16 argc, int16 *argv);
134 int16 sfStopCd(int16 argc, int16 *argv);
135 int16 sfGetCdStatus(int16 argc, int16 *argv);
136 int16 sfGetCdTime(int16 argc, int16 *argv);
137 int16 sfPlayCdSegment(int16 argc, int16 *argv);
138 int16 sfPrintf(int16 argc, int16 *argv);
139 int16 sfClearMono(int16 argc, int16 *argv);
140 int16 sfGetSoundEnergy(int16 argc, int16 *argv);
141 int16 sfClearText(int16 argc, int16 *argv);
142 int16 sfAnimText(int16 argc, int16 *argv);
143 int16 sfGetTextWidth(int16 argc, int16 *argv);
144 int16 sfPlayMovie(int16 argc, int16 *argv);
145 int16 sfLoadSound(int16 argc, int16 *argv);
146 int16 sfLoadMusic(int16 argc, int16 *argv);
147 int16 sfLoadPicture(int16 argc, int16 *argv);
148 int16 sfSetMusicVolume(int16 argc, int16 *argv);
149 int16 sfRestartEvents(int16 argc, int16 *argv);
150 int16 sfPlaceSprite(int16 argc, int16 *argv);
151 int16 sfPlaceText(int16 argc, int16 *argv);
152 int16 sfDeleteChannel(int16 argc, int16 *argv);
153 int16 sfGetChannelType(int16 argc, int16 *argv);
154 int16 sfSetChannelState(int16 argc, int16 *argv);
155 int16 sfSetChannelLocation(int16 argc, int16 *argv);
156 int16 sfSetChannelContent(int16 argc, int16 *argv);
157 int16 sfSetExcludeArea(int16 argc, int16 *argv);
158 int16 sfSetSpriteExclude(int16 argc, int16 *argv);
159 int16 sfGetChannelState(int16 argc, int16 *argv);
160 int16 sfPlaceAnim(int16 argc, int16 *argv);
161 int16 sfSetAnimFrame(int16 argc, int16 *argv);
162 int16 sfGetAnimFrame(int16 argc, int16 *argv);
163 int16 sfGetAnimFrameCount(int16 argc, int16 *argv);
164 int16 sfGetPictureWidth(int16 argc, int16 *argv);
165 int16 sfGetPictureHeight(int16 argc, int16 *argv);
166 int16 sfSetSoundRate(int16 argc, int16 *argv);
167 int16 sfDrawAnimPic(int16 argc, int16 *argv);
168 int16 sfLoadAnim(int16 argc, int16 *argv);
169 int16 sfReadText(int16 argc, int16 *argv);
170 int16 sfReadMenu(int16 argc, int16 *argv);
171 int16 sfDrawMenu(int16 argc, int16 *argv);
172 int16 sfGetMenuCount(int16 argc, int16 *argv);
173 int16 sfSaveGame(int16 argc, int16 *argv);
174 int16 sfLoadGame(int16 argc, int16 *argv);
175 int16 sfGetGameDescription(int16 argc, int16 *argv);
176 int16 sfShakeScreen(int16 argc, int16 *argv);
177 int16 sfPlaceMenu(int16 argc, int16 *argv);
178 int16 sfSetSoundVolume(int16 argc, int16 *argv);
179 int16 sfGetSynthType(int16 argc, int16 *argv);
180 int16 sfIsSlowSystem(int16 argc, int16 *argv);
Definition: resource.h:165
void debug(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: resource.h:118
Definition: scriptfuncs.h:42