changeset 2692:cd8978f47849 gsoc2008_nds

Minor cleanups in renderer.
author Darren Alton <dalton@stevens.edu>
date Sat, 16 Aug 2008 11:16:08 +0000
parents 87cfb5fde5db
children bae97b6ac32b
files src/video/nds/SDL_ndsrender.c test/nds-test-progs/general/source/main.c test/nds-test-progs/sprite2/source/testsprite2.c
diffstat 3 files changed, 4 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/nds/SDL_ndsrender.c	Sat Aug 16 11:05:50 2008 +0000
+++ b/src/video/nds/SDL_ndsrender.c	Sat Aug 16 11:16:08 2008 +0000
@@ -275,7 +275,6 @@
     NDS_OAM_Init(&(data->oam_copy)); /* init sprites. */
 
     TRACE("-NDS_CreateRenderer\n");
-    printf("renderer is %x\n", (u32)(renderer->UpdateTexture));
     return renderer;
 }
 
@@ -368,18 +367,6 @@
             txdat->vram_pixels = (u16*)(data->sub ?
                 BG_BMP_RAM_SUB(base) : BG_BMP_RAM(base));
 
-            /* TESTING PURPOSES ONLY!!!
-               shows that the texture is set up properly on the screen. */
-            for(i = 0; i < 256*192; ++i) {
-                txdat->vram_pixels[i] = RGB15(31,31,0)|0x8000;
-            }
-            printf("--one... two...\n");
-            for(i = 0; i < 120; ++i) {
-                swiWaitForVBlank();
-            }
-            for(i = 0; i < 256*192; ++i) {
-                txdat->vram_pixels[i] = 0;
-            }
             /*txdat->size = txdat->dim.pitch * texture->h;*/
         } else {
             SDL_SetError("Out of NDS backgrounds.");
--- a/test/nds-test-progs/general/source/main.c	Sat Aug 16 11:05:50 2008 +0000
+++ b/test/nds-test-progs/general/source/main.c	Sat Aug 16 11:16:08 2008 +0000
@@ -28,7 +28,7 @@
 		puts(SDL_GetError());
 		return 1;
 	}
-	puts("* initialized SDL\n");
+	puts("* initialized SDL");
 	screen = SDL_SetVideoMode(256, 192, 15, SDL_SWSURFACE);
 	if(!screen) {
 		puts("# error setting video mode");
@@ -36,7 +36,7 @@
 		return 2;
 	}
 	screen->flags &= ~SDL_PREALLOC;
-	puts("* set video mode\n");
+	puts("* set video mode");
 	stick = SDL_JoystickOpen(0);
 	if(stick == NULL) {
 		puts("# error opening joystick");
--- a/test/nds-test-progs/sprite2/source/testsprite2.c	Sat Aug 16 11:05:50 2008 +0000
+++ b/test/nds-test-progs/sprite2/source/testsprite2.c	Sat Aug 16 11:16:08 2008 +0000
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <nds.h>
+#include <fat.h>
 #include "common.h"
 
 #define NUM_SPRITES	100
@@ -148,7 +149,7 @@
     int i, done;
     SDL_Event event;
     Uint32 then, now, frames;
-
+    fatInitDefault();
     /* Initialize parameters */
     num_sprites = NUM_SPRITES;