Hecl Builder

Easy Mobile Applications

2d
Download: .jad .jar
no rating Average rating:

MIDP Version: 2.0
Description: Test
Last updated: Sat Aug 14 06:33:01 +0000 2010 by Zsandy

#-- start
set canvas [lcdui.canvas - title "Wapmani-Info"- autoflush 1-fullscreen 1];
set p 0
set x 0
set y 0
set px 0
set py 0
set rot 0
set p_rot 0
set Xmax [$canvas cget - width]
set Ymax [$canvas cget - height]
#-- define the logo lable Wapmani
set logo [list]
#-- H
set sx [list[list 35 10][list 35-10][list 35 0][list 20 0][list 20 10][list 20-10]]
set rx [list[list 35 10][list 35-10][list 35 0][list 20 0][list 20 10][list 20-10]]
set index [llen $sx]
lappend $logo [list $sx $rx $index]
#-- E
set sx [list[list 5 10][list 15 10][list 15 0][list 5 0][list 15 0][list 15-10][list 5-10]]
set rx [list[list 5 10][list 15 10][list 15 0][list 5 0][list 15 0][list 15-10][list 5-10]]
set index [llen $sx]
lappend $logo [list $sx $rx $index]
#-- C
set sx [list[list -15 10]
[list -5 10][list -5 -10]
[list -15 -10]]
set rx [list[list -15 10]
[list -5 10][list -5 -10]
[list -15 -10]
set index [llen $sx]
lappend $logo [list $sx $rx $index]
#-- L
set sx [list [list -25 -10]
[list -25 10][list -35 10]]
set rx [list [list -25 -10]
[list index [llen $sx]
lappend $logo [list $sx $rx $index]
proc rotate_dot {tr winkel sx rx}{
    global x y
    set r0 0
    set r1 0
    set beta [toRadians $winkel]
    set r0 [-[ $x [*[-[lindex [lindex $sx $tr] 0] $x][cos $beta]]][*[- [lindex [lindex $sx $tr] 1] $y][sin $beta] ]]
    set r1 [+[-$y [*[-[lindex [lindex $sx $tr] 1] $y][cos $beta]]][*[- [lindex [lindex $sx $tr] 0] $x][sin $beta] ]]
    lset $rx $tr [lset
[lindex $rx $tr] 0 $r0]
    lset $rx $tr [lset
[lindex $rx $tr] 1 $r1]
}$canvas setcurrent
set g [$canvas graphics]
while {true}{
 set starttime [clock seconds]
$g color blue
$g frest[list 0 0][list $Xmax $Ymax]
$g color white
$g line[list[/$Xmax 2]
[/$Ymax 2]][list[/$Xmax 2][/$Ymax 2]]set rot[%[+$rot[+$p_rot 360]]360]
set winkel[%[-360$rot]360]
set beta[toRadians $winkel]
set r0[-[*[*2[-0$px]][cos $beta]][*[*2[-0$py]][sin $beta]]]
set r1[+[*[*2[-0$px]][sin $beta]][*[*2[-0$px]][sin $beta]]]
set x[+$X $r0]
set y[+$y $r1]
foreach e $logo{
set sx[lindex $e 0]
set rx[lindex $e 1]
set index[lindex $e 2]
for{set p 0}{<$p $index}{set p[+$p 1]}{rotate_dot 4p 4rot $sx $rx}
for{set p 0}{<$p $index 1}{set p[+$p 1]}$g line[list[+[-[/$Xmax 2]$x][lindex[lindex $rx $p]0]][+[-[/$Ymax 2]$y][lindex[lindex $rx $p]1]]][list[+[-[/$Xmax 2]$x][lindex $rx[+$p 1]] 0]][+[-[/$Ymax 2]$y][lindex[lindex $rx[+[-[/$Ymax 2]$y][lindex]]
}}
$g string[list 5 5]"[-[clock seconds]$starttime]FPS"
#--set rotation factor
set p_rot-10
$canvas flush
}


Note: If you have trouble with the applets on this site, you might try upgrading your Jave Runtime Environment, in order to get the "Next-Generation Java Plug-In", available for download here: http://download.java.net/jdk6/