Mostly fix sliding and do some VS Code/Makefile things

This commit is contained in:
Heath Mitchell 2021-12-04 19:40:49 +00:00
parent a4ebf7a253
commit 9d1d8be31c
No known key found for this signature in database
GPG Key ID: B0A6B2B65D23D27B
7 changed files with 26 additions and 2 deletions

9
.vscode/launch.json vendored
View File

@ -4,6 +4,15 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// Run the "Build for browser" task
{
"name": "Run",
"type": "chrome",
"request": "attach",
"url": "http://localhost:8080/index.html",
"webRoot": "${workspaceRoot}",
"preLaunchTask": "Build for browser"
},
{
"name": "sh3eb-elf-g++ - Build and debug active file",
"type": "cppdbg",

12
.vscode/tasks.json vendored
View File

@ -1,5 +1,17 @@
{
"tasks": [
{
"label": "Build for browser",
"type": "shell",
"command": "make",
"args": [
"html/index.html"
],
"group": "build",
"presentation": {
"reveal": "always"
}
},
{
"type": "cppbuild",
"label": "C/C++: sh3eb-elf-g++ build active file",

View File

@ -104,7 +104,7 @@ export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: all clean
#---------------------------------------------------------------------------------
all: $(BUILD) /usr/local/bin/http-server
all: $(BUILD)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
# Don't know what I'm doing here
@ -112,7 +112,7 @@ generated_lut.cpp: /home/heath/ti-mario-kart-py/compress.py lookup_gen_config.ya
/usr/bin/env /bin/python3.10 /home/heath/ti-mario-kart-py/compress.py > generated_lut.cpp
# Still not really sure what I'm doing here
html/index.html: generated_lut.cpp
html/index.html: all
emcc -D FXCG_MOCK -Ifxcg-mock/include -g src/main.c ./fxcg-mock/include/fxcg/*.c -o html/index.html
browser: html/index.html

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -341,6 +341,9 @@ void main_loop() {
} else {
kartVel *= 0.9;
}
if (kartVel < 1.42) {
kartVel = 0;
}
float oldKartX = kartX;
float oldKartY = kartY;
kartY += kartVel * sin(-kartAngle);