Author Topic: Optimized Pt-Mask routine  (Read 271 times)

0 Members and 1 Guest are viewing this topic.

Offline squidgetx

  • Food.
  • Coder Of Tomorrow
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1854
  • Rating: +502/-17
  • rawr.
    • View Profile
Optimized Pt-Mask routine
« on: May 21, 2011, 01:04:22 pm »
Hi,

I was wondering if anyone could help me to create a 16x16 routine that does the same thing as the following code, taking arguments to x, y, and pointer-to-64-byte-masked-sprite:
Code: [Select]
Lbl D
Pt-Mask(r1,r2,r3
Pt-Mask(r1+8,r2,r3+16
Pt-Mask(r1,r2+8->r2,r3+32
Pt-Mask(r1+8,r2,r3+48
except that it can be optimized to monochrome-only (I don't need the routine to be writing to the backbuffer)

If it can be done as an asm() routine, I would appreciate it greatly ^.^ Thanks in advance
« Last Edit: May 21, 2011, 01:04:40 pm by squidgetx »
Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS

Offline squidgetx

  • Food.
  • Coder Of Tomorrow
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1854
  • Rating: +502/-17
  • rawr.
    • View Profile
Re: Optimized Pt-Mask routine
« Reply #1 on: May 24, 2011, 12:50:36 pm »
anyone? otherwise i might have to drop my isometric contest entry due to speed issues...
Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS

SirCmpwn

  • Guest
Re: Optimized Pt-Mask routine
« Reply #2 on: May 24, 2011, 01:04:01 pm »
I would like to see this kind of routine as well.

Offline Builderboy

  • Physics Guru
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5655
  • Rating: +612/-9
  • Would you kindly?
    • View Profile
Re: Optimized Pt-Mask routine
« Reply #3 on: May 24, 2011, 02:28:36 pm »
There is a way to do it with 2 regular sprite routines, but from the command speed index it looks like it would be just about the same speed :/