X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=ppu.cpp;h=7c22d69857daa05c367c6c1b52aa52c6983cf8f1;hb=6e374f54d9572c47503466e9f0063571fd9a54fa;hp=1bc2d414bc3231e542055f2c7c3cfb3391c740a9;hpb=909f5635bffc4c3516ddbba4f9c63c2a7333afc7;p=drnoksnes diff --git a/ppu.cpp b/ppu.cpp index 1bc2d41..7c22d69 100644 --- a/ppu.cpp +++ b/ppu.cpp @@ -46,11 +46,7 @@ #include "apu.h" #include "dma.h" #include "gfx.h" -#include "display.h" #include "sa1.h" -#ifndef _SNESPPC -//#include "netplay.h" -#endif #include "sdd1.h" #include "srtc.h" @@ -128,10 +124,6 @@ void S9xUpdateHTimer () void S9xFixColourBrightness () { IPPU.XB = mul_brightness [PPU.Brightness]; -#ifndef _SNESPPC - if (Settings.SixteenBit) -#endif - { for (int i = 0; i < 256; i++) { IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f]; @@ -140,7 +132,6 @@ void S9xFixColourBrightness () IPPU.ScreenColors [i] = BUILD_PIXEL (IPPU.Red [i], IPPU.Green [i], IPPU.Blue [i]); } - } } /**********************************************************************************************/ @@ -1338,13 +1329,13 @@ uint8 S9xGetPPU(uint16 Address) CPU.BranchSkip = TRUE; break; } - if (Address & 3 < 2) + if ((Address & 3) < 2) { int r = rand(); if (r & 2) { if (r & 4) - return (Address & 3 == 1 ? 0xaa : 0xbb); + return ((Address & 3) == 1 ? 0xaa : 0xbb); else return ((r >> 3) & 0xff); } @@ -2404,7 +2395,7 @@ void S9xProcessMouse(int which1) if ((IPPU.Controller == SNES_MOUSE || IPPU.Controller == SNES_MOUSE_SWAPPED) - && S9xReadMousePosition(which1, x, y, buttons)) + && S9xReadMousePosition(which1, &x, &y, &buttons)) { int delta_x, delta_y; #define MOUSE_SIGNATURE 0x1 @@ -2472,7 +2463,7 @@ void ProcessSuperScope() uint32 buttons; if (IPPU.Controller == SNES_SUPERSCOPE - && S9xReadSuperScopePosition(x, y, buttons)) + && S9xReadSuperScopePosition(&x, &y, &buttons)) { #define SUPERSCOPE_SIGNATURE 0x00ff uint32 scope;