09-20-2020, 04:30 PM
Hi,
Usual way is to define the size, and then use the size to build the arrays and pass it as a parameter:
Cheers!
Usual way is to define the size, and then use the size to build the arrays and pass it as a parameter:
Code:
#define NUM_SECTIONS 6
float bg_offsets[NUM_SECTIONS];
float bg_speeds[NUM_SECTIONS];
/* call your function */
TLN_SetBackgroudScrolls(bg_offsets, bg_speeds, NUM_SECTIONS, 1.0f);
/* function definition specifying size as a parameter */
void TLN_SetBackgroudScrolls(float bg[], float bgspeed[], int num_sections, float factor)
{
...
}
Cheers!