Initial Commit
This commit is contained in:
17
z_gbdk_playground_original/input_wait/Makefile
Normal file
17
z_gbdk_playground_original/input_wait/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
AS = lcc -c
|
||||
CC = lcc -Wa-l -Wl-m
|
||||
|
||||
BIN = input_wait.gb
|
||||
OBJS = input_wait.o
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
%.s: %.ms
|
||||
maccer -o $@ $<
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
$(CC) -o $(BIN) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(BIN) $(OBJS) *~
|
||||
|
6
z_gbdk_playground_original/input_wait/README.md
Normal file
6
z_gbdk_playground_original/input_wait/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Input Wait
|
||||
|
||||

|
||||
|
||||
Demonstrates how to wait for key pressed and releases.
|
||||
|
15
z_gbdk_playground_original/input_wait/input_wait.c
Normal file
15
z_gbdk_playground_original/input_wait/input_wait.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <gb/gb.h>
|
||||
|
||||
void main() {
|
||||
while(1) {
|
||||
printf("Press Start\n\n");
|
||||
waitpad(J_START);
|
||||
|
||||
printf("Please hold down A!\n\n");
|
||||
waitpad(J_A);
|
||||
printf("Holding down A!\n\n");
|
||||
waitpadup();
|
||||
printf("Tired already?\n\n\n");
|
||||
}
|
||||
}
|
BIN
z_gbdk_playground_original/input_wait/screenshot.png
Normal file
BIN
z_gbdk_playground_original/input_wait/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user