added anti aliasing. new fps game

This commit is contained in:
Masashi 2025-12-17 15:38:06 +05:30
commit 7b73c86113
40 changed files with 2386 additions and 564 deletions

View file

@ -1,17 +1,27 @@
#!/bin/bash
# Simple helper script to compile Sui code and link with libsuicmez
DEBUG_FLAG=""
if [ "$1" = "--debug" ]; then
DEBUG_FLAG="--debug"
shift
fi
if [ $# -eq 0 ]; then
echo "Usage: ./compile.sh <sui_source.sui> [output_name]"
echo "Usage: ./compile.sh [--debug] <sui_source.sui> [output_name]"
echo ""
echo "Example:"
echo "Options:"
echo " --debug Generate debug printf statements in the C output"
echo ""
echo "Examples:"
echo " ./compile.sh tests/structs.sui"
echo " ./compile.sh --debug tests/structs.sui"
echo " ./compile.sh tests/structs.sui my_program"
exit 1
fi
INPUT_SUI="$1"
OUTPUT_NAME="${2:-${INPUT_NAME%.sui}}"
OUTPUT_NAME="${2:-${INPUT_SUI%.sui}}"
if [ ! -f "$INPUT_SUI" ]; then
echo "Error: File not found: $INPUT_SUI"
@ -20,7 +30,11 @@ fi
# Compile Sui to C
echo "Compiling $INPUT_SUI to C..."
cargo run "$INPUT_SUI" || exit 1
if [ -n "$DEBUG_FLAG" ]; then
cargo run -- "$DEBUG_FLAG" "$INPUT_SUI" || exit 1
else
cargo run -- "$INPUT_SUI" || exit 1
fi
# Get the C file name (should be next to the .sui file)
C_FILE="${INPUT_SUI%.sui}.c"
@ -45,7 +59,7 @@ ODE_LIBS=$(pkg-config --libs ode 2>/dev/null || echo "-lode -lm")
# Compile C to executable with raylib and ODE support
echo "Compiling C code and linking with libsuicmez, raylib, and ODE..."
gcc "$C_FILE" libsuicmez/libsuicmez.c $RAYLIB_CFLAGS $RAYLIB_LIBS $ODE_CFLAGS $ODE_LIBS -o "$OUTPUT_BINARY" || exit 1
gcc "$C_FILE" libsuicmez/libsuicmez.c libsuicmez/suicmez_gc.c $RAYLIB_CFLAGS $RAYLIB_LIBS $ODE_CFLAGS $ODE_LIBS -lm -o "$OUTPUT_BINARY" || exit 1
echo "✓ Successfully created: $OUTPUT_BINARY"
echo " Run with: ./$OUTPUT_BINARY"