English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 11 December 2011, 23:26   #1
bruZard
 
Posts: n/a
Monkey Amiga Target 0.24

0.24 is live



the Monkey code for this picture:
Code:
Import amigaos3

Class myApp extends App
    Field mx:Int
    Field my:int
    Field time:Int
    Field FPS:Int
    Field tmpFPS:Int
    Field tmpTime:int
    Field lastFPS:Int
    Field fnt:Font
    Field lastX:Int
    Field lastY:Int
    
    Method OnCreate()
        fnt = LoadFont("helvetica.font", 16)
        SetFont(fnt)
        AppTitle("draw with Monkey")
        SetColor(255, 255, 0)
        ClsColor(200, 90, 0)
        Cls()
        
        lastX = 0
        lastY = 0
    End
    
    Method OnUpdate()
        mx = MouseX()
        my = MouseY()
        tmpFPS = tmpFPS + 1
        tmpTime = MilliSecs()
        
        if tmpTime - time > 1000
            FPS        = tmpFPS
            tmpFPS    = 0
            time     = tmpTime
        EndIf
    End
    
    Method OnRender()
        if MouseDown() 
            DrawCircle(mx-1, my-1, 3)
            if lastX > 0 And lastY > 0 DrawLine(lastX, lastY, mx, my)
            lastX = mx
            lastY = my
        EndIf
        
        if tmpTime <> time DrawText("FPS: " + FPS + " Time: " + time, 10, 10)
    End
End

Function Main()
    New myApp
End
changes in 0.24
Quote:
12/11/2011 v0.24
added : Window.DrawLine:Void(x1:Int, y1:Int, x2:Int, y2:Int)
added : DrawLine:Void(win:Window, x1:Int, y1:Int, x2:Int, y2:Int)
added : DrawLine:Void(x1:Int, y1:Int, x2:Int, y2:Int) [Mojo Style]
added : Window.DrawEllipse:Void(x:Int, y:Int, width:Int, height:Int)
added : DrawEllipse:Void(win:Window, x:Int, y:Int, width:Int, height:Int)
added : DrawEllipse:Void(x:Int, y:Int, width:Int, height:Int) [Mojo Style]
added : Window.DrawOval:Void(x:Int, y:Int, width:Int, height:Int)
added : DrawOval:Void(win:Window, x:Int, y:Int, width:Int, height:Int)
added : DrawOval:Void(x:Int, y:Int, width:Int, height:Int) [Mojo Style]
added : Window.DrawCircle:Void(x:Int, y:Int, radius:Int)
added : DrawCircle:Void(win:Window, x:Int, y:Int, radius:Int)
added : DrawCircle:Void(x:Int, y:Int, radius:Int) [Mojo Style]
changed : at start Monkey stets BPen to pen number 0
the archive includes executables for AOS3.x, AROSi386 and ARO-PPC.

have fun!
 
AdSense AdSense  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
possible to create key configuration input target that writes a whole string ? j69ant support.WinUAE 7 02 February 2013 14:25
Alien Target Shoonay Games images which need to be WHDified 14 30 January 2012 17:58
Monkey Amiga Target 0.25 bruZard News 0 13 December 2011 22:20
Target system and code speed h0ffman Coders. General 7 25 June 2011 01:00

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:39.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.10334 seconds with 11 queries