mirror of https://github.com/AxioDL/metaforce.git
CSlideShow: Use ranged for loops in constructor
Same behavior, but without hard-coded magic size values.
This commit is contained in:
parent
81a019b1e0
commit
b7e0dbd354
|
@ -26,28 +26,28 @@ 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.push_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.push_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.push_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.push_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.push_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.push_back(g_SimplePool->GetObj(txtrTag));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue