mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #93 from lioncash/loop
CSlideShow: Use ranged for loops in constructor
This commit is contained in:
commit
7d2ad7b1b2
|
@ -26,36 +26,36 @@ CSlideShow::CSlideShow() : CIOWin("SlideShow"), x5c_slideA(*this), x90_slideB(*t
|
||||||
xf8_stickTextures.reserve(18);
|
xf8_stickTextures.reserve(18);
|
||||||
x108_buttonTextures.reserve(8);
|
x108_buttonTextures.reserve(8);
|
||||||
SObjectTag txtrTag(FOURCC('TXTR'), 0);
|
SObjectTag txtrTag(FOURCC('TXTR'), 0);
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (const ITweakPlayerRes::ResId lStickId : g_tweakPlayerRes->x24_lStick) {
|
||||||
txtrTag.id = g_tweakPlayerRes->x24_lStick[i];
|
txtrTag.id = lStickId;
|
||||||
xf8_stickTextures.push_back(g_SimplePool->GetObj(txtrTag));
|
xf8_stickTextures.emplace_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (const ITweakPlayerRes::ResId cStickId : g_tweakPlayerRes->x4c_cStick) {
|
||||||
txtrTag.id = g_tweakPlayerRes->x4c_cStick[i];
|
txtrTag.id = cStickId;
|
||||||
xf8_stickTextures.push_back(g_SimplePool->GetObj(txtrTag));
|
xf8_stickTextures.emplace_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (const ITweakPlayerRes::ResId lTriggerId : g_tweakPlayerRes->x74_lTrigger) {
|
||||||
txtrTag.id = g_tweakPlayerRes->x74_lTrigger[i];
|
txtrTag.id = lTriggerId;
|
||||||
xf8_stickTextures.push_back(g_SimplePool->GetObj(txtrTag));
|
xf8_stickTextures.emplace_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (const ITweakPlayerRes::ResId rTriggerId : g_tweakPlayerRes->x80_rTrigger) {
|
||||||
txtrTag.id = g_tweakPlayerRes->x80_rTrigger[i];
|
txtrTag.id = rTriggerId;
|
||||||
xf8_stickTextures.push_back(g_SimplePool->GetObj(txtrTag));
|
xf8_stickTextures.emplace_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (const ITweakPlayerRes::ResId bButtonId : g_tweakPlayerRes->xa4_bButton) {
|
||||||
txtrTag.id = g_tweakPlayerRes->xa4_bButton[i];
|
txtrTag.id = bButtonId;
|
||||||
xf8_stickTextures.push_back(g_SimplePool->GetObj(txtrTag));
|
xf8_stickTextures.emplace_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (const ITweakPlayerRes::ResId yButtonId : g_tweakPlayerRes->xbc_yButton) {
|
||||||
txtrTag.id = g_tweakPlayerRes->xbc_yButton[i];
|
txtrTag.id = yButtonId;
|
||||||
xf8_stickTextures.push_back(g_SimplePool->GetObj(txtrTag));
|
xf8_stickTextures.emplace_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSlideShow::LoadTXTRDep(std::string_view name) {
|
bool CSlideShow::LoadTXTRDep(std::string_view name) {
|
||||||
const SObjectTag* dgrpTag = g_ResFactory->GetResourceIdByName(name);
|
const SObjectTag* dgrpTag = g_ResFactory->GetResourceIdByName(name);
|
||||||
if (dgrpTag && dgrpTag->type == FOURCC('DGRP')) {
|
if (dgrpTag && dgrpTag->type == FOURCC('DGRP')) {
|
||||||
x18_galleryTXTRDeps.push_back(g_SimplePool->GetObj(*dgrpTag));
|
x18_galleryTXTRDeps.emplace_back(g_SimplePool->GetObj(*dgrpTag));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue