diff options
| author | twinaphex | 2014-10-30 23:55:51 +0100 | 
|---|---|---|
| committer | twinaphex | 2014-10-30 23:55:51 +0100 | 
| commit | c10370ed571d57032f435ddd69877318e7d5bd4b (patch) | |
| tree | 78921b6a7d440866409ebac37877d61f51067f0b /source/gfx.c | |
| parent | 42cd1b4bc90873d421e20e4cf69077394565aa67 (diff) | |
| download | snesemu-c10370ed571d57032f435ddd69877318e7d5bd4b.tar.gz snesemu-c10370ed571d57032f435ddd69877318e7d5bd4b.tar.bz2 snesemu-c10370ed571d57032f435ddd69877318e7d5bd4b.zip  | |
Code readability - turn ZeroMemory into memset(a, 0, b)
Diffstat (limited to 'source/gfx.c')
| -rw-r--r-- | source/gfx.c | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/source/gfx.c b/source/gfx.c index ad5ef23..bb9a132 100644 --- a/source/gfx.c +++ b/source/gfx.c @@ -423,8 +423,8 @@ bool8 S9xGraphicsInit()           }        }     } -   ZeroMemory(GFX.ZERO, 0x10000 * sizeof(uint16)); -   ZeroMemory(GFX.ZERO_OR_X2, 0x10000 * sizeof(uint16)); +   memset(GFX.ZERO, 0, 0x10000 * sizeof(uint16)); +   memset(GFX.ZERO_OR_X2, 0, 0x10000 * sizeof(uint16));     // Build a lookup table that if the top bit of the color value is zero     // then the value is zero, otherwise multiply the value by 2. Used by     // the color subtraction code. @@ -3643,8 +3643,8 @@ void S9xUpdateScreen()              uint32 y;              for (y = starty; y <= endy; y++)              { -               ZeroMemory(GFX.SubZBuffer + y * GFX.ZPitch, IPPU.RenderedScreenWidth); -               ZeroMemory(GFX.ZBuffer + y * GFX.ZPitch, IPPU.RenderedScreenWidth); +               memset(GFX.SubZBuffer + y * GFX.ZPitch, 0, IPPU.RenderedScreenWidth); +               memset(GFX.ZBuffer + y * GFX.ZPitch, 0, IPPU.RenderedScreenWidth);                 if (IPPU.Clip [0].Count [5])                 { @@ -3685,7 +3685,7 @@ void S9xUpdateScreen()              uint32 y;              for (y = starty; y <= endy; y++)              { -               ZeroMemory(GFX.ZBuffer + y * GFX.ZPitch, IPPU.RenderedScreenWidth); +               memset(GFX.ZBuffer + y * GFX.ZPitch, 0, IPPU.RenderedScreenWidth);                 memset(GFX.SubZBuffer + y * GFX.ZPitch, 1, IPPU.RenderedScreenWidth);                 if (IPPU.Clip [0].Count [5]) @@ -4018,7 +4018,7 @@ void S9xUpdateScreen()           {              uint32 y;              for (y = starty; y <= endy; y++) -               ZeroMemory(GFX.ZBuffer + y * GFX.ZPitch, IPPU.RenderedScreenWidth); +               memset(GFX.ZBuffer + y * GFX.ZPitch, 0, IPPU.RenderedScreenWidth);              GFX.DB = GFX.ZBuffer;              RenderScreen(GFX.Screen, FALSE, TRUE, SUB_SCREEN_DEPTH);           } @@ -4032,7 +4032,7 @@ void S9xUpdateScreen()     {        if (PPU.BGMode != 5 && PPU.BGMode != 6 && IPPU.DoubleWidthPixels)        { -         // Mixure of background modes used on screen - scale width +         // Mixture of background modes used on screen - scale width           // of all non-mode 5 and 6 pixels.           register uint32 y;           for (y = starty; y <= endy; y++)  | 
