English Amiga Board


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

 
 
Thread Tools
Old 22 April 2017, 11:31   #1
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
How do you get the Handle of an existing Shape?

Say if I've already set the HandleX or HandleY of a shape, how do I later find out what it is?
earok is offline  
AdSense AdSense  
Old 22 April 2017, 12:00   #2
earok
Moderator

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,529
Never mind, I worked it out. Code below is for "nudging" the handle of an existing shape by a specific amount. Shape info from http://www.amigacoding.com/index.php...ct_types#shape

Code:
NEWTYPE .shape       ;size=32

  _pixwidth.w         ;00: pixel width of shape null=noshape
  _pixheight.w        ;02: pixel height of shape
  _depth.w            ;04: depth, in bitplanes, of shape
  _ebwidth.w          ;06: even byte width of shape
  _bltsize.w          ;08: BLTSIZE of shape
  _xhandle.w          ;10: horizontal handle of shape
  _yhandle.w          ;12: vertical handle of shape
  _data.l             ;14: pointer to graphic data - Plane1, Plane2...
  _cookie.l           ;18: pointer to one bitplane cookiecut
  _onebpmem.w         ;22: memory taken by one bitplane of shape
  _onebpmemx.w        ;24: memory taken by one bitplane of shape,
                      ;    plus an extra word per bitplane per
                      ;    vertical pixel
  _allbpmem.w         ;26: memory taken by entire shape.
  _allbpmemx.w        ;28: memory taken by entire shape, plus an
                      ;    extra word per bitplane per vertical
                      ;    pixel
  _pad.b[2]           ;30:
  
End NEWTYPE

Statement NudgeHandle{id,x,y}
	*s.shape=Addr Shape(id)
	Handle id,*s\_xhandle + x,*s\_yhandle + y
End Statement

Last edited by earok; 22 April 2017 at 12:36.
earok is offline  
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
Obscure PD Shape Fitting Game manic23 Looking for a game name ? 17 03 May 2014 01:52
Would the Amiga be able to handle Angry Birds? Steve Retrogaming General Discussion 81 19 April 2013 21:48
Collective order: X500 Plus next gen case inspired to Amiga 500's shape Omolungo News 10 16 February 2013 00:59
Amiga Game Tools-Shape Grabber Joe Maroni request.Apps 0 22 October 2008 21:54
wtb: amiga 3000 desktop in great shape james 23703 MarketPlace 0 25 January 2006 03:26

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 01:10.


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