SBSPSS/source/player/panimsfx.cpp

147 lines
4.4 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-04-19 01:37:52 +02:00
NB: DON'T FORGET TO CHANGE s_numAnimSfx!!!!!!!
2001-02-01 17:52:10 +01:00
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "player\player.h"
/* Std Lib
------- */
/* Data
---- */
2001-04-19 01:37:52 +02:00
#ifndef __ANIM_SPONGEBOB_HEADER__
#include <ACTOR_SPONGEBOB_ANIM.h>
#endif
2001-02-01 17:52:10 +01:00
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
2001-04-19 01:37:52 +02:00
// ANIM_SPONGEBOB_BLOWBUBBLE
static const CPlayer::AnimFrameSfx s_blowBubbleSfx[]=
{
{ 4, CSoundMediator::SFX_BUBBLE_WAND, },
};
static const int s_blowBubbleCount=sizeof(s_blowBubbleSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
// 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
{
2001-04-28 00:29:09 +02:00
{ 1, CSoundMediator::SFX_SPONGEBOB_BUTTBOUNCE, },
2001-02-01 17:52:10 +01:00
};
static const int s_buttBounceEndCount=sizeof(s_buttBounceEndSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-04-19 01:37:52 +02:00
// ANIM_SPONGEBOB_HITGROUND
static const CPlayer::AnimFrameSfx s_hitGroundSfx[]=
2001-02-01 20:37:19 +01:00
{
2001-04-19 01:37:52 +02:00
{ 8, CSoundMediator::SFX_SPONGEBOB_LAND_AFTER_FALL, },
{ 28, CSoundMediator::SFX_SPONGEBOB_LAND_AFTER_FALL, },
2001-02-01 20:37:19 +01:00
};
2001-04-19 01:37:52 +02:00
static const int s_hitGroundCount=sizeof(s_hitGroundSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 20:37:19 +01:00
2001-04-19 01:37:52 +02:00
// ANIM_PLAYER_ANIM_IDLEWIND
static const CPlayer::AnimFrameSfx s_idleWindSfx[]=
2001-02-01 20:37:19 +01:00
{
2001-04-19 01:37:52 +02:00
{ 12, CSoundMediator::SFX_HAZARD__SWAMP_GAS, },
{ 28, CSoundMediator::SFX_SPONGEBOB_WALK_2, },
2001-02-01 20:37:19 +01:00
};
2001-04-19 01:37:52 +02:00
static const int s_idleWindCount=sizeof(s_idleWindSfx)/sizeof(CPlayer::AnimFrameSfx);
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
{
2001-04-19 01:37:52 +02:00
{ 2, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
{ 3, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
2001-02-01 17:52:10 +01:00
};
static const int s_jumpEndCount=sizeof(s_jumpEndSfx)/sizeof(CPlayer::AnimFrameSfx);
// 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
{
2001-04-19 01:37:52 +02:00
{ 3, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
{ 11, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
2001-02-01 17:52:10 +01:00
};
static const int s_runCount=sizeof(s_runSfx)/sizeof(CPlayer::AnimFrameSfx);
// 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
{
2001-04-19 01:37:52 +02:00
{ 5, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
{ 6, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
2001-02-01 17:52:10 +01:00
};
static const int s_runStopCount=sizeof(s_runStopSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-04-19 01:37:52 +02:00
// ANIM_SPONGEBOB_WALK
static const CPlayer::AnimFrameSfx s_walkSfx[]=
{
{ 8, CSoundMediator::SFX_SPONGEBOB_WALK_1 },
{ 15, CSoundMediator::SFX_SPONGEBOB_WALK_2 },
};
static const int s_walkCount=sizeof(s_walkSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
2001-04-19 01:37:52 +02:00
// ANIM_PLAYER_ANIM_KARATE
static const CPlayer::AnimFrameSfx s_chopSfx[]=
2001-02-01 22:55:22 +01:00
{
2001-04-19 01:37:52 +02:00
{ 12, CSoundMediator::SFX_SPONGEBOB_KARATE_1, },
2001-02-01 22:55:22 +01:00
};
2001-04-19 01:37:52 +02:00
static const int s_chopCount=sizeof(s_chopSfx)/sizeof(CPlayer::AnimFrameSfx);
2001-02-01 17:52:10 +01:00
2001-04-19 01:37:52 +02:00
// ANIM_SPONGEBOB_SWIPE
static const CPlayer::AnimFrameSfx s_swipeSfx[]=
{
{ 8, CSoundMediator::SFX_SPONGEBOB_NET, },
};
static const int s_swipeCount=sizeof(s_swipeSfx)/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
2001-02-01 18:32:16 +01:00
const CPlayer::AnimSfx CPlayer::s_animSfx[]=
2001-02-01 17:52:10 +01:00
{
2001-04-19 01:37:52 +02:00
{ ANIM_SPONGEBOB_BLOWBUBBLE, s_blowBubbleCount, s_blowBubbleSfx },
{ ANIM_SPONGEBOB_BUTTBOUNCEEND, s_buttBounceEndCount, s_buttBounceEndSfx },
{ ANIM_SPONGEBOB_HITGROUND, s_hitGroundCount, s_hitGroundSfx },
{ ANIM_SPONGEBOB_IDLEWIND, s_idleWindCount, s_idleWindSfx },
{ ANIM_SPONGEBOB_JUMPEND, s_jumpEndCount, s_jumpEndSfx },
{ ANIM_SPONGEBOB_RUN, s_runCount, s_runSfx },
{ ANIM_SPONGEBOB_RUNSTOP, s_runStopCount, s_runStopSfx },
{ ANIM_SPONGEBOB_WALK, s_walkCount, s_walkSfx },
{ ANIM_SPONGEBOB_KARATE, s_chopCount, s_chopSfx },
{ ANIM_SPONGEBOB_SWIPE, s_swipeCount, s_swipeSfx },
2001-02-01 17:52:10 +01:00
};
2001-04-19 01:37:52 +02:00
const int CPlayer::s_numAnimSfx=10; // Grrrrrrrr! (pkg)
2001-02-01 17:52:10 +01:00
/*===========================================================================
end */