Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Made a Function to scroll multiple sections of a background.
#3
(09-19-2020, 10:26 PM)megamarc Wrote: [*]"num_sections" can't be calculated as you do. In C, size of arrays passed as pointers must always be specified separately, because the C runtime doesn't hold this information. In your code, num_sections will always compute to 4 because &bg[1] - &bg[0] is 4 bytes.
[/list]
Keep going!

Oh I see. I noticed what you mean when I tried different values and it broke. I thought it was working when I tried it on the platformer demo, because pos_background[6] and num_section was printing out 6. How would I go about this so that it would work correctly?

Thank you!

Cheers!
Reply


Messages In This Thread
RE: Made a Function to scroll multiple sections of a background. - by RootBeerKing - 09-20-2020, 09:18 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)