Skip to content

Commit

Permalink
Small code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Matsuoka <[email protected]>
  • Loading branch information
cmatsuoka committed Jan 22, 2014
1 parent 696bdc0 commit d069314
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion plzpart/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main(int argc, char **argv) {
init_copper();
initvect();
plz();
vect();
//vect();
close_copper();
return 0;
}
2 changes: 1 addition & 1 deletion plzpart/plz.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void plz(){
draw_bg();
swap_buffers();
}
cop_drop=0; frame_count=0; while(frame_count==0);
cop_drop=0; frame_count=0; //while(frame_count==0);
set_plzstart(500);
cop_plz=0;
}
Expand Down
3 changes: 2 additions & 1 deletion plzpart/vect.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void vect()

tw_opengraph();

while(dis_musplus()<13 && !dis_exit()); frame_count=0;
//while(dis_musplus()<13 && !dis_exit());
frame_count=0;
while(!dis_exit())
{
a=dis_musplus();
Expand Down
21 changes: 1 addition & 20 deletions plzpart/vga.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <string.h>
#include "common.h"

//var g_au8FrameBuffer = new Uint8Array(FRAME_BUFFER_WIDTH * FRAME_BUFFER_HEIGHT);
static int plane_select[4] = { 0, 0, 0, 0 };
static int line_compare = 0;
static int hscroll_offset = 0;
Expand Down Expand Up @@ -82,7 +81,7 @@ void vga_show_framebuffer()
int x, y;

// Clear the screen.
memset(image, 0, 320 * 480 * 3);
memset(image, 0, FRAME_BUFFER_WIDTH * FRAME_BUFFER_HEIGHT * 3);

copper1();
copper2();
Expand All @@ -102,24 +101,6 @@ void vga_show_framebuffer()
g = palette[idx++];
b = palette[idx];

// [NK 12/1/2014] VGA colours range from 0 - 63 inclusive, but
// [NK 12/1/2014] SDL colours range from 0 - 255 inclusive, so
// [NK 12/1/2014] account for this here.
#if 0
r &= 63;
g &= 63;
b &= 63;

r *= 255;
r /= 63;
g *= 255;
g /= 63;
b *= 255;
b /= 63;

SDL_SetPixelColours(x, y, r, g, b);
#endif

int ofs = (y * 320 + x) * 3;
image[ofs++] = (r << 2) & 0xff;
image[ofs++] = (g << 2) & 0xff;
Expand Down

0 comments on commit d069314

Please sign in to comment.