English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 25 December 2018, 15:01   #1
peceha
Registered User
 
peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
Blitz and mouse Y coordinate

Hi,
I have a display 320x256 (done with initcoplist and createdisplay) and it shows almost fine*.
But I cannot get the mouse Y coordinate bigger then 199. How to get the reading for remaining 56 lines? Looks like my invisible mouse pointer cannot pass 200 lines vertically.


*shows almost fine - here comes a bonus qestion
When I use CreateDisplay command (320x256 bitmap and screen) the picture is off by 1 pixel. The left most column (x=0) is displayed as most right column (x=319) - Blitz just wraps around the first column.
Is it normal behaviour?

Thanks.
peceha is online now  
Old 25 December 2018, 19:28   #2
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
I don't rememeber having this problem, but try using the MouseArea command

MouseArea 0,0,320,256

It should work.

For your bonus question.... I've seen this behaviour before, but I can't remember what it was causing it. But no, it shouldn't be normal I guess.
Shatterhand is offline  
Old 25 December 2018, 19:41   #3
Graham Humphrey
Moderator
 
Graham Humphrey's Avatar
 
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,167
Make sure you haven't got the smooth scrolling flag set in the InitCopList command. I've had that before - I only wanted to scroll vertically so to get around it I made the bitmap slightly wider horizontally which is a bit of a cheap workaround.
Graham Humphrey is offline  
Old 25 December 2018, 20:12   #4
peceha
Registered User
 
peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
Thanks to both of you.
MouseArea fixed the problem with the limitation on Y axis.
Getting rid of SmoothScroll flag fixed the display.
peceha is online now  
Old 23 March 2019, 22:34   #5
madaxe
Registered User
 
madaxe's Avatar
 
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
By the way, how to display the mouse cursor? Is it always needed to set a Sprite and use the Pointer command or can I just use the system mouse cursor?
madaxe is offline  
Old 24 March 2019, 14:33   #6
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
If you shut down the OS (i.e., use the BLITZ command) then the OS can't provide the pointer - you have to do it yourself. The OS uses hardware sprites for the mouse pointer, so it sort of makes sense because all the sprites are available to you in BLITZ mode.
Daedalus is offline  
Old 24 March 2019, 17:41   #7
madaxe
Registered User
 
madaxe's Avatar
 
Join Date: Jan 2019
Location: Coimbra / Portugal
Posts: 54
Thanks Daedalus, it really makes sense.
But I think that I'm doing something wrong because after defining my sprite and using the Pointer command I get this error: "No currently used object!"

So I improvised a little trick that is to use the mouse coordenates to move the Sprite.

Code:
 DisplaySprite 0,0,MouseX,MouseY,0

Last edited by madaxe; 25 March 2019 at 13:44.
madaxe is offline  
Old 25 March 2019, 09:48   #8
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
I'm pretty sure the Pointer command only applies to Slices, so you can't use it with the Display Library. So your solution is the way to do it
Daedalus 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
[blitz basic] How much amiga-blitz friendly is this? saimon69 Coders. Blitz Basic 105 21 April 2022 19:45
A2000 left mouse button use in workbench causes mouse to stop responding. gary_nz support.Hardware 5 17 September 2017 10:03
Mouse click problem with cintiq companion and virtual mouse driver donmikko support.WinUAE 9 19 February 2017 11:32
Amiga Mouse Original Tank Mouse Optical sensor Faulty Help please. Audronic support.Hardware 5 01 February 2017 09:42
MOUSE ADAPTER MADNESS! Less than half price PS/2 mouse adapters! Mounty MarketPlace 6 01 September 2015 21:47

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:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16584 seconds with 14 queries