summaryrefslogtreecommitdiffstats
path: root/src/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects')
-rw-r--r--src/objects/CutsceneHead.cpp37
-rw-r--r--src/objects/ParticleObject.cpp6
-rw-r--r--src/objects/ParticleObject.h2
-rw-r--r--src/objects/Projectile.h2
4 files changed, 45 insertions, 2 deletions
diff --git a/src/objects/CutsceneHead.cpp b/src/objects/CutsceneHead.cpp
index 55e75807..15611c29 100644
--- a/src/objects/CutsceneHead.cpp
+++ b/src/objects/CutsceneHead.cpp
@@ -12,6 +12,10 @@
#include "CutsceneHead.h"
#include "CdStream.h"
+#ifdef GTA_PS2_STUFF
+// this is a total hack to switch between PC and PS2 code
+static bool lastLoadedSKA;
+#endif
CCutsceneHead::CCutsceneHead(CObject *obj)
{
@@ -87,6 +91,10 @@ CCutsceneHead::ProcessControl(void)
assert(RwObjectGetType(m_rwObject) == rpCLUMP);
atm = GetFirstAtomic((RpClump*)m_rwObject);
hier = RpSkinAtomicGetHAnimHierarchy(atm);
+#ifdef GTA_PS2_STUFF
+ // PS2 only plays anims in cutscene, PC always plays anims
+ if(!lastLoadedSKA || CCutsceneMgr::IsRunning())
+#endif
RpHAnimHierarchyAddAnimTime(hier, CTimer::GetTimeStepNonClipped()/50.0f);
}
@@ -168,6 +176,10 @@ CCutsceneHead::PlayAnimation(const char *animName)
uint32 offset, size;
RwStream *stream;
+#ifdef GTA_PS2_STUFF
+ lastLoadedSKA = false;
+#endif
+
assert(RwObjectGetType(m_rwObject) == rpCLUMP);
atm = GetFirstAtomic((RpClump*)m_rwObject);
hier = RpSkinAtomicGetHAnimHierarchy(atm);
@@ -191,4 +203,29 @@ CCutsceneHead::PlayAnimation(const char *animName)
RwStreamClose(stream, nil);
}
+#ifdef GTA_PS2_STUFF
+#ifdef LIBRW
+ else{
+ sprintf(gString, "%s.ska", animName);
+
+ if(CCutsceneMgr::ms_pCutsceneDir->FindItem(gString, offset, size)){
+ stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "ANIM\\CUTS.IMG");
+ assert(stream);
+
+ CStreaming::MakeSpaceFor(size * CDSTREAM_SECTOR_SIZE);
+ CStreaming::ImGonnaUseStreamingMemory();
+
+ RwStreamSkip(stream, offset*2048);
+ anim = rw::Animation::streamReadLegacy(stream);
+ RpHAnimHierarchySetCurrentAnim(hier, anim);
+
+ CStreaming::IHaveUsedStreamingMemory();
+
+ RwStreamClose(stream, nil);
+
+ lastLoadedSKA = true;
+ }
+ }
+#endif
+#endif
}
diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp
index a8afaf6c..71f223d7 100644
--- a/src/objects/ParticleObject.cpp
+++ b/src/objects/ParticleObject.cpp
@@ -8,6 +8,7 @@
#include "Camera.h"
#include "Game.h"
#include "DMAudio.h"
+#include "screendroplets.h"
CParticleObject gPObjectArray[MAX_PARTICLEOBJECTS];
@@ -18,6 +19,8 @@ CParticleObject *CParticleObject::pUnusedListHead;
CAudioHydrant List[MAX_AUDIOHYDRANTS];
+CAudioHydrant *CAudioHydrant::Get(int n) { return &List[n]; }
+
bool
CAudioHydrant::Add(CParticleObject *particleobject)
{
@@ -247,6 +250,9 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
pobj->m_nSkipFrames = 3;
#endif
pobj->m_nCreationChance = 0;
+#ifdef SCREEN_DROPLETS
+ ScreenDroplets::RegisterSplash(pobj);
+#endif
break;
}
diff --git a/src/objects/ParticleObject.h b/src/objects/ParticleObject.h
index 34a672bb..e4e7fcd2 100644
--- a/src/objects/ParticleObject.h
+++ b/src/objects/ParticleObject.h
@@ -103,4 +103,6 @@ public:
static bool Add (CParticleObject *particleobject);
static void Remove(CParticleObject *particleobject);
+
+ static CAudioHydrant *Get(int n); // for neo screen droplets
}; \ No newline at end of file
diff --git a/src/objects/Projectile.h b/src/objects/Projectile.h
index 2f2b541c..4b3eb4b8 100644
--- a/src/objects/Projectile.h
+++ b/src/objects/Projectile.h
@@ -1,7 +1,5 @@
#pragma once
-#pragma once
-
#include "Object.h"
class CProjectile : public CObject