Recent

Author Topic: [SOLVED-WORKAROUND] SpriteAnimation Ctrl - Animate sheet w/multiple Rows  (Read 2494 times)

Roland57

  • Jr. Member
  • **
  • Posts: 51
Re: SpriteAnimation Ctrl - Animate sheet w/multiple Rows
« Reply #15 on: April 03, 2020, 07:22:31 pm »
Here is the correction:

Code: Pascal  [Select][+][-]
  1.     //y := (i div ARowCount) * LElementHeight;
  2.     y := (i div AColCount) * LElementHeight;

pixelink

  • Hero Member
  • *****
  • Posts: 1233
    • Pixelink Software
Re: SpriteAnimation Ctrl - Animate sheet w/multiple Rows
« Reply #16 on: April 03, 2020, 07:32:46 pm »
I have it narrowed down to this line...
Everything else is outputting correctly.

BGRAReplace(LElement, LOldFile.GetPart(Rect(x, y, x + LElementWidth, y + LElementHeight)));

For my 123456789101112 sample.
x.y outputs 0,200,400,600

So those go through the grid correctly

UPDATE: This line wasn't the problem.
See the solution below
« Last Edit: April 03, 2020, 08:04:23 pm by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!

Pixelink Media
LAZ 2.08 •  VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060

pixelink

  • Hero Member
  • *****
  • Posts: 1233
    • Pixelink Software
Re: SpriteAnimation Ctrl - Animate sheet w/multiple Rows
« Reply #17 on: April 03, 2020, 07:37:42 pm »
Here is the correction:

Code: Pascal  [Select][+][-]
  1.     //y := (i div ARowCount) * LElementHeight;
  2.     y := (i div AColCount) * LElementHeight;

I guess I got that wrong...

Your code worked.
y := (i div AColCount) * LElementHeight;

Thanks for helping me on this Roland!!!
Great Job
Can't Type - Forgetful - Had Stroke = Forgive this old man!

Pixelink Media
LAZ 2.08 •  VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060

Roland57

  • Jr. Member
  • **
  • Posts: 51
Re: SpriteAnimation Ctrl - Animate sheet w/multiple Rows
« Reply #18 on: April 03, 2020, 08:21:27 pm »
Thanks for helping me on this Roland!!!
Great Job

You're welcome. I have cleaned my project. Here it is.

circular

  • Hero Member
  • *****
  • Posts: 3331
    • Personal webpage
Perfect now 8-)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018