mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
remove last use of object_load_chunk
This commit is contained in:
@@ -115,7 +115,6 @@ bool object_saved_packed(SDL_RWops* rw, const rct_object_entry * entry);
|
||||
void object_unload_all();
|
||||
|
||||
int check_object_entry(const rct_object_entry *entry);
|
||||
bool object_load_chunk(int groupIndex, const rct_object_entry * entry, int * outGroupIndex);
|
||||
bool object_entry_compare(const rct_object_entry *a, const rct_object_entry *b);
|
||||
int object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength);
|
||||
void reset_loaded_objects();
|
||||
|
||||
@@ -622,58 +622,6 @@ extern "C"
|
||||
objectRepository->LoadOrConstruct();
|
||||
}
|
||||
|
||||
bool object_load_chunk(int groupIndex, const rct_object_entry * entry, int * outGroupIndex)
|
||||
{
|
||||
return false;
|
||||
|
||||
// IObjectRepository * objectRepository = GetObjectRepository();
|
||||
// const ObjectRepositoryItem * ori = objectRepository->FindObject(entry);
|
||||
// if (ori == nullptr)
|
||||
// {
|
||||
// ReportMissingObject(entry);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// Object * object = objectRepository->LoadObject(ori);
|
||||
// if (object == nullptr)
|
||||
// {
|
||||
// utf8 objName[9] = { 0 };
|
||||
// Memory::Copy(objName, ori->ObjectEntry.name, 8);
|
||||
// Console::Error::WriteFormat("[%s]: Object could not be loaded.", objName);
|
||||
// Console::Error::WriteLine();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// uint8 objectType = object->GetObjectType();
|
||||
// void * * chunkList = object_entry_groups[objectType].chunks;
|
||||
// if (groupIndex == -1)
|
||||
// {
|
||||
// for (groupIndex = 0; chunkList[groupIndex] != (void*)-1; groupIndex++)
|
||||
// {
|
||||
// if (groupIndex + 1 >= object_entry_group_counts[objectType])
|
||||
// {
|
||||
// log_error("Object Load failed due to too many objects of a certain type.");
|
||||
// delete object;
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// chunkList[groupIndex] = object->GetLegacyData();
|
||||
// if (outGroupIndex != nullptr)
|
||||
// {
|
||||
// *outGroupIndex = groupIndex;
|
||||
// }
|
||||
//
|
||||
// rct_object_entry_extended * extendedEntry = &object_entry_groups[objectType].entries[groupIndex];
|
||||
// Memory::Copy<void>(extendedEntry, object->GetObjectEntry(), sizeof(rct_object_entry));
|
||||
// extendedEntry->chunk_size = 0;
|
||||
//
|
||||
// int loadedObjectIndex = GetObjectEntryIndex(objectType, groupIndex);
|
||||
// delete _loadedObjects[loadedObjectIndex];
|
||||
// _loadedObjects[loadedObjectIndex] = object;
|
||||
// return true;
|
||||
}
|
||||
|
||||
bool object_load_entries(rct_object_entry * entries)
|
||||
{
|
||||
log_verbose("loading required objects");
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "../ride/ride.h"
|
||||
#include "../ride/track.h"
|
||||
#include "../ride/track_design.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../sprites.h"
|
||||
#include "../util/util.h"
|
||||
#include "error.h"
|
||||
@@ -108,12 +109,12 @@ void window_install_track_open(const utf8 *path)
|
||||
return;
|
||||
}
|
||||
|
||||
object_unload_all();
|
||||
object_manager_unload_all_objects();
|
||||
if (_trackDesign->type == RIDE_TYPE_NULL){
|
||||
log_error("Failed to load track (ride type null): %s", path);
|
||||
return;
|
||||
}
|
||||
if (!object_load_chunk(0, &_trackDesign->vehicle_object, NULL)){
|
||||
if (object_manager_load_object(&_trackDesign->vehicle_object) == NULL) {
|
||||
log_error("Failed to load track (vehicle load fail): %s", path);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user