Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Minor cleanups in renderer.
  • Loading branch information
Darren Alton committed Aug 16, 2008
1 parent 943049d commit 69fd8a1af20261d7c3e11b8b05ae93a493c5aa4a
@@ -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;
}

@@ -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.");
@@ -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");
@@ -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 @@ main(int argc, char *argv[])
int i, done;
SDL_Event event;
Uint32 then, now, frames;

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

0 comments on commit 69fd8a1

Please sign in to comment.