summaryrefslogtreecommitdiff
path: root/comp/lucas-standen-NEA/code2/examples
diff options
context:
space:
mode:
Diffstat (limited to 'comp/lucas-standen-NEA/code2/examples')
-rw-r--r--comp/lucas-standen-NEA/code2/examples/Makefile5
-rwxr-xr-xcomp/lucas-standen-NEA/code2/examples/fib_examplebin0 -> 25496 bytes
-rwxr-xr-xcomp/lucas-standen-NEA/code2/examples/helloworld/mainbin0 -> 24720 bytes
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy3
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh2
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c4
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy3
-rwxr-xr-xcomp/lucas-standen-NEA/code2/examples/helloworldadv/mainbin0 -> 19440 bytes
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c4
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy3
-rw-r--r--comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh4
-rw-r--r--comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png (renamed from comp/lucas-standen-NEA/code2/examples/dvd.png)bin1247 -> 1247 bytes
-rwxr-xr-xcomp/lucas-standen-NEA/code2/examples/raylib_example/mainbin0 -> 1077360 bytes
-rw-r--r--comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy (renamed from comp/lucas-standen-NEA/code2/examples/raylib_example.zpy)1
-rw-r--r--comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh4
-rwxr-xr-xcomp/lucas-standen-NEA/code2/examples/spaceinvadersbin0 -> 1086520 bytes
-rw-r--r--comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy2
-rwxr-xr-xcomp/lucas-standen-NEA/code2/examples/str_examplebin0 -> 25952 bytes
-rw-r--r--comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy4
-rw-r--r--comp/lucas-standen-NEA/code2/examples/tmp.zpy.c2
20 files changed, 37 insertions, 4 deletions
diff --git a/comp/lucas-standen-NEA/code2/examples/Makefile b/comp/lucas-standen-NEA/code2/examples/Makefile
index 18a9e64..d3ee327 100644
--- a/comp/lucas-standen-NEA/code2/examples/Makefile
+++ b/comp/lucas-standen-NEA/code2/examples/Makefile
@@ -1,9 +1,8 @@
all:
- zpy raylib_example.zpy -o raylib_example -f -lraylib -f -lm -i raylib.h
zpy spaceinvaders.zpy -o spaceinvaders -f -lraylib -f -lm -i raylib.h
zpy fib_example.zpy -o fib_example -f -ggdb
zpy str_example.zpy -o str_example -f -ggdb
- zpy syntaxerr.zpy -o syntaxerr
+ zpy syntaxerr.zpy -o syntaxerr
clean:
- rm -rf fib_example raylib_example str_example spaceinvaders tmp.zpy.c
+ rm -rf fib_example raylib_example str_example spaceinvaders syntaxerr tmp.zpy.c
diff --git a/comp/lucas-standen-NEA/code2/examples/fib_example b/comp/lucas-standen-NEA/code2/examples/fib_example
new file mode 100755
index 0000000..bdd94ec
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/fib_example
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworld/main b/comp/lucas-standen-NEA/code2/examples/helloworld/main
new file mode 100755
index 0000000..653d84c
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworld/main
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy b/comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy
new file mode 100644
index 0000000..ef0a288
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworld/main.zpy
@@ -0,0 +1,3 @@
+(defun main int)
+ (printstr "hello world\n")
+(endfun)
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh b/comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh
new file mode 100644
index 0000000..7f675c3
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworld/zpybuild.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+zpy ./main.zpy -o main
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c
new file mode 100644
index 0000000..f1e746f
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.c
@@ -0,0 +1,4 @@
+#include <zpylib.h>
+void helloworld(){
+printstr("hello world\n");
+}
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy
new file mode 100644
index 0000000..9e3553b
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/helloworld.zpy
@@ -0,0 +1,3 @@
+(defun helloworld void)
+ (printstr "hello world\n")
+(endfun)
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/main b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main
new file mode 100755
index 0000000..593fe40
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c
new file mode 100644
index 0000000..a2b6927
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.c
@@ -0,0 +1,4 @@
+#include <zpylib.h>
+int main(){
+helloworld();
+}
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy
new file mode 100644
index 0000000..05b6155
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/main.zpy
@@ -0,0 +1,3 @@
+(defun main int)
+ (helloworld)
+(endfun)
diff --git a/comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh b/comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh
new file mode 100644
index 0000000..26424d7
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/helloworldadv/zpybuild.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+zpy ./main.zpy -c -o main.c
+zpy ./helloworld.zpy -c -o helloworld.c
+cc main.c helloworld.c /usr/local/share/zpylib/zpylib.o -o main -I/usr/local/share/zpylib/include -Wno-implicit-function-declaration
diff --git a/comp/lucas-standen-NEA/code2/examples/dvd.png b/comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png
index 8e219f7..8e219f7 100644
--- a/comp/lucas-standen-NEA/code2/examples/dvd.png
+++ b/comp/lucas-standen-NEA/code2/examples/raylib_example/dvd.png
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example/main b/comp/lucas-standen-NEA/code2/examples/raylib_example/main
new file mode 100755
index 0000000..b124ebf
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/raylib_example/main
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example.zpy b/comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy
index 7c6e599..cd6a382 100644
--- a/comp/lucas-standen-NEA/code2/examples/raylib_example.zpy
+++ b/comp/lucas-standen-NEA/code2/examples/raylib_example/main.zpy
@@ -1,3 +1,4 @@
+//# this function is my main loop
(defun main int)
(InitWindow 800 800 "test test")
(SetTargetFPS 60)
diff --git a/comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh b/comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh
new file mode 100644
index 0000000..3916f3b
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/raylib_example/zpybuild.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+zpy ./main.zpy -c -o main.c -i raylib.h
+cc main.c /usr/local/share/zpylib/zpylib.o -o main -I/usr/local/share/zpylib/include -Wno-implicit-function-declaration -lraylib -lm
+rm -rf main.c
diff --git a/comp/lucas-standen-NEA/code2/examples/spaceinvaders b/comp/lucas-standen-NEA/code2/examples/spaceinvaders
new file mode 100755
index 0000000..ec88002
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/spaceinvaders
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy b/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy
index 698999a..5e51ed3 100644
--- a/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy
+++ b/comp/lucas-standen-NEA/code2/examples/spaceinvaders.zpy
@@ -8,6 +8,7 @@
(def exists:bool)
(endstruct)
+//# this checks if 2 entitys are touching
(defun touching bool a:entity* b:entity*)
(def r1:Rectangle)
(def r2:Rectangle)
@@ -24,6 +25,7 @@
(return (CheckCollisionRecs r1 r2))
(endfun)
+//# the main loop of the program
(defun main int)
(InitWindow 800 800 "test test")
(SetTargetFPS 60)
diff --git a/comp/lucas-standen-NEA/code2/examples/str_example b/comp/lucas-standen-NEA/code2/examples/str_example
new file mode 100755
index 0000000..c543ab7
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/str_example
Binary files differ
diff --git a/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy b/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy
index c74d53b..87494ed 100644
--- a/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy
+++ b/comp/lucas-standen-NEA/code2/examples/syntaxerr.zpy
@@ -1,3 +1,5 @@
(defun main int)
- (return)
+ (let x:int)
+ (set x 10)
+ (return 10)
(endfun)
diff --git a/comp/lucas-standen-NEA/code2/examples/tmp.zpy.c b/comp/lucas-standen-NEA/code2/examples/tmp.zpy.c
new file mode 100644
index 0000000..2305f24
--- /dev/null
+++ b/comp/lucas-standen-NEA/code2/examples/tmp.zpy.c
@@ -0,0 +1,2 @@
+#include <zpylib.h>
+int main(){