-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Separacion de variables en mem.h -Creacion de pantalla.h/.c -Creacion y separacion de los metodos en util.h/c -Nuevo banner en desarollo
- Loading branch information
Showing
10 changed files
with
262 additions
and
89 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef MAIN_H | ||
#define MAIN_H | ||
|
||
// Metodo principal | ||
int main(); | ||
|
||
// Vuelve a pintar en pantalla el menu | ||
void actualiza(int opcion, PrintConsole topScreen, char *menu[], int n); | ||
|
||
// Bloquea los bucles para mostrar un mensaje de error | ||
void bloqueo(char *mensaje, int tipo); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef MEMORY_H | ||
#define MEMORY_H | ||
|
||
/**Variables*/ | ||
|
||
// Numero donde empieza el texto | ||
#define INDICE 6 | ||
// Numero de items en el menu | ||
#define lista 4 | ||
// Numero de columnas de la pantalla superior | ||
#define COLUMNAS_SUP 50 | ||
// Numero de columnas de la pantalla inferior | ||
#define COLUMNAS_INF 40 | ||
// Ruta del archivo | ||
#define RUTA "/3DSController.ini" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef PANTALLA_H | ||
#define PANTALLA_H | ||
|
||
#include <3ds.h> | ||
|
||
void borrarPantallas(void); | ||
void borrarInferior(void); | ||
void borrarSuperior(void); | ||
void clearScreen(u8* screen,gfxScreen_t screenPos); | ||
void drawPixel(int x, int y, char r, char g, char b, u8* screen); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef UTIL_H | ||
#define UTIL_H | ||
|
||
// Vuelve a pintar en pantalla el menu | ||
void actualiza(int opcion, PrintConsole topScreen, char *menu[], int n); | ||
|
||
// Bloquea los bucles para mostrar un mensaje de error | ||
void bloqueo(char *mensaje, int tipo); | ||
|
||
// Crea el archivo de configuracion | ||
void creaArchivo(void); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#include "pantalla.h" | ||
|
||
#include <stdio.h> | ||
#include <3ds.h> | ||
|
||
|
||
u8* screenBottom = 0; | ||
u8* screenTopLeft = 0; | ||
u8* screenTopRight = 0; | ||
|
||
void limpiar(u8* screen,gfxScreen_t screenPos) | ||
{ | ||
int width; | ||
int height=240; | ||
|
||
switch(screenPos){ | ||
case GFX_BOTTOM: | ||
width=320; | ||
break; | ||
default: | ||
width=400; | ||
break; | ||
} | ||
|
||
int i, j; | ||
for(i=1;i<width;i++) | ||
{ | ||
for(j=1;j<height;j++) | ||
{ | ||
drawPixel(i,j,0x00,0x00,0x00,screen); | ||
} | ||
} | ||
} | ||
|
||
void drawPixel(int x, int y, char r, char g, char b, u8* screen) | ||
{ | ||
int height=240; | ||
|
||
u32 v=(height-1-y+x*height)*3; | ||
screen[v]=b; | ||
screen[v+1]=g; | ||
screen[v+2]=r; | ||
} | ||
|
||
void borrarSuperior() | ||
{ | ||
screenTopLeft = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL); | ||
screenTopRight = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL); | ||
limpiar(screenTopLeft, GFX_LEFT); | ||
limpiar(screenTopRight, GFX_LEFT); | ||
} | ||
|
||
void borrarInferior() | ||
{ | ||
screenBottom = gfxGetFramebuffer(GFX_BOTTOM, GFX_BOTTOM, NULL, NULL); | ||
limpiar(screenBottom, GFX_BOTTOM); | ||
} | ||
void borrarPantallas() | ||
{ | ||
borrarSuperior(); | ||
borrarInferior(); | ||
} |
Oops, something went wrong.