English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 13 December 2011, 22:20   #1
bruZard
 
Posts: n/a
Monkey Amiga Target 0.25

0.25 is live
Monkey Amiga Target v0.25



Quote:
12/13/2011 v0.25
added : class Image
added : Image.Width
added : Image.Height
added : Image.Depth
added : Image.Load:Void(filename:String, remapColors:Bool = False)
added : Image.Free:Void()
added : LoadImage:Image(filename:String)
added : LoadImage:Image(filename:String, remapColors:Byte)
added : Window.DrawImage:Void(img:Image, x:Int, y:Int)
added : DrawImage:Void(win:Window, img:Image, x:Int, y:Int)
added : DrawImage:Void(img:Image, x:Int, y:Int) [Mojo Style]
added : FreeImage:Void(img:Image)
added : Window.SetScreen:Void(pubScreen:String = "workbench")
added : SetScreen:Void(win:Window, pubScreen:String = "workbench")
added : SetScreen:Void(pubScreen:String = "workbench") [Mojo Style]
added : SetUpdateRate:Void(hertz:Int) [only with Mojo Style]
added : Window.getWidth:Int()
added : Window.getHeight:Int()
added : WindowWidth:Int(win:Window)
added : WindowHeight:Int(win:Window)
added : DeviceWidth:Int() [Mojo Style]
added : DeviceHeight:Int() [Mojo Style]
changed : MilliSecs() now returns a 64 bit value
changed : CreateWindow() now has the optional parameter "borderless"
fixed : ClsColor() now affects the BPen
fixed : in Mojo-Style now the workbench will be locked
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
    Field img:Image
    Field bg:Image
    
    Method OnCreate()
        fnt = LoadFont("helvetica.font", 16)
        img = LoadImage("amiga.data/monkey.iff")
        bg = LoadImage("amiga.data/background.jpg")
        
        SetFont(fnt)
        AppTitle("draw with Monkey")
        
        SetColor(255, 255, 0)
        ClsColor(200, 90, 0)
        Cls()
                
        lastX = 0
        lastY = 0
        
        SetUpdateRate(60)
    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()
        DrawImage(bg, 0, 0)
        
        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, 10, 10)
        
        DrawImage(img, mx, my)
    End
End

Function Main()
    New myApp
End
this will not work on a real 68k Amiga (ok, it will work, but you need time and patience). Still use a AOS4/MOS machine or try it on aros or WinUAE.
 
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.24 bruZard News 0 11 December 2011 23:26
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 10:48.


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