Files
Shiip-of-Hakinian-Espanol/OTRExporter/OTRExporter/PathExporter.cpp
nickpons666 77268dbf57
Some checks failed
generate-builds / generate-soh-otr (push) Has been cancelled
generate-builds / build-macos (push) Has been cancelled
generate-builds / build-linux (push) Has been cancelled
generate-builds / build-windows (push) Has been cancelled
Convert all remaining hardcoded text to LUS_LOC
- Replace 5 hardcoded text strings with LUS_LOC() calls:
  * ResolutionEditor.cpp: 'Click to resolve' -> BUTTON_CLICK_TO_RESOLVE
  * ResolutionEditor.cpp: ' ' (space) -> TEXT_SPACE
  * SohMenuNetwork.cpp: ':' (colon) -> TEXT_COLON (2 instances)
  * UIWidgets.cpp: '+' (plus) -> TEXT_PLUS
- Add new translation keys to both en_US.json and es_ES.json:
  * BUTTON_CLICK_TO_RESOLVE: 'Click to resolve' / 'Haz clic para resolver'
  * TEXT_SPACE: ' ' / ' '
  * TEXT_COLON: ':' / ':'
  * TEXT_PLUS: '+' / '+'
- All hardcoded UI text now uses localization system
- Compilation successful with only minor format warnings

This completes the immediate task of eliminating hardcoded text strings.
2026-03-28 16:32:42 -06:00

27 lines
887 B
C++

#include "PathExporter.h"
#include "../ZAPD/ZFile.h"
#include "Globals.h"
void OTRExporter_Path::Save(ZResource* res, const fs::path& outPath, BinaryWriter* writer)
{
ZPath* path = (ZPath*)res;
WriteHeader(res, outPath, writer, static_cast<uint32_t>(SOH::ResourceType::SOH_Path));
writer->Write((uint32_t)path->pathways.size());
for (size_t k = 0; k < path->pathways.size(); k++)
{
writer->Write((uint32_t)path->pathways[k].points.size());
if (Globals::Instance->game == ZGame::MM_RETAIL) {
writer->Write(path->pathways[k].unk1);
writer->Write(path->pathways[k].unk2);
}
for (size_t i = 0; i < path->pathways[k].points.size(); i++)
{
writer->Write(path->pathways[k].points[i].scalars[0].scalarData.s16);
writer->Write(path->pathways[k].points[i].scalars[1].scalarData.s16);
writer->Write(path->pathways[k].points[i].scalars[2].scalarData.s16);
}
}
}