for (curY=0; curY < ySize; curY++) {
destPtr = rowStart;
for (curX=0; curX < xSize; curX++) {
//curPhaseX = curX + offsets[0] + offsets[1];
curPhaseX = curX + offsets[flowPos[0]] + offsets[flowPos[1]];
while (curPhaseX > 360) curPhaseX -= 360;
curPhaseY = curY + offsets[flowPos[2]] + offsets[flowPos[3]];
while (curPhaseY > 360) curPhaseY -= 360;
result = sin_table[curPhaseX] + sin_table[curPhaseY];
curPhaseX = curX + offsets[flowPos[4]] + offsets[flowPos[5]];
while (curPhaseX > 360) curPhaseX -= 360;
curPhaseY = curY + offsets[flowPos[6]] + offsets[flowPos[7]];
while (curPhaseY > 360) curPhaseY -= 360;
result += sin_table[curPhaseX] + sin_table[curPhaseY];
result <<= 8;
*destPtr++ = palette[fxtoi(result) & 0xff];
}
rowStart += 160;
}
At 08:12 PM 11/15/2002 +0100, you wrote:
> I have run numerous plasmas on my m505, one from Aaron Ardiri, and some
> others from his mobilewizardry site. I need to write my own plasma for a
> paint program I am working on. So far I came up with the following, which
> runs okay on the emulator or simulator, but is really slow on my m505.
> cos_fx and Addfx are macros. What is making this loop run so slowly? And
is
> there some other way to write a sin/cos based plasma that is better?
cos_fx brings in a lookup table right?
---
Aaron Ardiri [EMAIL PROTECTED]
CEO - CTO +46 70 656 1143
Mobile Wizardry http://www.mobilewizardry.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
