Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Minor cleanups in renderer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Alton committed Aug 16, 2008
1 parent 943049d commit 69fd8a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
13 changes: 0 additions & 13 deletions src/video/nds/SDL_ndsrender.c
Expand Up @@ -275,7 +275,6 @@ NDS_CreateRenderer(SDL_Window * window, Uint32 flags)
NDS_OAM_Init(&(data->oam_copy)); /* init sprites. */

TRACE("-NDS_CreateRenderer\n");
printf("renderer is %x\n", (u32)(renderer->UpdateTexture));
return renderer;
}

Expand Down Expand Up @@ -368,18 +367,6 @@ NDS_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
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.");
Expand Down
4 changes: 2 additions & 2 deletions test/nds-test-progs/general/source/main.c
Expand Up @@ -28,15 +28,15 @@ int main(void) {
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");
puts(SDL_GetError());
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");
Expand Down
3 changes: 2 additions & 1 deletion test/nds-test-progs/sprite2/source/testsprite2.c
Expand Up @@ -4,6 +4,7 @@
#include <stdio.h>
#include <time.h>
#include <nds.h>
#include <fat.h>
#include "common.h"

#define NUM_SPRITES 100
Expand Down Expand Up @@ -148,7 +149,7 @@ main(int argc, char *argv[])
int i, done;
SDL_Event event;
Uint32 then, now, frames;

fatInitDefault();
/* Initialize parameters */
num_sprites = NUM_SPRITES;

Expand Down

0 comments on commit 69fd8a1

Please sign in to comment.