input display

Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-07-26 21:35:49 -04:00
parent 188d91a9ec
commit 630860a636
3 changed files with 20 additions and 8 deletions

View File

@ -5,10 +5,10 @@
"homepage": "https://github.com/nmattia/niv", "homepage": "https://github.com/nmattia/niv",
"owner": "nmattia", "owner": "nmattia",
"repo": "niv", "repo": "niv",
"rev": "f73bf8d584148677b01859677a63191c31911eae", "rev": "e0ca65c81a2d7a4d82a189f1e23a48d59ad42070",
"sha256": "0jlmrx633jvqrqlyhlzpvdrnim128gc81q5psz2lpp2af8p8q9qs", "sha256": "1pq9nh1d8nn3xvbdny8fafzw87mj7gsmp6pxkdl65w2g18rmcmzx",
"type": "tarball", "type": "tarball",
"url": "https://github.com/nmattia/niv/archive/f73bf8d584148677b01859677a63191c31911eae.tar.gz", "url": "https://github.com/nmattia/niv/archive/e0ca65c81a2d7a4d82a189f1e23a48d59ad42070.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"nixpkgs": { "nixpkgs": {
@ -17,10 +17,10 @@
"homepage": "https://github.com/NixOS/nixpkgs", "homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs-channels", "repo": "nixpkgs-channels",
"rev": "5f14d99efed32721172a819b6e78a5520bab4bc6", "rev": "502845c3e31ef3de0e424f3fcb09217df2ce6df6",
"sha256": "1nxqbcsc8bfmwy450pv6s12nbvzqxai5mr6v41y478pya26lb108", "sha256": "0fcqpsy6y7dgn0y0wgpa56gsg0b0p8avlpjrd79fp4mp9bl18nda",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/5f14d99efed32721172a819b6e78a5520bab4bc6.tar.gz", "url": "https://github.com/NixOS/nixpkgs-channels/archive/502845c3e31ef3de0e424f3fcb09217df2ce6df6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
} }
} }

View File

@ -1,6 +1,6 @@
let let
sources = import ./nix/sources.nix; sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs { }; pkgs = import <nixpkgs> { };
in pkgs.mkShell { in pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# Mario 64 # Mario 64

View File

@ -1263,13 +1263,25 @@ void update_mario_button_inputs(struct MarioState *m) {
if (m->controller->buttonDown & A_BUTTON) { if (m->controller->buttonDown & A_BUTTON) {
m->input |= INPUT_A_DOWN; m->input |= INPUT_A_DOWN;
print_text(210, 32, "A");
}
if (m->controller->buttonDown & B_BUTTON) {
print_text(226, 32, "B");
}
if (m->controller->buttonDown & R_TRIG) {
print_text(226, 48, "R");
}
if (m->controller->buttonDown & Z_TRIG) {
print_text(210, 48, "2");
} }
// Don't update for these buttons if squished. // Don't update for these buttons if squished.
if (m->squishTimer == 0) { if (m->squishTimer == 0) {
if (m->controller->buttonPressed & B_BUTTON) { if (m->controller->buttonPressed & B_BUTTON) {
m->input |= INPUT_B_PRESSED; m->input |= INPUT_B_PRESSED;
print_text(210, 48, "B");
} }
if (m->controller->buttonDown & Z_TRIG) { if (m->controller->buttonDown & Z_TRIG) {