Jump to content
IGNORED

pfpixel placement


boski

Recommended Posts

So I'm trying to place a pixel directly center on my sprite, but unfortunately, even with my superb mathematics knowledge, the pixel is falling well below my sprite. Can someone take a quick look and let me know if I'm missing something? Thanks!

 

 

include div_mul.asm

player0x = 30 : player0y = 30

START

 

player0:

%00111100

%00100100

%11000011

%10000001

%10000001

%11000011

%00100100

%00111100

end

 

COLUP0=$0E

COLUPF=$0E

 

if joy0up then player0y = player0y-1

if joy0down then player0y = player0y+1

if joy0left then player0x = player0x-1

if joy0right then player0x = player0x+1

a = (player0x/5)

b = (player0y/4)

if joy0fire then c = c + 1

if !joy0fire then c = 0

if c = 1 then pfpixel a b flip

drawscreen

goto START

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji 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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...