diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
commit | c2efba6907fab934a04959b9bb644cf7141cc955 (patch) | |
tree | c047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2Name.cpp | |
parent | 1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff) | |
download | t2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip |
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Name.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/T2DLL/T2Name.cpp b/src/T2DLL/T2Name.cpp index 7cee408..5febc0c 100644 --- a/src/T2DLL/T2Name.cpp +++ b/src/T2DLL/T2Name.cpp @@ -17,6 +17,7 @@ T2Name::T2Name() { } T2Name::T2Name(T2Archive& archive) { +#pragma var_order(valUChar, valUShort, valInt, str) unsigned short valUShort; unsigned char valUChar; int valInt; @@ -102,17 +103,17 @@ void T2Name::SetName(CString name) { mName = name; } -void T2Name::MakeFullName(T2TowerDoc* towerDoc, CString& outStr) { +void T2Name::MakeFullName(T2TowerDoc* inDoc, CString& outStr) { if (mName != NULL) { switch (GetType()) { case kTenantNameType: - if (towerDoc && towerDoc->towerDoc_vf12C()) { - T2FloorInfo *theFloorInfo = towerDoc->towerDoc_vf12C(); + if (inDoc && inDoc->towerDoc_vf12C()) { + T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C(); T2Tenant *theTenant = theFloorInfo->GetTenant(GetID()); if (theTenant) { CString str; - int roomNumber = theTenant->GetRoomNumber(theFloorInfo); - UT2Utils::GetRoomNumberString(roomNumber, str); + int theRoomNumber = theTenant->GetRoomNumber(theFloorInfo); + UT2Utils::GetRoomNumberString(theRoomNumber, str); str += "\x8D\x86\x8E\xBA"; // "号室" outStr = str + mName; } @@ -120,17 +121,17 @@ void T2Name::MakeFullName(T2TowerDoc* towerDoc, CString& outStr) { break; case kPeopleNameType: - if (towerDoc && towerDoc->towerDoc_vf12C() && towerDoc->mPeopleArrayList) { - T2People *thePeople = towerDoc->mPeopleArrayList->FindPeople(GetID()); + if (inDoc && inDoc->towerDoc_vf12C() && inDoc->mPeopleArrayList) { + T2People *thePeople = inDoc->mPeopleArrayList->FindPeople(GetID()); if (thePeople) { - T2FloorInfo *theFloorInfo = towerDoc->towerDoc_vf12C(); - int tenantID = (thePeople->GetWorkTenant() > 1) ? thePeople->GetWorkTenant() : (thePeople->GetHomeTenant() > 1) ? thePeople->GetHomeTenant() : 1; + T2FloorInfo *theFloorInfo = inDoc->towerDoc_vf12C(); + int theTenantID = (thePeople->GetWorkTenant() > 1) ? thePeople->GetWorkTenant() : (thePeople->GetHomeTenant() > 1) ? thePeople->GetHomeTenant() : 1; CString str; - T2Tenant *theTenant = theFloorInfo->GetTenant(tenantID); + T2Tenant *theTenant = theFloorInfo->GetTenant(theTenantID); if (theTenant) { - int roomNumber = theTenant->GetRoomNumber(theFloorInfo); - UT2Utils::GetRoomNumberString(roomNumber, str); + int theRoomNumber = theTenant->GetRoomNumber(theFloorInfo); + UT2Utils::GetRoomNumberString(theRoomNumber, str); str += "\x8D\x86\x8E\xBA"; // "号室" } else { str = "\x83\x65\x83\x69\x83\x93\x83\x67\x82\xC8\x82\xB5"; // "テナントなし" |