English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 23 January 2021, 09:54   #1
WAKD
Registered User

 
Join Date: Dec 2020
Location: Grangemouth
Posts: 26
Working Out Pixels - Amos

I`m still on an early path to learning code so, I appreciate any help and patience. I`m trying to set up zones for four buttons. I`ve tried everything and I think the main problem I have is I cannot figure out where the pixels are when it comes to drawing boxes or setting zones.

What is the easiest way to plot out where the pixels are so that the zones will be reserved without given an error such as Illegal Function Call please?
WAKD is offline  
Old 23 January 2021, 11:55   #2
alain.treesong
Aghnar
 
Join Date: Jan 2019
Location: France
Posts: 84
By default a screen number 0 with 16 colors and 320x200 is open by Amos.
The upper left point is (0,0) and the lower right corner is (319,199)
If you want to draw pixel, you can use "plot" (point) or "bar" (filled rectangle).
For example :
bar 100,100 to 200,150 : rem a rectangle of 100 pix wide and 50 pixels height

By the way, the zone commands have some bugs and sometimes defined zone throws some exception.

Don't know if it answers to your question.

If I can suggest something, it is to read carefully the manual, in particular the chapters about the screens and the graphics commands.

Bye
alain.treesong is online now  
Old 23 January 2021, 12:47   #3
WAKD
Registered User

 
Join Date: Dec 2020
Location: Grangemouth
Posts: 26
Quote:
Originally Posted by alain.treesong View Post
By default a screen number 0 with 16 colors and 320x200 is open by Amos.
The upper left point is (0,0) and the lower right corner is (319,199)
If you want to draw pixel, you can use "plot" (point) or "bar" (filled rectangle).
For example :
bar 100,100 to 200,150 : rem a rectangle of 100 pix wide and 50 pixels height

By the way, the zone commands have some bugs and sometimes defined zone throws some exception.

Don't know if it answers to your question.

If I can suggest something, it is to read carefully the manual, in particular the chapters about the screens and the graphics commands.

Bye
So, is it good practice to use the bob editor to create buttons to reserve zones for them or not?
WAKD is offline  
Old 23 January 2021, 14:39   #4
alain.treesong
Aghnar
 
Join Date: Jan 2019
Location: France
Posts: 84
Hmm don't know exactly what you mean :-)
Zones are used with bobs generally as visibility (display) zones : you don't want what that the bobs appears in some places in the screen.
Otherwise Amos zones are more dedicated for bitmap (which are not handled by blitter usually) to add collide properties.
What do you want to do in fact ? :-)
alain.treesong is online now  
Old 23 January 2021, 14:58   #5
freakofnature
Registered User

 
Join Date: Jan 2021
Location: Darksideofthemoon
Posts: 9
Well, you should use Bobs if you need them. With zones you can check if a bob has entered that specific zone and react to this event.

In your special case i had to say "No, not really!"

Code:
Screen Open 0,320,240,32,Lowres
Flash Off : Curs Off
Load Iff Fsel$("*.iff")
Colour 29,$F0
Ink 29
Bar 160,12 To 200,134
Reserve Zone 4
Set Zone 1,160,120 To 200,134
Do
M=Mouse Zone
Exit If M=1
Loop
Colour 30,$F00
Pen 30
Locate 20,14
Print "You hit it!"
Attached Files
File Type: zip zonesabk.zip (62.6 KB, 9 views)

Last edited by freakofnature; 23 January 2021 at 15:05. Reason: Tried to attach an amos program and iff file but no luck. packed them in a zip archive now.
freakofnature is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Wip] Amos Professional X : Bring AGA to Amos Pro! freddix Coders. AMOS 40 15 September 2020 18:24
AMOS Files from Writing RPG's in AMOS supercruiser request.Other 0 21 April 2020 13:03
Simple Amos Prog Not Working HELP!!! volvo_0ne Coders. AMOS 7 19 November 2015 18:52
f/s Amiga Amos Programming books / Disks / Easy Amos & other Books *mega collection!* fitzsteve MarketPlace 4 23 May 2012 04:35
Where's the amos.library on the 3-disk AMOS set? andreas support.Apps 0 15 November 2001 16:04

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 19:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.08818 seconds with 16 queries