move code to root directory
This commit is contained in:
parent
dd9701c3cb
commit
5a706c8a55
26 changed files with 7 additions and 246 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -1,9 +1,8 @@
|
||||||
/3DSsource/build
|
build
|
||||||
/3DSsource/*.elf
|
*.elf
|
||||||
/3DSsource/*stripped.elf
|
*stripped.elf
|
||||||
/3DSsource/.vscode
|
.cache
|
||||||
/3DSsource/.cache
|
.gdb_history
|
||||||
/3DSsource/.gdb_history
|
|
||||||
C/build/
|
C/build/
|
||||||
*.pnproj
|
*.pnproj
|
||||||
*.pnps
|
*.pnps
|
||||||
|
@ -11,4 +10,3 @@ C/build/
|
||||||
*.smdh
|
*.smdh
|
||||||
*.elf
|
*.elf
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
/3DSsource/compile_commands.json
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,184 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"drawing.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/drawing.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/drawing.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/drawing.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"inet_pton.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/inet_pton.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/inet_pton.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/inet_pton.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"input.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/input.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/input.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/input.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"keyboard.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/keyboard.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/keyboard.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/keyboard.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"main.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/main.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/main.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/main.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"settings.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/settings.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/settings.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/settings.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"arguments": [
|
|
||||||
"/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
|
|
||||||
"-g",
|
|
||||||
"-Wall",
|
|
||||||
"-O2",
|
|
||||||
"-mword-relocations",
|
|
||||||
"-fomit-frame-pointer",
|
|
||||||
"-ffast-math",
|
|
||||||
"-fms-extensions",
|
|
||||||
"-march=armv6k",
|
|
||||||
"-mtune=mpcore",
|
|
||||||
"-mfloat-abi=hard",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/include",
|
|
||||||
"-I/opt/devkitpro/libctru/include",
|
|
||||||
"-I/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"-D__3DS__",
|
|
||||||
"-c",
|
|
||||||
"-o",
|
|
||||||
"wireless.o",
|
|
||||||
"/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/wireless.c"
|
|
||||||
],
|
|
||||||
"directory": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build",
|
|
||||||
"file": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/source/wireless.c",
|
|
||||||
"output": "/home/fijxu/Documents/gitperomio/3DSController/3DSsource/build/wireless.o"
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -42,7 +42,7 @@ ICON := cxi/icon48x48.png
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
||||||
|
|
||||||
CFLAGS := -g -Wall -O2 -mword-relocations \
|
CFLAGS := -g -Wall -O2 \
|
||||||
-fomit-frame-pointer -ffast-math \
|
-fomit-frame-pointer -ffast-math \
|
||||||
-fms-extensions \
|
-fms-extensions \
|
||||||
$(ARCH)
|
$(ARCH)
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "drawing.h"
|
#include "drawing.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "keyboard.h"
|
// #include "keyboard.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "wireless.h"
|
#include "wireless.h"
|
||||||
|
|
||||||
|
@ -120,54 +120,6 @@ int main(void) {
|
||||||
|
|
||||||
clearScreen();
|
clearScreen();
|
||||||
|
|
||||||
if ((kHeld & KEY_L) && (kHeld & KEY_R) && (kHeld & KEY_X)) {
|
|
||||||
if (keyboardToggle) {
|
|
||||||
keyboardActive = !keyboardActive;
|
|
||||||
keyboardToggle = false;
|
|
||||||
|
|
||||||
if (keyboardActive) {
|
|
||||||
GSPLCD_PowerOnAllBacklights();
|
|
||||||
} else {
|
|
||||||
GSPLCD_PowerOffAllBacklights();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
keyboardToggle = true;
|
|
||||||
|
|
||||||
if (keyboardActive) {
|
|
||||||
drawKeyboard();
|
|
||||||
|
|
||||||
if (touch.px >= 1 && touch.px <= 312 && touch.py >= 78 &&
|
|
||||||
touch.py <= 208) {
|
|
||||||
int x = (int)((float)touch.px * 12.0f / 320.0f);
|
|
||||||
int y = (int)((float)(touch.py - 78) * 12.0f / 320.0f);
|
|
||||||
int width = 24;
|
|
||||||
int height = 24;
|
|
||||||
|
|
||||||
if (keyboardChars[x + y * 12] == ' ') {
|
|
||||||
while (keyboardChars[(x - 1) + y * 12] == ' ')
|
|
||||||
x--;
|
|
||||||
|
|
||||||
width = (int)(5.0f * 320.0f / 12.0f) - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (keyboardChars[x + y * 12] == '\13') {
|
|
||||||
while (keyboardChars[(x - 1) + y * 12] == '\13')
|
|
||||||
x--;
|
|
||||||
while (keyboardChars[x + (y - 1) * 12] == '\13')
|
|
||||||
y--;
|
|
||||||
|
|
||||||
width = (int)(2.0f * 320.0f / 12.0f) - 1;
|
|
||||||
height = (int)(3.0f * 320.0f / 12.0f) - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyboardChars[x + y * 12])
|
|
||||||
drawBox((int)((float)x * 320.0f / 12.0f) + 1,
|
|
||||||
(int)(78.0f + (float)y * 320.0f / 12.0f) + 1, width, height,
|
|
||||||
31, 31, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sendKeys(kHeld, circlePad, touch, cStick, volume, gyro, accel);
|
sendKeys(kHeld, circlePad, touch, cStick, volume, gyro, accel);
|
||||||
// drawString(10, 10, "Volume: %x", volume);
|
// drawString(10, 10, "Volume: %x", volume);
|
||||||
// receiveBuffer(sizeof(struct packet));
|
// receiveBuffer(sizeof(struct packet));
|
||||||
|
@ -183,16 +135,11 @@ int main(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
GSPLCD_PowerOnAllBacklights();
|
GSPLCD_PowerOnAllBacklights();
|
||||||
|
|
||||||
socExit();
|
socExit();
|
||||||
|
|
||||||
svcCloseHandle(fileHandle);
|
svcCloseHandle(fileHandle);
|
||||||
fsExit();
|
fsExit();
|
||||||
|
|
||||||
gfxExit();
|
gfxExit();
|
||||||
acExit();
|
acExit();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue