-new wiiflow loading screen, preview:

http://dl.dropbox.com/u/25620767/WiiflowMod/f.gif
-removed unneeded for loop in video.cpp to save time
rendering the wait message
This commit is contained in:
fix94.1 2012-04-27 17:28:33 +00:00
parent 78a85f827b
commit 350f7d64d1
12 changed files with 54 additions and 76 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -13,11 +13,6 @@ extern const u8 wait_02_png[];
extern const u8 wait_03_png[];
extern const u8 wait_04_png[];
extern const u8 wait_05_png[];
extern const u8 wait_06_png[];
extern const u8 wait_07_png[];
extern const u8 wait_08_png[];
extern const u8 wait_09_png[];
extern const u8 wait_10_png[];
const float CVideo::_jitter2[2][2] = {
{ 0.246490f, 0.249999f },
@ -323,13 +318,13 @@ void CVideo::drawAAScene(bool fs)
if (m_aa <= 0 || m_aa > 8)
return;
//
for (aa = 0; aa < m_aa; ++aa)
if (!m_aaBuffer[aa])
break;
if (aa == 7)
aa = 6;
//
GX_SetNumChans(0);
for (int i = 0; i < aa; ++i)
{
@ -353,12 +348,12 @@ void CVideo::drawAAScene(bool fs)
GX_SetTevAlphaOp(GX_TEVSTAGE0 + i, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
}
GX_SetNumTevStages(aa);
//
GX_SetAlphaUpdate(GX_TRUE);
GX_SetCullMode(GX_CULL_NONE);
GX_SetZMode(GX_DISABLE, GX_ALWAYS, GX_FALSE);
GX_SetBlendMode(GX_BM_NONE, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR);
//
GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);
GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
@ -460,17 +455,18 @@ void CVideo::_showWaitMessages(CVideo *m)
s16 currentLightLevel = 0;
safe_vector<STexture>::iterator waitItr = m->m_waitMessages.begin();
s8 direction = 1;
gprintf("Going to show a wait message screen, delay: %d, # images: %d\n", waitFrames, m->m_waitMessages.size());
m->waitMessage(*waitItr);
waitItr++;
waitItr += direction;
if (m->m_useWiiLight)
{
WIILIGHT_SetLevel(0);
WIILIGHT_TurnOn();
}
while (m->m_showWaitMessage)
{
if (m->m_useWiiLight)
@ -491,20 +487,11 @@ void CVideo::_showWaitMessages(CVideo *m)
if (waitFrames == 0)
{
if (waitItr == m->m_waitMessages.end())
waitItr = m->m_waitMessages.begin();
while (!*waitItr->data)
{
gprintf("Skipping one image, because loaded data is not valid\n");
waitItr++;
if (waitItr == m->m_waitMessages.end())
waitItr = m->m_waitMessages.begin();
}
m->waitMessage(*waitItr);
waitItr++;
waitItr += direction;
if(waitItr + 1 == m->m_waitMessages.end() || waitItr == m->m_waitMessages.begin())
direction *= (-1);
waitFrames = frames;
}
@ -527,6 +514,9 @@ void CVideo::hideWaitMessage()
gprintf("Now hide wait message\n");
m_showWaitMessage = false;
CheckWaitThread();
WIILIGHT_SetLevel(0);
WIILIGHT_TurnOff();
}
void CVideo::CheckWaitThread()
@ -561,22 +551,15 @@ void CVideo::waitMessage(const safe_vector<STexture> &tex, float delay, bool use
if (tex.size() == 0)
{
STexture m_wTextures[10];
STexture m_wTextures[5];
m_wTextures[0].fromPNG(wait_01_png);
m_wTextures[1].fromPNG(wait_02_png);
m_wTextures[2].fromPNG(wait_03_png);
m_wTextures[3].fromPNG(wait_04_png);
m_wTextures[4].fromPNG(wait_05_png);
m_wTextures[5].fromPNG(wait_06_png);
m_wTextures[6].fromPNG(wait_07_png);
m_wTextures[7].fromPNG(wait_08_png);
m_wTextures[8].fromPNG(wait_09_png);
m_wTextures[9].fromPNG(wait_10_png);
m_waitMessages.reserve(10);
for (int i = 0; i < 10; i++)
for (int i = 0; i < 5; i++)
m_waitMessages.push_back(m_wTextures[i]);
m_waitMessageDelay = 0.2f;
m_waitMessageDelay = 0.3f;
}
else
{
@ -603,12 +586,8 @@ void CVideo::waitMessage(const STexture &tex)
Mtx modelViewMtx;
GXTexObj texObj;
for (int i = 0; i < 3; ++i)
{
prepare();
setup2DProjection();
//prepareAAPass(i);
//setup2DProjection(false, true);
GX_SetNumChans(0);
GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);
@ -641,13 +620,12 @@ void CVideo::waitMessage(const STexture &tex)
GX_TexCoord2f32(0.f, 1.f);
GX_End();
render();
}
GX_SetNumChans(1);
}
s32 CVideo::TakeScreenshot(const char *path)
{
IMGCTX ctx = PNGU_SelectImageFromDevice (path);
IMGCTX ctx = PNGU_SelectImageFromDevice(path);
s32 ret = PNGU_EncodeFromYCbYCr(ctx, m_rmode->fbWidth, m_rmode->efbHeight, m_frameBuf[m_curFB], 1);
PNGU_ReleaseImageContext (ctx);
return ret;