mirror of
https://github.com/neon443/ColourCam3DS.git
synced 2026-03-11 13:26:17 +00:00
idk had 20 errors now 2 progress??
This commit is contained in:
@@ -3,27 +3,34 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <3ds.h>
|
#include <3ds.h>
|
||||||
|
|
||||||
#define width 400
|
#define WIDTH 400
|
||||||
#define height 240
|
#define HEIGHT 240
|
||||||
#define screenSize width * height * 2
|
#define SCREENSIZE WIDTH * HEIGHT * 2
|
||||||
#define bufSize screenSize * 2
|
#define BUFSIZE SCREENSIZE * 2
|
||||||
|
|
||||||
inline void clearScreen(void) {
|
inline void clearScreen(void) {
|
||||||
u8 *frame = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL)
|
u8 *frame = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL);
|
||||||
memset(frame, 0, 320 * 240 * 3)
|
memset(frame, 0, 320 * 240 * 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanup() {
|
void cleanup() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void writePicToFBuff(void *fb, void *img, u16 x, u16 y, u16 width, u16 height) {
|
void writePicToFBuff(void *fb, void *img, u16 x, u16 y, u16 WIDTH, u16 HEIGHT) {
|
||||||
u8 *fb_8 = (u8*) img
|
u8 *fb_8 = (u8*) img;
|
||||||
u16 *img_16 = (u16*) img
|
u16 *img_16 = (u16*) img;
|
||||||
|
}
|
||||||
|
|
||||||
|
void flushBuffs(u8 *buf) {
|
||||||
|
free(buf);
|
||||||
|
buf = malloc(BUFSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
u8 *buf = malloc(BUFSIZE);
|
||||||
|
|
||||||
gfxInitDefault();
|
gfxInitDefault();
|
||||||
consoleInit(GFX_TOP, NULL);
|
consoleInit(GFX_TOP, NULL);
|
||||||
|
|
||||||
@@ -38,8 +45,14 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
// Your code goes here
|
// Your code goes here
|
||||||
u32 kDown = hidKeysDown();
|
u32 kDown = hidKeysDown();
|
||||||
if (kDown & KEY_START)
|
if (kDown & KEY_START) {
|
||||||
break; // break in order to return to hbmenu
|
flushBuffs(buf);
|
||||||
|
gfxFlushBuffers();
|
||||||
|
gspWaitForVBlank();
|
||||||
|
gfxSwapBuffers();
|
||||||
|
clearScreen();
|
||||||
|
// break; // break in order to return to hbmenu
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gfxExit();
|
gfxExit();
|
||||||
|
|||||||
Reference in New Issue
Block a user