Jump to content
Jagware
Sign in to follow this  
SamBushman

Question: How Do I Manipulate the Screen Coordinates Of An Object Processor Bitmap Object?

Recommended Posts

SamBushman    0

Hey guys,

I am currently working on understanding the graphics pipeline of the Jaguar. I have monkeyed with Belboz's sample program a bit, altered the Bitmap object's header, and am now blitting an image defined by an external assembly file to the screen (hurray!). Now I wish to use controller input to move it around the screen. I have written a simple function to poll for the 1st player's controller and can successfully get input. My first attempt at moving the bitmap was to save the address of the object's headers to global variables, reference them from C, and alter them as needed. When I do this, the screen goes almost completely black and restores itself once the input key is released. Based on this, I figure I am going about it all wrong.

 

My question therefore is "How do I manipulate the screen position of an image defined by a bitmap object in the Object Processor's List?"

 

Thanks as always for your input. Cheers,

Sam

Share this post


Link to post
Share on other sites
SamBushman    0

As an update, I realized I was saving the address of the high 32 bits instead of the low 32 bits (oops). After correcting that mistake I got horizontal movement working fine. For whatever reason, the YPOS seems to be locked (any changes are reverted by the hardware). I will keep reading the Jaguar docs and see if I can figure it out. If anyone here can enlighten me to what I'm missing, I'd appreciate it.

 

Cheers and thanks guys,

Sam

 

--Another quick update

Doh. I thought to take a look at the demo's level 0 interrupt and saw that when the bitmap object is created, a copy of the first phrase is saved to another part of memory for restoring (apparently the first phrase is destroyed by the object processor according to the comments). As such, I was in fact correctly changing the object header, but the interrupt was changing it back. I changed my C pointer to reference the stored copy of the header that was being restored. Now my coordinate manipulation is persistent. Sorry for the wasteful posts guys :P

 

 

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×