mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-15 01:22:59 -07:00
Use tex sizes from texture rather than hardcoded values (#610)
* Use tex sizes from texture rather than hardcoded values * Dynamic do action tex sizes * Remove unused minimap texture keys * Restore MESSAGE_STATIC_TEX_SIZE * Use dynamic offsets * MACRO it up * Enable SPDLOG in Xcode * Handle non-existent texture
This commit is contained in:
parent
47ad3bdc47
commit
582f084973
13 changed files with 209 additions and 87 deletions
|
@ -412,8 +412,10 @@ void Map_InitData(GlobalContext* globalCtx, s16 room) {
|
|||
//(uintptr_t)_map_grand_staticSegmentRomStart + gMapData->owMinimapTexOffset[extendedMapIndex],
|
||||
//gMapData->owMinimapTexSize[mapIndex], __FILE__, __LINE__);
|
||||
|
||||
if (sEntranceIconMapIndex < 24)
|
||||
memcpy(globalCtx->interfaceCtx.mapSegment, ResourceMgr_LoadTexByName(minimapTableOW[sEntranceIconMapIndex]), gMapData->owMinimapTexSize[mapIndex]);
|
||||
if (sEntranceIconMapIndex < 24) {
|
||||
const char* textureName = minimapTableOW[sEntranceIconMapIndex];
|
||||
memcpy(globalCtx->interfaceCtx.mapSegment, ResourceMgr_LoadTexByName(textureName), ResourceMgr_LoadTexSizeByName(textureName));
|
||||
}
|
||||
|
||||
interfaceCtx->unk_258 = mapIndex;
|
||||
break;
|
||||
|
@ -445,7 +447,8 @@ void Map_InitData(GlobalContext* globalCtx, s16 room) {
|
|||
//((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * 0xFF0),
|
||||
//0xFF0, __FILE__, __LINE__);
|
||||
|
||||
memcpy(globalCtx->interfaceCtx.mapSegment, ResourceMgr_LoadTexByName(minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room]), 0xFF0);
|
||||
const char* textureName = minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room];
|
||||
memcpy(globalCtx->interfaceCtx.mapSegment, ResourceMgr_LoadTexByName(textureName), ResourceMgr_LoadTexSizeByName(textureName));
|
||||
|
||||
R_COMPASS_OFFSET_X = gMapData->roomCompassOffsetX[mapIndex][room];
|
||||
R_COMPASS_OFFSET_Y = gMapData->roomCompassOffsetY[mapIndex][room];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue