-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sh
45 lines (36 loc) · 867 Bytes
/
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
# Exit immediately if a command exits with a non-zero status
set -e
# NOTE: The decimal point could be either a dot or a comma
# Save it to remove it from float variables
dec_pt=$(locale decimal_point)
if ! source ctypes.sh; then
echo "ctypes.sh not found, please install it: https://github.com/taviso/ctypes.sh/"
exit 1
fi
viewport_width=1280
viewport_height=720
source raylib.sh
source utils.sh
source space_background.sh
source tux.sh
source window.sh
source title.sh
source game.sh
include_files
init_everything $viewport_width $viewport_height Tux-Vs-Mutant-Window
in_title=true
game_over=false
player_won=false
victories=0
defeats=0
while true; do
update_game
draw_game
dlcall -n should_close -r bool WindowShouldClose
if [[ $should_close == bool:1 ]]; then
break
fi
done
dlcall CloseAudioDevice
dlcall CloseWindow