Try this
Code:
BYTE pixels [14] ;
int color[3];
color[GL_RED,GL_GREEN,GL_BLUE];
for (int i = 0;i<14;i++)
{
for (int ii = 0;ii<3;i++)
{
if (i == 0||5||10)
glReadPixels(300, 200, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 1||6||11)
glReadPixels(300, 400, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 2||7||12)
glReadPixels(700, 200, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 3||8||13)
glReadPixels(700, 400, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 4||9||14)
glReadPixels(500, 300, 1, 1, color[ii], GL_BYTE, &pixels[i]);
}
if(pixels[i]!=0)
{
OpenGL_SwapBuffers();
}
}
Instead of the other code.
That completely broke it, it crashes the plugin upon start of the game. I have to use task manager to close it.
Hmm try this
Code:
for (int i = 0;i<14;i++)
{
for(int ii = 0;i<2;i++)
{
if (i == 0||5||10)
glReadPixels(300, 200, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 1||6||11)
glReadPixels(300, 400, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 2||7||12)
glReadPixels(700, 200, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 3||8||13)
glReadPixels(700, 400, 1, 1, color[ii], GL_BYTE, &pixels[i]);
if (i == 4||9||14)
glReadPixels(500, 300, 1, 1, color[ii], GL_BYTE, &pixels[i]);
}
if(pixels[i]!=0)
{
OpenGL_SwapBuffers();
}
}
Now it should at lest run the game.
I'm unable to give you a clear screenshot of what happens now but it's mostly black and it flickers very fast with horizontal lines and then you can see some of the game through the lines.
How about this?
Code:
BYTE pixels [14] ;
short color[2];
color[GL_RED,GL_GREEN,GL_BLUE];
for (int i = 0;i<14;i++)
{
for(int ii = 0;i<2;i++)
{
for(int iii = 1;i<100;i++)
{
if (i == 0||5||10)
glReadPixels(300, 200, iii, iii, color[ii], GL_BYTE, &pixels[i]);
if (i == 1||6||11)
glReadPixels(300, 400, iii, iii, color[ii], GL_BYTE, &pixels[i]);
if (i == 2||7||12)
glReadPixels(700, 200, iii, iii, color[ii], GL_BYTE, &pixels[i]);
if (i == 3||8||13)
glReadPixels(700, 400, iii, iii, color[ii], GL_BYTE, &pixels[i]);
if (i == 4||9||14)
glReadPixels(500, 300, iii, iii, color[ii], GL_BYTE, &pixels[i]);
}
}
if(pixels[i]!=0)
{
OpenGL_SwapBuffers();
}
}
EDIT:
I don't think my modifications actually work but i need someone to check just in case they do.
alright just stop trying

(all your mods are just wrong, they won't work but i can't test them

), so i've taken the liberty to fix them myself
Code:
BYTE pixels [15];
BOOL pass;
short color[] = {GL_RED, GL_GREEN, GL_BLUE};
for( int i = 0; i < 14; i ) {
for( int c = 0; c < 3; c++, i+=5 ) {
glReadPixels(300, 200, 1, 1, color[c], GL_BYTE, &pixels[i]);
glReadPixels(300, 400, 1, 1, color[c], GL_BYTE, &pixels[i+1]);
glReadPixels(700, 200, 1, 1, color[c], GL_BYTE, &pixels[i+2]);
glReadPixels(700, 400, 1, 1, color[c], GL_BYTE, &pixels[i+3]);
glReadPixels(500, 300, 1, 1, color[c], GL_BYTE, &pixels[i+4]);
}
}
for( int p = 0; p < 14; p++ ) {
if( pixels[p] != 0 )
pass = TRUE;
}
if( pass )
OpenGL_SwapBuffers();
Beleive him ^ He made some plugins for iDeaS
i already posted a better handling of the code

(and i don't have an OpenGL 2.1 compatible videocard so someone should test it out

)
EDIT: one more change i forgot to add
Code:
BYTE pixels [15];
BOOL pass = FALSE;
short color[] = {GL_RED, GL_GREEN, GL_BLUE};
for( int i = 0; i < 14; i ) {
for( int c = 0; c < 3; c++, i+=5 ) {
glReadPixels(300, 200, 1, 1, color[c], GL_BYTE, &pixels[i]);
glReadPixels(300, 400, 1, 1, color[c], GL_BYTE, &pixels[i+1]);
glReadPixels(700, 200, 1, 1, color[c], GL_BYTE, &pixels[i+2]);
glReadPixels(700, 400, 1, 1, color[c], GL_BYTE, &pixels[i+3]);
glReadPixels(500, 300, 1, 1, color[c], GL_BYTE, &pixels[i+4]);
}
}
for( int p = 0; p < 14; p++ ) {
if( pixels[p] != 0 )
pass = TRUE;
}
if( pass )
OpenGL_SwapBuffers();

Works wonderful. Just like the OPs, no speed decrease from without it.
The game is far from perfect. In-game FPS meter says around 40fps average and in some areas up to 80fps but that has to be an error. The game feels sluggish compared to an actual Wii. In Dolphin it's as if my character is walking or the game is skipping frames, does it feel the same for you orbb? I didn't see a frame limited/frame skip option like they have in other emulators such as PCSX2 and ePSXe and probably others.
There is one other bug to mention (unrelated to the flickering issue-maybe). It's hard to explain so I'll attach a screen shot. It's stretching of NPC models, whether friendly or enemy. Other than that and some 10fps slow down when enemies pop-up, but as good as the game looks on Dolphin it's giving me high hopes. The game has bad graphics (IMO) on the Wii so it's nice to have Dolphin on my widescreen monitor instead of my non WS TV and to be able to disable native resolution. The game which is quite low-poly and is in desperate need of AA really benefits from disabling native res.
Back on topic-none all the games I own and are on my PC have been broken by this "fix". Muramasa runs fantastic-with and without this fix, Super Paper Mario, Super Smash Bros Melee, Twilight Princess (GC), FF:CC My Life as a King runs slow on full screen with this fix but windowed runs the same as without the fix, and Madworld all work with this with no issues (except for a 5-10fps drop in Madworld). The only game I currently have on my computer that breaks it visually (although it does fix the flickering) is Megaman 9. It has horizontal stripes and some screens (such as the input name screen) show up as all black.
Other games I can try are Brawl, Pikmin, Mario Power Tennis, and Mario Kart Wii-but I'll have to rip them first.
Lastly, here are some screen shots to show you the distorted NPCs and Enemies.