本文整理汇总了C++中ARX_SOUND_PlaySFX函数的典型用法代码示例。如果您正苦于以下问题:C++ ARX_SOUND_PlaySFX函数的具体用法?C++ ARX_SOUND_PlaySFX怎么用?C++ ARX_SOUND_PlaySFX使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ARX_SOUND_PlaySFX函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ARX_SOUND_PlaySFX
void ColdProtectionSpell::Launch() {
spells.endByTarget(m_target, SPELL_COLD_PROTECTION);
spells.endByCaster(m_caster, SPELL_ARMOR);
spells.endByCaster(m_caster, SPELL_LOWER_ARMOR);
spells.endByCaster(m_caster, SPELL_FIRE_PROTECTION);
if(m_caster == EntityHandle_Player) {
m_target = EntityHandle_Player;
}
ARX_SOUND_PlaySFX(SND_SPELL_COLD_PROTECTION_START, &entities[m_target]->pos);
if(m_caster == EntityHandle_Player) {
m_duration = 0;
m_hasDuration = false;
} else {
m_duration = (m_launchDuration >= 0) ? m_launchDuration : GameDurationMs(20000);
m_hasDuration = true;
}
m_fManaCostPerSecond = 1.f;
Entity * io = entities.get(m_target);
if(io) {
io->halo.flags = HALO_ACTIVE;
io->halo.color = Color3f(0.2f, 0.2f, 0.45f);
io->halo.radius = 45.f;
}
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_COLD_PROTECTION_LOOP, &entities[m_target]->pos, 1.f, ARX_SOUND_PLAY_LOOPED);
m_targets.push_back(m_target);
}
开发者ID:BSzili,项目名称:ArxLibertatis,代码行数:34,代码来源:SpellsLvl04.cpp
示例2: ARX_SOUND_PlaySFX
void LevitateSpell::Launch()
{
spells.endByCaster(m_caster, SPELL_LEVITATE);
if(m_caster == PlayerEntityHandle) {
m_target = PlayerEntityHandle;
}
ARX_SOUND_PlaySFX(SND_SPELL_LEVITATE_START, &entities[m_target]->pos);
m_duration = (m_launchDuration > -1) ? m_launchDuration : 2000000000;
m_hasDuration = true;
m_fManaCostPerSecond = 1.f;
CLevitate * effect = new CLevitate();
Vec3f target;
if(m_target == PlayerEntityHandle) {
target = player.pos + Vec3f(0.f, 150.f, 0.f);
m_duration = 200000000;
player.levitate = true;
} else {
target = entities[m_target]->pos;
}
effect->Create(16, 50.f, 100.f, 80.f, &target, m_duration);
m_pSpellFx = effect;
m_duration = effect->GetDuration();
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_LEVITATE_LOOP,
&entities[m_target]->pos, 0.7f,
ARX_SOUND_PLAY_LOOPED);
m_targets.push_back(m_target);
}
开发者ID:carriercomm,项目名称:ArxLibertatis,代码行数:35,代码来源:SpellsLvl05.cpp
示例3: SetDuration
//-----------------------------------------------------------------------------
void CMagicMissile::Create(EERIE_3D aeSrc, EERIE_3D angles)
{
int i;
EERIE_3D s, e;
SetDuration(ulDuration);
SetAngle(angles.b);
Vector_Copy(&this->angles, &angles);
eCurPos.x = eSrc.x = aeSrc.x;
eCurPos.y = eSrc.y = aeSrc.y;
eCurPos.z = eSrc.z = aeSrc.z;
fSize = 1;
bDone = true;
s.x = eSrc.x;
s.y = eSrc.y;
s.z = eSrc.z;
e.x = eSrc.x;
e.y = eSrc.y;
e.z = eSrc.z;
i = 0;
i = 40;
e.x -= fBetaRadSin * 50 * i;
e.y += sin(DEG2RAD(MAKEANGLE(this->angles.a))) * 50 * i;
e.z += fBetaRadCos * 50 * i;
pathways[0].sx = eSrc.x;
pathways[0].sy = eSrc.y;
pathways[0].sz = eSrc.z;
pathways[5].sx = e.x;
pathways[5].sy = e.y;
pathways[5].sz = e.z;
Split(pathways, 0, 5, 50, 0.5f);
for (i = 0; i < 6; i++)
{
if (pathways[i].sy >= eSrc.y + 150)
{
pathways[i].sy = eSrc.y + 150;
}
}
fTrail = 0;
iLength = 50;
fOneOnLength = 1.0f / (float) iLength;
iBezierPrecision = BEZIERPrecision;
fOneOnBezierPrecision = 1.0f / (float) iBezierPrecision;
bExplo = false;
bMove = true;
ARX_SOUND_PlaySFX(SND_SPELL_MM_CREATE, &eCurPos);
ARX_SOUND_PlaySFX(SND_SPELL_MM_LAUNCH, &eCurPos);
snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_MM_LOOP, &eCurPos, 1.0F, ARX_SOUND_PLAY_LOOPED);
}
开发者ID:sopyer,项目名称:ArxFatalis,代码行数:61,代码来源:ARX_SpellFX_Lvl01.cpp
示例4: ARX_SOUND_PlaySFX
void ColdProtectionSpell::Launch()
{
spells.endByTarget(m_target, SPELL_COLD_PROTECTION);
spells.endByCaster(m_caster, SPELL_ARMOR);
spells.endByCaster(m_caster, SPELL_LOWER_ARMOR);
spells.endByCaster(m_caster, SPELL_FIRE_PROTECTION);
if(m_caster == PlayerEntityHandle) {
m_target = PlayerEntityHandle;
}
ARX_SOUND_PlaySFX(SND_SPELL_COLD_PROTECTION_START, &entities[m_target]->pos);
m_duration = (m_launchDuration > -1) ? m_launchDuration : 20000;
if(m_caster == PlayerEntityHandle)
m_duration = 2000000;
m_hasDuration = true;
m_fManaCostPerSecond = 1.f;
if(ValidIONum(m_target)) {
Entity *io = entities[m_target];
io->halo.flags = HALO_ACTIVE;
io->halo.color = Color3f(0.2f, 0.2f, 0.45f);
io->halo.radius = 45.f;
}
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_COLD_PROTECTION_LOOP, &entities[m_target]->pos, 1.f, ARX_SOUND_PLAY_LOOPED);
m_targets.push_back(m_target);
}
开发者ID:Batora07,项目名称:ArxLibertatis,代码行数:32,代码来源:SpellsLvl04.cpp
示例5: ARX_SOUND_PlaySFX
void FlyingEyeSpell::End()
{
ARX_SOUND_PlaySFX(SND_MAGIC_FIZZLE, &entities[m_caster]->pos);
static TextureContainer * tc4=TextureContainer::Load("graph/particles/smoke");
ARX_SOUND_PlaySFX(SND_SPELL_EYEBALL_OUT);
eyeball.exist = -100;
for(long n = 0; n < 12; n++) {
PARTICLE_DEF * pd = createParticle();
if(!pd) {
break;
}
pd->ov = eyeball.pos + randomVec(-5.f, 5.f);
pd->move = randomVec(-2.f, 2.f);
pd->siz = 28.f;
pd->tolive = Random::get(2000, 6000);
pd->scale = Vec3f(12.f);
pd->tc = tc4;
pd->special = FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING;
pd->fparam = 0.0000001f;
pd->rgb = Color3f(0.7f, 0.7f, 1.f);
}
config.input.mouseLookToggle = bOldLookToggle;
lightHandleDestroy(special[2]);
lightHandleDestroy(special[1]);
}
开发者ID:Drakesinger,项目名称:ArxLibertatis,代码行数:32,代码来源:SpellsLvl07.cpp
示例6: SetDuration
void CMagicMissile::Create(const Vec3f & aeSrc, const Anglef & angles)
{
SetDuration(ulDuration);
eCurPos = eSrc = aeSrc;
short i = 40.f;
Vec3f e = eSrc;
e += angleToVectorXZ(angles.getPitch()) * (50.f * i);
e.y += std::sin(glm::radians(MAKEANGLE(angles.getYaw()))) * (50.f * i);
pathways[0] = eSrc;
pathways[5] = e;
Split(pathways, 0, 5, 50, 0.5f);
for(i = 0; i < 6; i++) {
if(pathways[i].y >= eSrc.y + 150) {
pathways[i].y = eSrc.y + 150;
}
}
fTrail = 0;
iLength = 50;
iBezierPrecision = BEZIERPrecision;
fOneOnBezierPrecision = 1.0f / (float) iBezierPrecision;
bExplo = false;
bMove = true;
ARX_SOUND_PlaySFX(SND_SPELL_MM_CREATE, &eCurPos);
ARX_SOUND_PlaySFX(SND_SPELL_MM_LAUNCH, &eCurPos);
snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_MM_LOOP, &eCurPos, 1.0F, ARX_SOUND_PLAY_LOOPED);
}
开发者ID:hulu1528,项目名称:ArxLibertatis,代码行数:33,代码来源:MagicMissile.cpp
示例7: AddQuakeFX
void AddQuakeFX(float intensity, float duration, float period, bool sound) {
if(QuakeFx.intensity > 0.f) {
QuakeFx.intensity += intensity;
QuakeFx.duration += (unsigned long)duration;
QuakeFx.frequency += period;
QuakeFx.frequency *= .5f;
QuakeFx.sound = QuakeFx.sound || sound;
if(sound)
ARX_SOUND_PlaySFX(SND_QUAKE, NULL, 1.0F - 0.5F * QuakeFx.intensity);
} else {
QuakeFx.intensity = intensity;
QuakeFx.start = checked_range_cast<unsigned long>(arxtime.get_frame_time());
QuakeFx.duration = (unsigned long)duration;
QuakeFx.frequency = period;
QuakeFx.sound = sound;
if(sound)
ARX_SOUND_PlaySFX(SND_QUAKE, NULL, 1.0F - 0.5F * QuakeFx.intensity);
}
if(!sound) {
if(QuakeFx.duration > 1500)
QuakeFx.duration = 1500;
if(QuakeFx.intensity > 220)
QuakeFx.intensity = 220;
}
}
开发者ID:Dimoks,项目名称:ArxLibertatis_fork,代码行数:33,代码来源:Quake.cpp
示例8: ARX_SOUND_PlaySFX
void MassIncinerateSpell::Launch()
{
ARX_SOUND_PlaySFX(SND_SPELL_MASS_INCINERATE);
m_duration = 20000;
long nb_targets=0;
for(size_t ii = 0; ii < entities.size(); ii++) {
const EntityHandle handle = EntityHandle(ii);
Entity * tio = entities[handle];
if(handle == m_caster || !tio || !(tio->ioflags & IO_NPC)) {
continue;
}
if(tio->_npcdata->lifePool.current <= 0.f || tio->show != SHOW_FLAG_IN_SCENE) {
continue;
}
if(fartherThan(tio->pos, entities[m_caster]->pos, 500.f)) {
continue;
}
tio->sfx_flag |= SFX_TYPE_YLSIDE_DEATH | SFX_TYPE_INCINERATE;
tio->sfx_time = arxtime.now_ul();
nb_targets++;
m_targets.push_back(tio->index());
}
if(nb_targets) {
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_INCINERATE_LOOP, &m_caster_pos, 1.f, ARX_SOUND_PLAY_LOOPED);
} else {
m_snd_loop = audio::INVALID_ID;
}
}
开发者ID:Mixone-FinallyHere,项目名称:ArxLibertatis,代码行数:35,代码来源:SpellsLvl10.cpp
示例9: ARX_SOUND_PlaySFX
void FlyingEyeSpell::End() {
Entity * caster = entities.get(m_caster);
if(caster) {
ARX_SOUND_PlaySFX(g_snd.MAGIC_FIZZLE, &caster->pos);
}
static TextureContainer * tc4 = TextureContainer::Load("graph/particles/smoke");
ARX_SOUND_PlaySFX(g_snd.SPELL_EYEBALL_OUT);
eyeball.exist = -100;
for(long n = 0; n < 12; n++) {
PARTICLE_DEF * pd = createParticle();
if(!pd) {
break;
}
pd->ov = eyeball.pos + arx::randomVec(-5.f, 5.f);
pd->move = arx::randomVec(-2.f, 2.f);
pd->siz = 28.f;
pd->tolive = Random::getu(2000, 6000);
pd->scale = Vec3f(12.f);
pd->tc = tc4;
pd->m_flags = FADE_IN_AND_OUT | ROTATING | DISSIPATING;
pd->m_rotation = 0.0000001f;
pd->rgb = Color3f(0.7f, 0.7f, 1.f);
}
config.input.mouseLookToggle = bOldLookToggle;
lightHandleDestroy(m_light1);
lightHandleDestroy(m_light2);
}
开发者ID:bsxf-47,项目名称:ArxLibertatis,代码行数:35,代码来源:SpellsLvl07.cpp
示例10: ARX_SOUND_PlaySFX
void CurePoisonSpell::Launch() {
if(m_caster == EntityHandle_Player) {
m_target = EntityHandle_Player;
}
float cure = m_level * 10;
if(m_target == EntityHandle_Player) {
player.poison -= std::min(player.poison, cure);
ARX_SOUND_PlaySFX(g_snd.SPELL_CURE_POISON);
} else if(Entity * io = entities.get(m_target)) {
if(io->ioflags & IO_NPC) {
io->_npcdata->poisonned -= std::min(io->_npcdata->poisonned, cure);
}
ARX_SOUND_PlaySFX(g_snd.SPELL_CURE_POISON, &io->pos);
}
m_duration = GameDurationMs(3500);
m_hasDuration = true;
m_particles.SetParams(g_particleParameters[ParticleParam_CurePoison]);
EERIE_LIGHT * light = dynLightCreate(m_light);
if(light) {
light->intensity = 1.5f;
light->fallstart = 200.f;
light->fallend = 350.f;
light->rgb = Color3f(0.f, 1.f, 0.0f);
light->pos = m_pos + Vec3f(0.f, -50.f, 0.f);
light->creationTime = g_gameTime.now();
light->duration = GameDurationMs(200);
light->extras = 0;
}
}
开发者ID:bsxf-47,项目名称:ArxLibertatis,代码行数:34,代码来源:SpellsLvl05.cpp
示例11: Vec3f
void MassLightningStrikeSpell::Launch()
{
spells.endByType(SPELL_MASS_LIGHTNING_STRIKE);
m_duration = 5000; // TODO probably never read
m_soundEffectPlayed = false;
float beta;
if(m_caster == PlayerEntityHandle) {
m_pos = player.pos + Vec3f(0.f, 150.f, 0.f);
beta = player.angle.getPitch();
} else {
Entity * io = entities[m_caster];
m_pos = io->pos + Vec3f(0.f, -20.f, 0.f);
beta = io->angle.getPitch();
}
m_pos += angleToVectorXZ(beta) * 500.f;
long minDuration = long(500 * m_level);
long maxDuration = 0;
int number = glm::clamp(int(m_level), 1, 10);
float ft = 360.0f / (float)number;
for(int i = 0; i < number; i++) {
Vec3f target = m_pos + angleToVectorXZ(i * ft) * 500.0f;
long duration = minDuration + Random::get(0, 5000);
maxDuration = std::max(maxDuration, duration);
CLightning * lightning = new CLightning();
lightning->m_isMassLightning = true;
lightning->m_fDamage = 2;
lightning->Create(m_pos, target);
lightning->SetDuration(duration);
pTab.push_back(lightning);
}
m_duration = maxDuration + 1000;
m_light = GetFreeDynLight();
if(lightHandleIsValid(m_light)) {
EERIE_LIGHT * light = lightHandleGet(m_light);
light->intensity = 1.8f;
light->fallend = 850.f;
light->fallstart = 500.f;
light->rgb = Color3f::red; // Color3f(1.f, 0.75f, 0.75f);
light->pos = m_pos;
}
ARX_SOUND_PlaySFX(SND_SPELL_LIGHTNING_START);
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_LIGHTNING_LOOP, &m_pos, 1.f, ARX_SOUND_PLAY_LOOPED);
// Draws White Flash on Screen
GRenderer->SetBlendFunc(BlendOne, BlendOne);
GRenderer->SetRenderState(Renderer::AlphaBlending, true);
EERIEDrawBitmap(Rectf(g_size), 0.00009f, NULL, Color::white);
GRenderer->SetRenderState(Renderer::AlphaBlending, false);
}
开发者ID:Mixone-FinallyHere,项目名称:ArxLibertatis,代码行数:59,代码来源:SpellsLvl10.cpp
示例12: ARX_SOUND_Stop
void LightningStrikeSpell::End() {
ARX_SOUND_Stop(m_snd_loop);
m_snd_loop = audio::SourcedSample();
Entity * caster = entities.get(m_caster);
if(caster) {
ARX_SOUND_PlaySFX(g_snd.SPELL_ELECTRIC, &caster->pos);
ARX_SOUND_PlaySFX(g_snd.SPELL_LIGHTNING_END, &caster->pos);
}
}
开发者ID:bsxf-47,项目名称:ArxLibertatis,代码行数:11,代码来源:SpellsLvl07.cpp
示例13: ARX_SOUND_PlaySFX
void FireFieldSpell::Launch() {
spells.endByCaster(m_caster, SPELL_FIRE_FIELD);
ARX_SOUND_PlaySFX(SND_SPELL_FIRE_FIELD_START);
m_duration = (m_launchDuration > ArxDuration(-1)) ? m_launchDuration : ArxDurationMs(100000);
m_hasDuration = true;
m_fManaCostPerSecond = 2.8f;
m_light = LightHandle();
Vec3f target;
float beta = 0.f;
bool displace = false;
if(m_caster == EntityHandle_Player) {
target = player.basePosition();
beta = player.angle.getYaw();
displace = true;
} else {
if(ValidIONum(m_caster)) {
Entity * io = entities[m_caster];
target = io->pos;
beta = io->angle.getYaw();
displace = (io->ioflags & IO_NPC) == IO_NPC;
} else {
ARX_DEAD_CODE();
}
}
if(displace) {
target += angleToVectorXZ(beta) * 250.f;
}
m_pos = target + Vec3f(0, -10, 0);
DamageParameters damage;
damage.radius = 150.f;
damage.damages = 10.f;
damage.area = DAMAGE_FULL;
damage.duration = ArxDurationMs(100000000);
damage.source = m_caster;
damage.flags = 0;
damage.type = DAMAGE_TYPE_MAGICAL | DAMAGE_TYPE_FIRE | DAMAGE_TYPE_FIELD;
damage.pos = target;
m_damage = DamageCreate(damage);
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_FIRE_FIELD_LOOP, &target, 1.f, ARX_SOUND_PLAY_LOOPED);
pPSStream.SetParams(g_particleParameters[ParticleParam_FireFieldBase]);
pPSStream.SetPos(m_pos);
pPSStream1.SetParams(g_particleParameters[ParticleParam_FireFieldFlame]);
pPSStream1.SetPos(m_pos + Vec3f(0, 10, 0));
pPSStream1.Update(0);
}
开发者ID:Dimoks,项目名称:ArxLibertatis_fork,代码行数:54,代码来源:SpellsLvl07.cpp
示例14: target
void LightningStrikeSpell::Launch() {
Vec3f target(0.f, 0.f, -500.f);
m_lightning.Create(Vec3f_ZERO, target);
m_lightning.SetDuration(long(500 * m_level));
m_lightning.m_isMassLightning = false;
m_duration = m_lightning.GetDuration();
ARX_SOUND_PlaySFX(SND_SPELL_LIGHTNING_START, &m_caster_pos);
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_LIGHTNING_LOOP, &m_caster_pos, 1.f, ARX_SOUND_PLAY_LOOPED);
}
开发者ID:Drakesinger,项目名称:ArxLibertatis,代码行数:12,代码来源:SpellsLvl07.cpp
示例15: ArxDurationMs
void MagicSightSpell::Launch()
{
m_fManaCostPerSecond = 0.36f;
m_hasDuration = true;
m_duration = (m_launchDuration > ArxDurationMs(-1)) ? m_launchDuration : ArxDurationMs(6000000);
ARX_SOUND_PlaySFX(SND_SPELL_VISION_START, &m_caster_pos);
if(m_caster == EntityHandle_Player) {
player.m_improve = true;
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_VISION_LOOP, &m_caster_pos, 1.f, ARX_SOUND_PLAY_LOOPED);
}
}
开发者ID:Dimoks,项目名称:ArxLibertatis_fork,代码行数:13,代码来源:SpellsLvl01.cpp
示例16: ARX_SOUND_PlaySFX
void CIgnit::Action(int aiMode)
{
short sMode = checked_range_cast<short>(aiMode);
for(int i = 0; i < nblight; i++) {
GLight[tablight[i].iLightNum]->status = sMode;
if(aiMode == 1) {
ARX_SOUND_PlaySFX(SND_SPELL_IGNITE, &spells[spellinstance].caster_pos);
} else if(aiMode == 0) {
ARX_SOUND_PlaySFX(SND_SPELL_DOUSE, &spells[spellinstance].caster_pos);
}
}
}
开发者ID:zhaozw,项目名称:ArxLibertatis,代码行数:14,代码来源:Spells01.cpp
示例17: ARX_MISSILES_Spawn
//-----------------------------------------------------------------------------
// Spawns a Projectile using type, starting position/TargetPosition
void ARX_MISSILES_Spawn(INTERACTIVE_OBJ *io, const long &type, const EERIE_3D *startpos, const EERIE_3D *targetpos)
{
long i(ARX_MISSILES_GetFree());
if (i == -1) return;
missiles[i].owner = GetInterNum(io);
missiles[i].type = type;
missiles[i].lastpos.x = missiles[i].startpos.x = startpos->x;
missiles[i].lastpos.y = missiles[i].startpos.y = startpos->y;
missiles[i].lastpos.z = missiles[i].startpos.z = startpos->z;
float dist;
dist = 1.0F / Distance3D(startpos->x, startpos->y, startpos->z, targetpos->x, targetpos->y,targetpos->z);
missiles[i].velocity.x = (targetpos->x - startpos->x) * dist;
missiles[i].velocity.y = (targetpos->y - startpos->y) * dist;
missiles[i].velocity.z = (targetpos->z - startpos->z) * dist;
missiles[i].lastupdate = missiles[i].timecreation = ARXTimeUL();
switch (type)
{
case MISSILE_FIREBALL:
{
missiles[i].tolive = 6000;
missiles[i].velocity.x *= 0.8f;
missiles[i].velocity.y *= 0.8f;
missiles[i].velocity.z *= 0.8f;
missiles[i].longinfo = GetFreeDynLight();
if (missiles[i].longinfo != -1)
{
DynLight[missiles[i].longinfo].intensity = 1.3f;
DynLight[missiles[i].longinfo].exist = 1;
DynLight[missiles[i].longinfo].fallend = 420.f;
DynLight[missiles[i].longinfo].fallstart = 250.f;
DynLight[missiles[i].longinfo].rgb.r = 1.f;
DynLight[missiles[i].longinfo].rgb.g = 0.8f;
DynLight[missiles[i].longinfo].rgb.b = 0.6f;
DynLight[missiles[i].longinfo].pos.x = startpos->x;
DynLight[missiles[i].longinfo].pos.y = startpos->y;
DynLight[missiles[i].longinfo].pos.z = startpos->z;
}
ARX_SOUND_PlaySFX(SND_SPELL_FIRE_WIND, &missiles[i].startpos, 2.0F);
ARX_SOUND_PlaySFX(SND_SPELL_FIRE_LAUNCH, &missiles[i].startpos, 2.0F);
}
}
}
开发者ID:sopyer,项目名称:ArxFatalis,代码行数:51,代码来源:ARX_Missile.cpp
示例18: ARX_SOUND_PlaySFX
void IncinerateSpell::Launch()
{
Entity * tio = entities[m_target];
ARX_SOUND_PlaySFX(SND_SPELL_INCINERATE, &entities[m_target]->pos);
m_snd_loop = ARX_SOUND_PlaySFX(SND_SPELL_INCINERATE_LOOP, &entities[m_target]->pos, 1.f, ARX_SOUND_PLAY_LOOPED);
m_duration = 20000;
tio->sfx_flag |= SFX_TYPE_YLSIDE_DEATH | SFX_TYPE_INCINERATE;
tio->sfx_time = arxtime.now_ul();
m_targets.push_back(m_target);
}
开发者ID:nemyax,项目名称:ArxLibertatis,代码行数:15,代码来源:SpellsLvl09.cpp
示例19: ARX_DAMAGES_AddVisual
static void ARX_DAMAGES_AddVisual(DAMAGE_INFO * di, Vec3f * pos, float dmg, Entity * io) {
if(!(di->params.type & DAMAGE_TYPE_FAKEFIRE)) {
return;
}
long num = -1;
if(io) {
num = Random::get(0, io->obj->vertexlist.size() / 4 - 1) * 4 + 1;
}
unsigned long tim = (unsigned long)(arxtime);
if(di->lastupd + 200 < tim) {
di->lastupd = tim;
if(di->params.type & DAMAGE_TYPE_MAGICAL) {
ARX_SOUND_PlaySFX(SND_SPELL_MAGICAL_HIT, pos, 0.8F + 0.4F * rnd());
} else {
ARX_SOUND_PlaySFX(SND_SPELL_FIRE_HIT, pos, 0.8F + 0.4F * rnd());
}
}
for(long k = 0 ; k < 14 ; k++) {
PARTICLE_DEF * pd = createParticle();
if(!pd) {
break;
}
if(io) {
arx_assert(num >= 0);
pd->ov = io->obj->vertexlist3[num].v + randomVec(-5.f, 5.f);
} else {
pd->ov = *pos + randomVec(-50.f, 50.f);
}
pd->siz = glm::clamp(dmg, 5.f, 15.f);
pd->scale = Vec3f(-10.f);
pd->special = ROTATING | MODULATE_ROTATION | FIRE_TO_SMOKE;
pd->tolive = Random::get(500, 900);
pd->move = Vec3f(1.f - 2.f * rnd(), 2.f - 16.f * rnd(), 1.f - 2.f * rnd());
if(di->params.type & DAMAGE_TYPE_MAGICAL) {
pd->rgb = Color3f(0.3f, 0.3f, 0.8f);
} else {
pd->rgb = Color3f::gray(0.5f);
}
pd->tc = TC_fire2;
pd->fparam = 0.1f - rnd() * 0.2f;
}
}
开发者ID:byouloh,项目名称:ArxLibertatis,代码行数:48,代码来源:Damage.cpp
示例20: ARX_SOUND_PlaySFX
void RuneOfGuardingSpell::Launch()
{
spells.endByCaster(m_caster, SPELL_RUNE_OF_GUARDING);
ARX_SOUND_PlaySFX(SND_SPELL_RUNE_OF_GUARDING);
m_duration = (m_launchDuration > -1) ? m_launchDuration : 99999999;
m_pos = entities[m_caster]->pos;
tex_p2 = TextureContainer::Load("graph/obj3d/textures/(fx)_tsu_blueting");
m_light = GetFreeDynLight();
if(lightHandleIsValid(m_light)) {
EERIE_LIGHT * light = lightHandleGet(m_light);
light->intensity = 0.7f + 2.3f;
light->fallend = 500.f;
light->fallstart = 400.f;
light->rgb = Color3f(1.0f, 0.2f, 0.2f);
light->pos = m_pos - Vec3f(0.f, 50.f, 0.f);
light->time_creation = (unsigned long)(arxtime);
light->duration = 200;
}
}
开发者ID:HustLion,项目名称:ArxLibertatis,代码行数:25,代码来源:SpellsLvl05.cpp
注:本文中的ARX_SOUND_PlaySFX函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论