diff options
Diffstat (limited to '')
-rw-r--r-- | src/poweruphax.cpp | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/poweruphax.cpp b/src/poweruphax.cpp index e1dbb87..5140843 100644 --- a/src/poweruphax.cpp +++ b/src/poweruphax.cpp @@ -97,3 +97,81 @@ void dHammerSuitRenderer_c::draw() { shell.scheduleForDrawing(); } + + + + + + + +// NEW VERSION +void CrapUpPositions(Vec *out, const Vec *in); + +void dStockItem_c::setScalesOfSomeThings() { + nw4r::lyt::Pane *ppos = N_forUse_PPos[playerCount]; + + int howManyPlayers = 0; + for (int i = 0; i < 4; i++) { + if (isPlayerActive[i]) { + int picID = getIconPictureIDforPlayer(i); + int charID = Player_ID[i]; + + if (picID != 24) { + nw4r::lyt::Picture *pic = P_icon[picID]; + + Vec in, out; + + in.x = pic->effectiveMtx[0][3]; + in.y = pic->effectiveMtx[1][3]; + in.z = pic->effectiveMtx[2][3]; + + CrapUpPositions(&out, &in); + + u8 *wmp = (u8*)player2d[charID]; + *((float*)(wmp+0xAC)) = out.x; + *((float*)(wmp+0xB0)) = out.y; + *((float*)(wmp+0xB4)) = out.z; + *((float*)(wmp+0x220)) = 0.89999998f; + *((float*)(wmp+0x224)) = 0.89999998f; + *((float*)(wmp+0x228)) = 0.89999998f; + *((float*)(wmp+0x25C)) = 26.0f; + } + howManyPlayers++; + } + } + + + for (int i = 0; i < 8; i++) { + u8 *item = (u8*)newItemPtr[i]; + + nw4r::lyt::Pane *icon = newIconPanes[i]; + + Vec in, out; + in.x = icon->effectiveMtx[0][3]; + in.y = icon->effectiveMtx[1][3]; + in.z = icon->effectiveMtx[2][3]; + + CrapUpPositions(&out, &in); + + *((float*)(item+0xAC)) = out.x; + *((float*)(item+0xB0)) = out.y; + *((float*)(item+0xB4)) = out.z; + *((float*)(item+0x1F4)) = P_buttonBase[i]->scale.x; + *((float*)(item+0x1F8)) = P_buttonBase[i]->scale.y; + *((float*)(item+0x1FC)) = 1.0f; + } + + + nw4r::lyt::Pane *shdRoot = shadow->rootPane; + shdRoot->trans.x = N_stockItem->effectiveMtx[0][3]; + shdRoot->trans.y = N_stockItem->effectiveMtx[1][3]; + shdRoot->trans.z = N_stockItem->effectiveMtx[2][3]; + shdRoot->scale.x = N_stockItem_01->effectiveMtx[0][0]; + shdRoot->scale.y = N_stockItem_01->effectiveMtx[1][1]; + + for (int i = 0; i < 7; i++) + shadow->buttonBases[i]->scale = newButtonBase[i]->scale; + shadow->hammerButtonBase->scale = newButtonBase[7]->scale; +} + + |