Slighly-broken? sneakers.c

This commit is contained in:
Greg Shuflin 2023-11-12 11:43:23 -08:00
parent 297c1aedb9
commit 19d84a7c9a
3 changed files with 9 additions and 5 deletions

View File

@ -20,8 +20,8 @@ CFLAGS ?= -Wextra -Wall -O2
nms: $(OBJ)/error.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ target/release/libnmsrust.a
sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
sneakers: $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ target/release/libnmsrust.a
all: nms sneakers
@ -30,8 +30,8 @@ all-ncurses: nms-ncurses sneakers-ncurses
nms-ncurses: $(OBJ)/error.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncursesw target/release/libnmsrust.a
sneakers-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/sneakers $^ -lncursesw
sneakers-ncurses: $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/sneakers $^ -lncursesw target/release/libnmsrust.a
$(OBJ)/%.o: $(SRC)/%.c | $(OBJ)
$(CC) $(CFLAGS) -o $@ -c $<

View File

@ -12,6 +12,10 @@ build_ncurses:
cargo build --release
make nms-ncurses
build_sneakers:
cargo build --release
make sneakers
# Clean all project files
clean:

View File

@ -185,7 +185,7 @@ int main(void) {
memcpy(display_uc, display, 20 * termCols);
// Execute effect
nmseffect_exec(display_uc, strlen(display));
nmseffect_exec(display_uc, strlen(display), 0, 1, 1);
free(display);
free(display_uc);