Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Commit

Permalink
-- (Assets) CompileStatic version of WizRobo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Torbuntu committed Aug 26, 2019
1 parent 3891f10 commit 985035a
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 240 deletions.
2 changes: 1 addition & 1 deletion assets/Data/system.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ btn_start=6
launch_title=_
axis_horizontal=0

terminal_mode=false
terminal_mode=true
24 changes: 12 additions & 12 deletions assets/Programs/Shapes/Code/Shapes.groovy
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import java.io.File //for bad guy code test
import com.badlogic.gdx.controllers.*;

import groovy.transform.CompileStatic
@CompileStatic
class Shapes extends leikr.Engine {

int x, y, x2, y2, r, t, amt, rx, ry, i, j, cx, cy, cvx, cvy

int r, t, amt, rx, ry, i, j, cx, cy, cvx, cvy
float x, y, x2, y2
void create(){
amt = 50
//println new File("/").list() //bad guy code test
Expand Down Expand Up @@ -40,19 +41,18 @@ class Shapes extends leikr.Engine {
}

for(i = 0; i < amt; i++){
x = cos(i / 10 + t/40)*80
y = sin(i / 10 + t/40)*40
x = (float)cos((float)(i / 10 + t/40))*80
y = (float)sin((float)(i / 10 + t/40))*40

x2 = 40 + cos(x / 10 + t/40)*80
y2 = 40 + sin(y / 10 + t/40)*40
x2 = 40 + (float)cos((float)(x / 10 + t/40))*80
y2 = 40 + (float)sin((float)(y / 10 + t/40))*40

pixel((i%32)+1, -x2+rx+5, -y2+ry+5)//top left
pixel((i%32)+1, -x2+rx+5, y2+ry-5)//bottom left
pixel((i%32)+1, (int) (-x2+rx+5), (int) (-y2+ry+5))//top left
pixel((i%32)+1, (int)(-x2+rx+5), (int) (y2+ry-5))//bottom left

pixel((i%32)+1, x2+rx-5, -y2+ry+5)//top right
pixel((i%32)+1, x2+rx-5, y2+ry-5)//bottom rigt
pixel((i%32)+1, (int) (x2+rx-5),(int)( -y2+ry+5))//top right
pixel((i%32)+1, (int) (x2+rx-5), (int)(y2+ry-5))//bottom rigt
}
//FPS(0)
}

}
24 changes: 13 additions & 11 deletions assets/Programs/WizRobo/Code/Bolt.groovy
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import groovy.transform.CompileStatic
@CompileStatic
class Bolt{
def x = 0
def y = 0
def vx = 0
def width = 8
def height = 8
def spid = 0
def spids = [5, 6, 7, 8]
def charge = 0
def attack = false
def hit = false
def f = false
float x = 0
float y = 0
float vx = 0
float width = 8
float height = 8
int spid = 0
int[] spids = [5, 6, 7, 8]
int charge = 0
boolean attack = false
boolean hit = false
boolean f = false
}
44 changes: 24 additions & 20 deletions assets/Programs/WizRobo/Code/Enemy.groovy
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
import groovy.transform.CompileStatic
@CompileStatic
class Enemy{
def x = 72
def y = 72
def width =8
def height =8
def f =false
def spid = 10
def alive = true
def remove = false
def animTime = 0
def walkAnim = [10, 11, 12, 13]
def waIndex = 0
def keyA = [x: 1, y: 1]
def keyB = [x: 1, y: 1]
def vs
def l
def r
def health
float x = 72
float y = 72
float width =8
float height =8
boolean f =false
int spid = 10
boolean alive = true
boolean remove = false
int animTime = 0
int[] walkAnim = [10, 11, 12, 13]
int waIndex = 0
Map keyA = [x: 1, y: 1]
Map keyB = [x: 1, y: 1]
float vs
int l
int r
int health

def Enemy(){

}

def Enemy(x, y, vs, l, r, keyA, keyB){
def Enemy(float x, float y, float vs, int l, int r, Map keyA, Map keyB){
this.x = x
this.y = y
this.vs = vs
Expand All @@ -41,7 +43,8 @@ class Enemy{
waIndex = 0
}

def Enemy(x, y, vs, l, r, width, height, f, spid, alive, remove, animTime, walkAnim, waIndex, keyA, keyB){
def Enemy(float x, float y, float vs, int l, int r, float width, float height, boolean f,
int spid, boolean alive, boolean remove, int animTime, int[] walkAnim, int waIndex, Map keyA, Map keyB){
this.x = x
this.y = y
this.vs = vs
Expand All @@ -60,7 +63,8 @@ class Enemy{
this.keyB = keyB
}

def Enemy(x, y, vs, l, r, width, height, f, spid, alive, remove, animTime, walkAnim, waIndex, keyA, keyB, health){
def Enemy(float x, float y, float vs, int l, int r, float width, float height, boolean f,
int spid, boolean alive, boolean remove, int animTime, int[] walkAnim, int waIndex, Map keyA, Map keyB, int health){
this.x = x
this.y = y
this.vs = vs
Expand Down
Loading

0 comments on commit 985035a

Please sign in to comment.