-
-
Notifications
You must be signed in to change notification settings - Fork 487
Resolve remaining collisionless objects (Fixes #927) #2296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6e91ca1
Fix random collisionless objects (Fixes #927)
botder 5fd466e
Remove debug code remainder
botder d7b56d5
Remove unused model parameter
botder 2523da5
Update Client/game_sa/CColModelSA.h
botder 9ebe97e
Update Client/game_sa/CModelInfoSA.cpp
botder 237048c
Prefix member variables with m_
botder a8647c4
Addendum for commit 237048cc8
botder 25eeb60
Add flags to CColDataSA
botder ba58c2d
Add CStreaming::RemoveModel
botder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/***************************************************************************** | ||
* | ||
* PROJECT: Multi Theft Auto | ||
* LICENSE: See LICENSE in the top level directory | ||
* FILE: game_sa/CColStoreSA.cpp | ||
* | ||
* Multi Theft Auto is available from https://multitheftauto.com/ | ||
* | ||
*****************************************************************************/ | ||
|
||
#include "StdInc.h" | ||
#include "CColStoreSA.h" | ||
|
||
void CColStoreSA::Initialise() | ||
{ | ||
using Signature = void(__cdecl*)(); | ||
const auto function = reinterpret_cast<Signature>(0x4113F0); | ||
function(); | ||
} | ||
|
||
void CColStoreSA::Shutdown() | ||
{ | ||
using Signature = void(__cdecl*)(); | ||
const auto function = reinterpret_cast<Signature>(0x4114D0); | ||
function(); | ||
} | ||
|
||
void CColStoreSA::BoundingBoxesPostProcess() | ||
{ | ||
using Signature = void(__cdecl*)(); | ||
const auto function = reinterpret_cast<Signature>(0x410EC0); | ||
function(); | ||
} | ||
|
||
int CColStoreSA::AddColSlot(const char* name) | ||
{ | ||
using Signature = int(__cdecl*)(const char*); | ||
const auto function = reinterpret_cast<Signature>(0x411140); | ||
return function(name); | ||
} | ||
|
||
bool CColStoreSA::IsValidSlot(CollisionSlot slot) | ||
{ | ||
using Signature = bool(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x410660); | ||
return function(slot); | ||
} | ||
|
||
void CColStoreSA::AddCollisionNeededAtPosition(const CVector& position) | ||
{ | ||
using Signature = void(__cdecl*)(const CVector&); | ||
const auto function = reinterpret_cast<Signature>(0x4103A0); | ||
function(position); | ||
} | ||
|
||
void CColStoreSA::EnsureCollisionIsInMemory(const CVector& position) | ||
{ | ||
using Signature = void(__cdecl*)(const CVector&); | ||
const auto function = reinterpret_cast<Signature>(0x410AD0); | ||
function(position); | ||
} | ||
|
||
bool CColStoreSA::HasCollisionLoaded(const CVector& position, int areaCode) | ||
{ | ||
using Signature = bool(__cdecl*)(const CVector&, int); | ||
const auto function = reinterpret_cast<Signature>(0x410CE0); | ||
return function(position, areaCode); | ||
} | ||
|
||
void CColStoreSA::RequestCollision(const CVector& position, int areaCode) | ||
{ | ||
using Signature = void(__cdecl*)(const CVector&, int); | ||
const auto function = reinterpret_cast<Signature>(0x410C00); | ||
function(position, areaCode); | ||
} | ||
|
||
void CColStoreSA::SetCollisionRequired(const CVector& position, int areaCode) | ||
{ | ||
using Signature = void(__cdecl*)(const CVector&, int); | ||
const auto function = reinterpret_cast<Signature>(0x4104E0); | ||
function(position, areaCode); | ||
} | ||
|
||
void CColStoreSA::RemoveAllCollision() | ||
{ | ||
using Signature = void(__cdecl*)(); | ||
const auto function = reinterpret_cast<Signature>(0x410E00); | ||
function(); | ||
} | ||
|
||
void CColStoreSA::AddRef(CollisionSlot slot) | ||
{ | ||
using Signature = void(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x4107A0); | ||
function(slot); | ||
} | ||
|
||
void CColStoreSA::RemoveRef(CollisionSlot slot) | ||
{ | ||
using Signature = void(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x4107D0); | ||
function(slot); | ||
} | ||
|
||
void CColStoreSA::RemoveCol(CollisionSlot slot) | ||
{ | ||
using Signature = void(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x410730); | ||
function(slot); | ||
} | ||
|
||
void CColStoreSA::RemoveColSlot(CollisionSlot slot) | ||
{ | ||
using Signature = void(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x411330); | ||
function(slot); | ||
} | ||
|
||
void CColStoreSA::LoadAllBoundingBoxes() | ||
{ | ||
using Signature = void(__cdecl*)(); | ||
const auto function = reinterpret_cast<Signature>(0x4113D0); | ||
function(); | ||
} | ||
|
||
CColStore::BoundingBox CColStoreSA::GetBoundingBox(CollisionSlot slot) | ||
{ | ||
using Signature = BoundingBox&(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x410800); | ||
return function(slot); | ||
} | ||
|
||
void CColStoreSA::IncludeModelIndex(CollisionSlot slot, std::uint16_t model) | ||
{ | ||
using Signature = void(__cdecl*)(CollisionSlot, int); | ||
const auto function = reinterpret_cast<Signature>(0x410820); | ||
function(slot, model); | ||
} | ||
|
||
int CColStoreSA::GetFirstModel(CollisionSlot slot) | ||
{ | ||
using Signature = int(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x537A80); | ||
return function(slot); | ||
} | ||
|
||
int CColStoreSA::GetLastModel(CollisionSlot slot) | ||
{ | ||
using Signature = int(__cdecl*)(CollisionSlot); | ||
const auto function = reinterpret_cast<Signature>(0x537AB0); | ||
return function(slot); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.