From daaf443cfaa0532aad8a0ede0cad826c66650593 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 22:26:01 +0200 Subject: finished CMotionBlurStreaks, CSpecialFX --- src/entities/Entity.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 8bec1ac8..7a050818 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -394,13 +394,13 @@ CEntity::PreRender(void) }else if(GetModelIndex() == MI_GRENADE){ CMotionBlurStreaks::RegisterStreak((uintptr)this, 100, 100, 100, - TheCamera.GetPosition() - 0.07f*TheCamera.GetRight(), - TheCamera.GetPosition() + 0.07f*TheCamera.GetRight()); + GetPosition() - 0.07f*TheCamera.GetRight(), + GetPosition() + 0.07f*TheCamera.GetRight()); }else if(GetModelIndex() == MI_MOLOTOV){ CMotionBlurStreaks::RegisterStreak((uintptr)this, 0, 100, 0, - TheCamera.GetPosition() - 0.07f*TheCamera.GetRight(), - TheCamera.GetPosition() + 0.07f*TheCamera.GetRight()); + GetPosition() - 0.07f*TheCamera.GetRight(), + GetPosition() + 0.07f*TheCamera.GetRight()); } }else if(GetModelIndex() == MI_MISSILE){ CVector pos = GetPosition(); -- cgit v1.2.3 From 6225e5072309e69e98246f59222ba82ddf6a418a Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 9 Apr 2020 16:35:24 +0200 Subject: fixed questionable RW usage; changed radar mask to PS2 techinque --- src/entities/Entity.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 7a050818..07d70394 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -275,9 +275,9 @@ CEntity::CreateRwObject(void) if(IsBuilding()) gBuildings++; if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame(m_rwObject)), false); + m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame(m_rwObject)), false); + m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); mi->AddRef(); } } @@ -290,7 +290,7 @@ CEntity::DeleteRwObject(void) m_matrix.Detach(); if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC){ - f = RpAtomicGetFrame(m_rwObject); + f = RpAtomicGetFrame((RpAtomic*)m_rwObject); RpAtomicDestroy((RpAtomic*)m_rwObject); RwFrameDestroy(f); }else if(RwObjectGetType(m_rwObject) == rpCLUMP) @@ -307,9 +307,9 @@ CEntity::UpdateRwFrame(void) { if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC) - RwFrameUpdateObjects(RpAtomicGetFrame(m_rwObject)); + RwFrameUpdateObjects(RpAtomicGetFrame((RpAtomic*)m_rwObject)); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - RwFrameUpdateObjects(RpClumpGetFrame(m_rwObject)); + RwFrameUpdateObjects(RpClumpGetFrame((RpClump*)m_rwObject)); } } @@ -482,9 +482,9 @@ CEntity::AttachToRwObject(RwObject *obj) m_rwObject = obj; if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame(m_rwObject)), false); + m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame(m_rwObject)), false); + m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); CModelInfo::GetModelInfo(m_modelIndex)->AddRef(); } } -- cgit v1.2.3 From 34349c4df2683fca35be37ec626aaa8eef2ddaee Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 9 Apr 2020 20:50:24 +0200 Subject: normalized line endings to LF --- src/entities/Solid.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Solid.h b/src/entities/Solid.h index e67c8e29..4ca800c2 100644 --- a/src/entities/Solid.h +++ b/src/entities/Solid.h @@ -1,12 +1,12 @@ -#pragma once - -#include "Entity.h" - -class CSolid : public CEntity -{ -public: - CSolid(void) { - m_type = ENTITY_TYPE_BUILDING; - bUsesCollision = true; - } +#pragma once + +#include "Entity.h" + +class CSolid : public CEntity +{ +public: + CSolid(void) { + m_type = ENTITY_TYPE_BUILDING; + bUsesCollision = true; + } }; \ No newline at end of file -- cgit v1.2.3 From a8f7bf0beca5c200bc3396312f0caaceacd27f94 Mon Sep 17 00:00:00 2001 From: saml1er Date: Fri, 10 Apr 2020 16:44:08 +0500 Subject: CObject complete --- src/entities/Entity.cpp | 4 ++-- src/entities/Entity.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 07d70394..25e5db48 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -62,11 +62,11 @@ CEntity::CEntity(void) bRemoveFromWorld = false; bHasHitWall = false; bImBeingRendered = false; - m_flagD8 = false; + bTouchingWater = false; bIsSubway = false; bDrawLast = false; bNoBrightHeadLights = false; - m_flagD80 = false; + bDoNotRender = false; bDistanceFade = false; m_flagE2 = false; diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 99cc7f17..17a219c3 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -73,11 +73,11 @@ public: uint32 bRemoveFromWorld : 1; uint32 bHasHitWall : 1; uint32 bImBeingRendered : 1; - uint32 m_flagD8 : 1; // used by cBuoyancy::ProcessBuoyancy + uint32 bTouchingWater : 1; // used by cBuoyancy::ProcessBuoyancy uint32 bIsSubway : 1; // set when subway, but maybe different meaning? uint32 bDrawLast : 1; uint32 bNoBrightHeadLights : 1; - uint32 m_flagD80 : 1; // CObject visibility? + uint32 bDoNotRender : 1; // flagsE uint32 bDistanceFade : 1; -- cgit v1.2.3 From 38dee74a5aa6131d29147b121e78340de47f43a2 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 11 Apr 2020 21:01:39 +0300 Subject: CPools --- src/entities/Entity.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/entities') diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 99cc7f17..e3a5333e 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -90,6 +90,7 @@ public: CReference *m_pFirstReference; CColModel *GetColModel(void) { return CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); } + uint32* GetAddressOfEntityProperties() { /* AWFUL */ return (uint32*)((char*)&m_rwObject + sizeof(m_rwObject)); } CEntity(void); ~CEntity(void); -- cgit v1.2.3 From 3aae52d220e163243c2ee47fde354687f16acb03 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 13 Apr 2020 00:02:11 +0200 Subject: finished CBoat --- src/entities/Physical.cpp | 2 +- src/entities/Physical.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index faa8a484..9fc77a8c 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -21,7 +21,7 @@ CPhysical::CPhysical(void) { int i; - fForceMultiplier = 1.0f; + m_fForceMultiplier = 1.0f; m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); m_vecMoveFriction = CVector(0.0f, 0.0f, 0.0f); diff --git a/src/entities/Physical.h b/src/entities/Physical.h index 1b9f0e02..6fbc3ffd 100644 --- a/src/entities/Physical.h +++ b/src/entities/Physical.h @@ -29,7 +29,7 @@ public: CVector m_vecTurnSpeedAvg; float m_fMass; float m_fTurnMass; // moment of inertia - float fForceMultiplier; + float m_fForceMultiplier; float m_fAirResistance; float m_fElasticity; float m_fBuoyancy; -- cgit v1.2.3