This commit is contained in:
parent
85076e653d
commit
e1411394cb
12 changed files with 154 additions and 48 deletions
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
//text to speech hooks
|
||||
question/response
|
||||
//give item
|
||||
*/
|
||||
/*=========================================================================
|
||||
|
||||
function.cpp
|
||||
|
@ -54,6 +59,11 @@ typedef struct
|
|||
|
||||
static signed short func_setCharacterAnimation(unsigned short *_args);
|
||||
static signed short func_setText(unsigned short *_args);
|
||||
static signed short func_giveItem(unsigned short *_args);
|
||||
static signed short func_gotItem(unsigned short *_args);
|
||||
static signed short func_setResponseOptions(unsigned short *_args);
|
||||
static signed short func_getResponse(unsigned short *_args);
|
||||
|
||||
static signed short func_drawSprite(unsigned short *_args);
|
||||
static signed short func_getFrameTime(unsigned short *_args);
|
||||
|
||||
|
@ -64,8 +74,13 @@ static signed short func_getFrameTime(unsigned short *_args);
|
|||
|
||||
static FunctionDef s_functionDefs[]=
|
||||
{
|
||||
{ func_setCharacterAnimation, 2 }, // character,animation
|
||||
{ func_setText, 1 }, // textId
|
||||
{ func_setCharacterAnimation, 2 }, // characterId,animationId
|
||||
{ func_setText, 2 }, // characterId,textId
|
||||
{ func_giveItem, 1 }, // itemId
|
||||
{ func_gotItem, 1 }, // itemId
|
||||
{ func_setResponseOptions, 1 }, // optionsId
|
||||
{ func_getResponse, 0 }, //
|
||||
|
||||
{ func_drawSprite, 4 }, // frame,x,y,ot
|
||||
{ func_getFrameTime, 0 }, //
|
||||
};
|
||||
|
@ -93,25 +108,74 @@ signed short callFunction(int _functionNumber,int _argCount,unsigned short *_arg
|
|||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params: character,animation
|
||||
Returns:
|
||||
Purpose: Set characters animation state
|
||||
Params: characterId,animationId
|
||||
Returns: 0
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_setCharacterAnimation(unsigned short *_args)
|
||||
{
|
||||
return _args[0];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params: textid
|
||||
Returns:
|
||||
Purpose: Set text/speech/character for ingame texts
|
||||
Params: characterId, textId
|
||||
Returns: 0
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_setText(unsigned short *_args)
|
||||
{
|
||||
return _args[0];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose: Flag item as collected
|
||||
Params: itemId
|
||||
Returns: 0
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_giveItem(unsigned short *_args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose: Test whether an item has been collected or not
|
||||
Params: itemId
|
||||
Returns: true/false
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_gotItem(unsigned short *_args)
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose: Sets the allowable responses for a question
|
||||
Params: optionsId
|
||||
Returns: 0
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_setResponseOptions(unsigned short *_args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose: Gets the response from a question
|
||||
Params: optionsId
|
||||
Returns: 0
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_getResponse(unsigned short *_args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,7 +183,7 @@ static signed short func_setText(unsigned short *_args)
|
|||
Function:
|
||||
Purpose:
|
||||
Params: frame,x,y,ot
|
||||
Returns:
|
||||
Returns: 0
|
||||
---------------------------------------------------------------------- */
|
||||
#include "gfx\sprbank.h"
|
||||
SpriteBank *sb=NULL;
|
||||
|
@ -140,8 +204,8 @@ static signed short func_drawSprite(unsigned short *_args)
|
|||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params: textid
|
||||
Returns:
|
||||
Params: 0
|
||||
Returns: frameCount
|
||||
---------------------------------------------------------------------- */
|
||||
static signed short func_getFrameTime(unsigned short *_args)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue