Compare commits

..

20 Commits

Author SHA1 Message Date
mark wallace
a2d7ce9132 Delete mapTop03.png 2025-02-13 21:06:12 +00:00
mark wallace
3188550311 Delete mapTop02.png 2025-02-13 21:06:06 +00:00
mark wallace
9a1ea298d9 Delete mapTop01.png 2025-02-13 21:05:59 +00:00
mark wallace
383442c6aa Delete mapMid03.png 2025-02-13 21:05:51 +00:00
mark wallace
9b775dff3f Delete mapMid02.png 2025-02-13 21:05:44 +00:00
mark wallace
353b7cc56d Delete mapMid01.png 2025-02-13 21:05:38 +00:00
mark wallace
52c4946111 Delete mapBot03.png 2025-02-13 21:05:28 +00:00
mark wallace
77b40f3004 Delete mapBot02.png 2025-02-13 21:05:20 +00:00
mark wallace
ff2368da21 Delete mapBot01.png 2025-02-13 21:05:07 +00:00
mark wallace
4ac38c0d64 Upload New File 2025-02-13 02:19:31 +00:00
mark wallace
ed2898ae2a Upload New File 2025-02-13 02:19:20 +00:00
mark wallace
a14f51246d Upload New File 2025-02-13 02:19:08 +00:00
mark wallace
19f22e8edb Upload New File 2025-02-13 02:18:50 +00:00
mark wallace
354b1ae92c Upload New File 2025-02-13 02:18:35 +00:00
mark wallace
a6a1fdb9cb Upload New File 2025-02-13 02:18:17 +00:00
mark wallace
309232c221 Upload New File 2025-02-13 02:18:02 +00:00
mark wallace
70df292c7a Upload New File 2025-02-13 02:17:39 +00:00
mark wallace
554a668897 Upload New File 2025-02-13 02:17:16 +00:00
mark wallace
3998368791 Edit Makefile 2025-02-13 02:14:58 +00:00
mark wallace
730302180a Edit config.h 2025-02-13 02:13:19 +00:00
4 changed files with 12 additions and 32 deletions

View File

@@ -286,7 +286,17 @@ texconv: $(OBJS_TEXCONV) | pvrtex # You'll have to rebuild pvrtex manually if yo
TXD_OPTS_fonts = 256 256
TXD_OPTS_hud = 128 128
TXD_OPTS_menu = 512 512
TXD_OPTS_menu = 512 512 \
--include-tex assets/mapBot01.png mapBot01 \
--include-tex assets/mapBot02.png mapBot02 \
--include-tex assets/mapBot03.png mapBot03 \
--include-tex assets/mapMid01.png mapMid01 \
--include-tex assets/mapMid02.png mapMid02 \
--include-tex assets/mapMid03.png mapMid03 \
--include-tex assets/mapTop01.png mapTop01 \
--include-tex assets/mapTop02.png mapTop02 \
--include-tex assets/mapTop03.png mapTop03
TXD_OPTS_LOADSC0 = 512 512
TXD_OPTS_LOADSC1 = 512 512
TXD_OPTS_LOADSC10 = 512 512

View File

@@ -1012,14 +1012,8 @@ void CGame::InitialiseWhenRestarting(void)
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
}
namespace rw::dc {
void relocate_objects();
}
void CGame::Process(void)
{
rw::dc::relocate_objects();
CPad::UpdatePads();
#ifdef USE_CUSTOM_ALLOCATOR
ProcessTidyUpMemory();

View File

@@ -379,7 +379,7 @@ enum Config {
# define CUSTOM_FRONTEND_OPTIONS
# ifdef CUSTOM_FRONTEND_OPTIONS
# define MENU_MAP // VC-like menu map. Won't appear if you don't have our menu.txd
# define MENU_MAP // Enabled on Dca3 now, but could use some controller mapping**
# define GRAPHICS_MENU_OPTIONS // otherwise Display settings will be scrollable
# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
# define CUTSCENE_BORDERS_SWITCH

View File

@@ -5,10 +5,6 @@
#include <string.h>
#include <assert.h>
extern "C" size_t malloc_usable_size(void* m);
#include <list>
#if !defined(DC_TEXCONV) && !defined(MACOS64)
#include <malloc.h>
#endif
@@ -4603,31 +4599,12 @@ writeNativeTexture(Texture *tex, Stream *stream)
#define DC_MODEL_VERSION 5
std::list<void**> allocations;
void relocate_objects() {
for (auto allocation: allocations) {
auto size = malloc_usable_size(*allocation);
void* candidate = rwMalloc(size, MEMDUR_EVENT | ID_GEOMETRY);
if (!candidate)
continue;
if ((uintptr_t&)candidate < (uintptr_t&)*allocation) {
// fprintf(stderr, "Moving memory %p to %p\n", *allocation, candidate);
memcpy(candidate, *allocation, size);
free(*allocation);
*allocation = candidate;
} else {
free(candidate);
}
}
}
void*
destroyNativeData(void *object, int32, int32)
{
auto geo = (Geometry*)object;
rwFree(geo->instData);
geo->instData = nil;
allocations.remove(&(void*&)geo->instData);
return object;
}
@@ -4645,7 +4622,6 @@ readNativeData(Stream *stream, int32 length, void *object, int32, int32)
DCModelDataHeader *header = (DCModelDataHeader *)rwNew(sizeof(DCModelDataHeader) + chunkLen - 8, MEMDUR_EVENT | ID_GEOMETRY);
geo->instData = header;
allocations.insert(allocations.begin(), &(void*&)geo->instData);
stream->read32(&header->platform, 4);
uint32_t version;
stream->read32(&version, 4);