mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Copy the map data
This commit is contained in:
@@ -153,11 +153,13 @@ static const char* sMapGrandTextures[] = {
|
||||
map_grand_static_Blob_034BB0, map_grand_static_Blob_034F50,
|
||||
};
|
||||
|
||||
void MapDisp_GetMapITexture(void** dst, s32 mapCompactId) {
|
||||
// BENTODO, can we just set dest insetead of doing a memcpy?
|
||||
void MapDisp_GetMapITexture(void* dst, s32 mapCompactId) {
|
||||
s32 mapSize = MapDisp_GetSizeOfMapITex(mapCompactId);
|
||||
|
||||
if (mapSize != 0) {
|
||||
*dst = ResourceMgr_LoadTexOrDListByName(sMapTextures[mapCompactId]);
|
||||
void* data = ResourceMgr_LoadTexOrDListByName(sMapTextures[mapCompactId]);
|
||||
memcpy(dst, data, mapSize);
|
||||
//CmpDma_LoadFile(SEGMENT_ROM_START(map_i_static), mapCompactId, dst, MapDisp_GetSizeOfMapITex(mapCompactId));
|
||||
}
|
||||
}
|
||||
@@ -1262,8 +1264,7 @@ void* MapDisp_AllocDungeonMap(PlayState* play, void* heap) {
|
||||
s32 mapCompactId = sPauseDungeonMap.mapI_mapCompactId[dungeonMapRoomIter];
|
||||
|
||||
// 2S2H [Port] directly set the pointer to the texture instead of using memcpy
|
||||
// BENTODO, can we avoid using any game made heap since the textures are loaded as a resource?
|
||||
MapDisp_GetMapITexture(&sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter], mapCompactId);
|
||||
MapDisp_GetMapITexture(sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter], mapCompactId);
|
||||
if (dungeonMapRoomIter + 1 < sPauseDungeonMap.textureCount) {
|
||||
sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter + 1] =
|
||||
ALIGN16((intptr_t)sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter] +
|
||||
|
||||
Reference in New Issue
Block a user