mirror of
https://github.com/neon443/ColourCam3DS.git
synced 2026-03-11 05:19:13 +00:00
add template and fix the stupid ahh
This commit is contained in:
7
Makefile
7
Makefile
@@ -52,18 +52,18 @@ CFLAGS := -g -Wall -O2 -mword-relocations \
|
||||
|
||||
CFLAGS += $(INCLUDE) -D__3DS__
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++14
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
LIBS := -lctru -lm
|
||||
LIBS := -lcitro2d -lcitro3d -lctru -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS := $(CTRULIB)
|
||||
LIBDIRS := $(CTRULIB) $(PORTLIBS)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -222,6 +222,7 @@ $(OUTPUT).elf : $(OFILES)
|
||||
$(SILENTMSG) $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
|
||||
-include $(DEPSDIR)/*.d
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
|
||||
33
source/main.c
Normal file
33
source/main.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <3ds.h>
|
||||
|
||||
#define width 400
|
||||
#define height 240
|
||||
#define screenSize width * height * 2
|
||||
#define bufSize screenSize * 2
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
gfxInitDefault();
|
||||
consoleInit(GFX_TOP, NULL);
|
||||
|
||||
printf("Hello, world!\n");
|
||||
|
||||
// Main loop
|
||||
while (aptMainLoop())
|
||||
{
|
||||
gspWaitForVBlank();
|
||||
gfxSwapBuffers();
|
||||
hidScanInput();
|
||||
|
||||
// Your code goes here
|
||||
u32 kDown = hidKeysDown();
|
||||
if (kDown & KEY_START)
|
||||
break; // break in order to return to hbmenu
|
||||
}
|
||||
|
||||
gfxExit();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user