Skip to content

Commit

Permalink
removed debug output from bottom screen; minor improvement to screen …
Browse files Browse the repository at this point in the history
…copy
  • Loading branch information
elhobbs committed Aug 27, 2016
1 parent 3e512be commit 12c226a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
3 changes: 3 additions & 0 deletions 3ds/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,9 @@ void keyboard_draw()
else {
consoleClear();
memset(keyboard_screen, 0, 320 * 240 * 2);
if (keyboard_visible == 2) {
h = 0;
}
consoleSetWindow(0, 0, 0, 40, h);
}

Expand Down
26 changes: 17 additions & 9 deletions 3ds/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,20 @@ void copy_screen(int side) {
u8* bufAdr = gfxGetFramebuffer(GFX_TOP, side, &screen_height, &screen_width);
byte *src = screen;
int w, h;
u32 c;

for (w = 0; w<SCREENWIDTH; w++)
{
u32 v1 = (SCREENHEIGHT-1) * SCREENWIDTH + w;
u32 v = (w * SCREENHEIGHT) * 3;
for (h = 0; h<SCREENHEIGHT; h++)
{
u32 v = (w * screen_height + h) * 3;
u32 v1 = ((SCREENHEIGHT - h - 1) * SCREENWIDTH + w);
bufAdr[v] = pal3ds[src[v1] * 3 + 2];
bufAdr[v + 1] = pal3ds[src[v1] * 3 + 1];
bufAdr[v + 2] = pal3ds[src[v1] * 3 + 0];
c = src[v1]*3;
bufAdr[v ] = pal3ds[c + 2];
bufAdr[v + 1] = pal3ds[c + 1];
bufAdr[v + 2] = pal3ds[c + 0];
v1 -= SCREENWIDTH;
v += 3;
}
}
#endif
Expand All @@ -468,6 +472,7 @@ void copy_subscreen(int side) {
int w, h;
int rows_to_copy;
int row_start;
u32 c;

if (!automapactive || automapontop) {
rows_to_copy = 66;
Expand All @@ -480,18 +485,21 @@ void copy_subscreen(int side) {

for (w = 0; w<320; w++)
{
u32 v1 = (SCREENHEIGHT - 1) * SCREENWIDTH + w;
u32 v = (w * SCREENHEIGHT);
for (h = 0; h<rows_to_copy; h++)
{
u32 v = (w * screen_height + h);
u32 v1 = ((240 - h - 1) * SCREENWIDTH + w);
switch (src[v1]) {
c = src[v1]*3;
switch (c) {
case 0:
bufAdr[v] = 0;
break;
default:
bufAdr[v] = RGB8_to_565(pal3ds[src[v1] * 3 + 0], pal3ds[src[v1] * 3 + 1], pal3ds[src[v1] * 3 + 2]);
bufAdr[v] = RGB8_to_565(pal3ds[c + 0], pal3ds[c + 1], pal3ds[c + 2]);
break;
}
v1 -= SCREENWIDTH;
v++;
}
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion source/G_GAME.c
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ void G_DoReborn(int playernum)
}
else
{ // Start a new game if there's no reborn info
printf("G_DoReborn: %d\n", gameaction);
//printf("G_DoReborn: %d\n", gameaction);
gameaction = ga_newgame;
}
}
Expand Down
3 changes: 3 additions & 0 deletions source/H2_MAIN.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ void S_Update();
static void DrawAndBlit(void)
{
int i;
//u64 start = svcGetSystemTick();

if (*slider == 0.0f) {
screen_side = 1;
Expand Down Expand Up @@ -741,6 +742,8 @@ static void DrawAndBlit(void)
}

screen_side = 3;
//u64 end = svcGetSystemTick();
//printf("tick: %10lld\n", end - start);
}

//==========================================================================
Expand Down
2 changes: 1 addition & 1 deletion source/SV_SAVE.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ boolean SV_RebornSlotAvailable(void)
char fileName[100];

sprintf(fileName, "%shex%d.hxs", SavePath, REBORN_SLOT);
printf("reborn slot: %s\n", fileName);
//printf("reborn slot: %s\n", fileName);
return ExistingFile(fileName);
}

Expand Down

0 comments on commit 12c226a

Please sign in to comment.