Minor cleanups in renderer. gsoc2008_nds
authorDarren Alton <dalton@stevens.edu>
Sat, 16 Aug 2008 11:16:08 +0000
branchgsoc2008_nds
changeset 2692cd8978f47849
parent 2691 87cfb5fde5db
child 2693 bae97b6ac32b
Minor cleanups in renderer.
src/video/nds/SDL_ndsrender.c
test/nds-test-progs/general/source/main.c
test/nds-test-progs/sprite2/source/testsprite2.c
     1.1 --- a/src/video/nds/SDL_ndsrender.c	Sat Aug 16 11:05:50 2008 +0000
     1.2 +++ b/src/video/nds/SDL_ndsrender.c	Sat Aug 16 11:16:08 2008 +0000
     1.3 @@ -275,7 +275,6 @@
     1.4      NDS_OAM_Init(&(data->oam_copy)); /* init sprites. */
     1.5  
     1.6      TRACE("-NDS_CreateRenderer\n");
     1.7 -    printf("renderer is %x\n", (u32)(renderer->UpdateTexture));
     1.8      return renderer;
     1.9  }
    1.10  
    1.11 @@ -368,18 +367,6 @@
    1.12              txdat->vram_pixels = (u16*)(data->sub ?
    1.13                  BG_BMP_RAM_SUB(base) : BG_BMP_RAM(base));
    1.14  
    1.15 -            /* TESTING PURPOSES ONLY!!!
    1.16 -               shows that the texture is set up properly on the screen. */
    1.17 -            for(i = 0; i < 256*192; ++i) {
    1.18 -                txdat->vram_pixels[i] = RGB15(31,31,0)|0x8000;
    1.19 -            }
    1.20 -            printf("--one... two...\n");
    1.21 -            for(i = 0; i < 120; ++i) {
    1.22 -                swiWaitForVBlank();
    1.23 -            }
    1.24 -            for(i = 0; i < 256*192; ++i) {
    1.25 -                txdat->vram_pixels[i] = 0;
    1.26 -            }
    1.27              /*txdat->size = txdat->dim.pitch * texture->h;*/
    1.28          } else {
    1.29              SDL_SetError("Out of NDS backgrounds.");
     2.1 --- a/test/nds-test-progs/general/source/main.c	Sat Aug 16 11:05:50 2008 +0000
     2.2 +++ b/test/nds-test-progs/general/source/main.c	Sat Aug 16 11:16:08 2008 +0000
     2.3 @@ -28,7 +28,7 @@
     2.4  		puts(SDL_GetError());
     2.5  		return 1;
     2.6  	}
     2.7 -	puts("* initialized SDL\n");
     2.8 +	puts("* initialized SDL");
     2.9  	screen = SDL_SetVideoMode(256, 192, 15, SDL_SWSURFACE);
    2.10  	if(!screen) {
    2.11  		puts("# error setting video mode");
    2.12 @@ -36,7 +36,7 @@
    2.13  		return 2;
    2.14  	}
    2.15  	screen->flags &= ~SDL_PREALLOC;
    2.16 -	puts("* set video mode\n");
    2.17 +	puts("* set video mode");
    2.18  	stick = SDL_JoystickOpen(0);
    2.19  	if(stick == NULL) {
    2.20  		puts("# error opening joystick");
     3.1 --- a/test/nds-test-progs/sprite2/source/testsprite2.c	Sat Aug 16 11:05:50 2008 +0000
     3.2 +++ b/test/nds-test-progs/sprite2/source/testsprite2.c	Sat Aug 16 11:16:08 2008 +0000
     3.3 @@ -4,6 +4,7 @@
     3.4  #include <stdio.h>
     3.5  #include <time.h>
     3.6  #include <nds.h>
     3.7 +#include <fat.h>
     3.8  #include "common.h"
     3.9  
    3.10  #define NUM_SPRITES	100
    3.11 @@ -148,7 +149,7 @@
    3.12      int i, done;
    3.13      SDL_Event event;
    3.14      Uint32 then, now, frames;
    3.15 -
    3.16 +    fatInitDefault();
    3.17      /* Initialize parameters */
    3.18      num_sprites = NUM_SPRITES;
    3.19