SBSPSS/source/player/panimsfx.cpp

181 lines
6.0 KiB
C++
Raw Normal View History

2001-02-01 17:52:10 +01:00
/*=========================================================================
panimsfx.cpp
Author: PKG
Created:
Project: Spongebob
2001-02-01 18:01:12 +01:00
Purpose: Handles automatically generated sound effects based upon anim frames
2001-02-01 17:52:10 +01:00
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\player.h"
/* Std Lib
------- */
/* Data
---- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
// ANIM_PLAYER_ANIM_BUTTBOUNCEEND
2001-02-01 18:32:16 +01:00
static const CPlayer::AnimFrameSfx s_buttBounceEndSfx[]=
2001-02-01 17:52:10 +01:00
{
{ 1, CSoundMediator::SFX_SPONGEBOB_BUTTBOUNCE, },
};
static const int s_buttBounceEndCount=sizeof(s_buttBounceEndSfx)/sizeof(CPlayer::AnimFrameSfx);
// ANIM_PLAYER_ANIM_BUTTBOUNCESTART
// ANIM_PLAYER_ANIM_DEATHBACKWARDS
// ANIM_PLAYER_ANIM_DEATHDRY
// ANIM_PLAYER_ANIM_DEATHFORWARDS
// ANIM_PLAYER_ANIM_DEATHSPIN
// ANIM_PLAYER_ANIM_DEATHTAR
// ANIM_PLAYER_ANIM_ELECTRICSHOCK
// ANIM_PLAYER_ANIM_ELECTRICSHOCKEND
// ANIM_PLAYER_ANIM_ELECTRICSHOCKSTART
2001-02-01 20:37:19 +01:00
2001-02-01 17:52:10 +01:00
// ANIM_PLAYER_ANIM_FACEBACK
2001-02-01 20:37:19 +01:00
static const CPlayer::AnimFrameSfx s_faceBackSfx[]=
{
{ 6, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
{ 7, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
};
static const int s_faceBackCount=sizeof(s_faceBackSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
// ANIM_PLAYER_ANIM_FACEFRONT
2001-02-01 20:37:19 +01:00
static const CPlayer::AnimFrameSfx s_faceFrontSfx[]=
{
{ 6, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
{ 7, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
};
static const int s_faceFrontCount=sizeof(s_faceFrontSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
// ANIM_PLAYER_ANIM_FALL
// ANIM_PLAYER_ANIM_GETUP
// ANIM_PLAYER_ANIM_GETUPRUN
// ANIM_PLAYER_ANIM_HITGROUND
// ANIM_PLAYER_ANIM_HOVER
// ANIM_PLAYER_ANIM_HOVEREND
// ANIM_PLAYER_ANIM_HOVERSTART
// ANIM_PLAYER_ANIM_IDLEBREATHE
// ANIM_PLAYER_ANIM_IDLEHOOLA
// ANIM_PLAYER_ANIM_IDLELOOK
// ANIM_PLAYER_ANIM_IDLEWIGGLEARM
2001-02-01 18:01:12 +01:00
2001-02-01 17:52:10 +01:00
// ANIM_PLAYER_ANIM_JUMPEND
2001-02-01 18:32:16 +01:00
static const CPlayer::AnimFrameSfx s_jumpEndSfx[]=
2001-02-01 17:52:10 +01:00
{
{ 4, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
{ 5, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
};
static const int s_jumpEndCount=sizeof(s_jumpEndSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 18:01:12 +01:00
// ANIM_PLAYER_ANIM_KARATE Might have to go into the CPlayerStateChop::enter code (PKG)
2001-02-01 18:32:16 +01:00
static const CPlayer::AnimFrameSfx s_chopSfx[]=
2001-02-01 18:01:12 +01:00
{
{ 1, CSoundMediator::SFX_SPONGEBOB_KARATE_1, },
};
static const int s_chopCount=sizeof(s_chopSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
// ANIM_PLAYER_ANIM_RUN
2001-02-01 18:32:16 +01:00
static const CPlayer::AnimFrameSfx s_runSfx[]=
2001-02-01 17:52:10 +01:00
{
{ 6, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
{ 18, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
};
static const int s_runCount=sizeof(s_runSfx)/sizeof(CPlayer::AnimFrameSfx);
// ANIM_PLAYER_ANIM_RUNSTART
2001-02-01 23:23:15 +01:00
2001-02-01 17:52:10 +01:00
// ANIM_PLAYER_ANIM_RUNSTOP
2001-02-01 18:32:16 +01:00
static const CPlayer::AnimFrameSfx s_runStopSfx[]=
2001-02-01 17:52:10 +01:00
{
{ 6, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
{ 18, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
};
static const int s_runStopCount=sizeof(s_runStopSfx)/sizeof(CPlayer::AnimFrameSfx);
// ANIM_PLAYER_ANIM_SOAKUP
// ANIM_PLAYER_ANIM_TALK01
// ANIM_PLAYER_ANIM_TEETERBACK
// ANIM_PLAYER_ANIM_TEETERFRONT
2001-02-01 22:55:22 +01:00
// ANIM_PLAYER_ANIM_IDLEWIND
static const CPlayer::AnimFrameSfx s_idleWindSfx[]=
{
{ 7, CSoundMediator::SFX_HAZARD__SWAMP_GAS, },
{ 24, CSoundMediator::SFX_SPONGEBOB_WALK_2, },
};
static const int s_idleWindCount=sizeof(s_idleWindSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
2001-02-01 18:01:12 +01:00
// This is the table that ties up anims to sfx
// CPlayer::setAnimFrame() uses this table to generate sfx based upon anim frames
2001-02-01 23:23:15 +01:00
// NB: Don't use frame 0 in the AnimFrameSfx lists ot it'll play more than once
2001-02-01 18:32:16 +01:00
const CPlayer::AnimSfx CPlayer::s_animSfx[]=
2001-02-01 17:52:10 +01:00
{
{ s_buttBounceEndCount, s_buttBounceEndSfx }, // ANIM_PLAYER_ANIM_BUTTBOUNCEEND
{ 0, NULL }, // ANIM_PLAYER_ANIM_BUTTBOUNCESTART
{ 0, NULL }, // ANIM_PLAYER_ANIM_DEATHBACKWARDS
{ 0, NULL }, // ANIM_PLAYER_ANIM_DEATHDRY
{ 0, NULL }, // ANIM_PLAYER_ANIM_DEATHFORWARDS
{ 0, NULL }, // ANIM_PLAYER_ANIM_DEATHSPIN
{ 0, NULL }, // ANIM_PLAYER_ANIM_DEATHTAR
{ 0, NULL }, // ANIM_PLAYER_ANIM_ELECTRICSHOCK
{ 0, NULL }, // ANIM_PLAYER_ANIM_ELECTRICSHOCKEND
{ 0, NULL }, // ANIM_PLAYER_ANIM_ELECTRICSHOCKSTART
2001-02-01 20:37:19 +01:00
{ s_faceBackCount, s_faceBackSfx }, // ANIM_PLAYER_ANIM_FACEBACK
{ s_faceFrontCount, s_faceFrontSfx }, // ANIM_PLAYER_ANIM_FACEFRONT
2001-02-01 17:52:10 +01:00
{ 0, NULL }, // ANIM_PLAYER_ANIM_FALL
{ 0, NULL }, // ANIM_PLAYER_ANIM_GETUP
{ 0, NULL }, // ANIM_PLAYER_ANIM_GETUPRUN
{ 0, NULL }, // ANIM_PLAYER_ANIM_HITGROUND
{ 0, NULL }, // ANIM_PLAYER_ANIM_HOVER
{ 0, NULL }, // ANIM_PLAYER_ANIM_HOVEREND
{ 0, NULL }, // ANIM_PLAYER_ANIM_HOVERSTART
{ 0, NULL }, // ANIM_PLAYER_ANIM_IDLEBREATHE
{ 0, NULL }, // ANIM_PLAYER_ANIM_IDLEHOOLA
{ 0, NULL }, // ANIM_PLAYER_ANIM_IDLELOOK
{ 0, NULL }, // ANIM_PLAYER_ANIM_IDLEWIGGLEARM
{ s_jumpEndCount, s_jumpEndSfx }, // ANIM_PLAYER_ANIM_JUMPEND
2001-02-01 18:01:12 +01:00
{ s_chopCount, s_chopSfx }, // ANIM_PLAYER_ANIM_KARATE
2001-02-01 17:52:10 +01:00
{ s_runCount, s_runSfx }, // ANIM_PLAYER_ANIM_RUN
{ 0, NULL }, // ANIM_PLAYER_ANIM_RUNSTART
{ s_runStopCount, s_runStopSfx }, // ANIM_PLAYER_ANIM_RUNSTOP
{ 0, NULL }, // ANIM_PLAYER_ANIM_SOAKUP
{ 0, NULL }, // ANIM_PLAYER_ANIM_TALK01
{ 0, NULL }, // ANIM_PLAYER_ANIM_TEETERBACK
{ 0, NULL }, // ANIM_PLAYER_ANIM_TEETERFRONT
2001-02-01 22:55:22 +01:00
{ s_idleWindCount, s_idleWindSfx }, // ANIM_PLAYER_ANIM_IDLEWIND
2001-02-01 17:52:10 +01:00
};
/*===========================================================================
end */