Closed Cyberzoid1 closed 7 years ago
We need to decide if a diagonal translation (ex UP Left)
is handled in function
translate(d, D_UP_L)
or is two calls to the function
translateFrame(d, D_UP)
translateFrame(d, D_LEFT)
What I was thinking is that there would either be a 4 separate functions for up, down, left, and right, which then would be run in the function depending on the direction input into the function or have the function run twice depending on the direction input. I'm thinking the first option sounds a little bit better, but I'd like some input on it before I begin on them.
I am starting to lean on the single function call idea. The idea being "Function, do this for me" and the function does everything else.
I dont think 4 functions would be right. A lot of overlap. Though I could possibly see 2, one for up/down and a second fo right/left.
Ya, I'm thinking now maybe just a single function for the direction and just have the translation function call that function once or twice depending on the direction the frame needs to move or we can just have the translation function and for the diagonals I could just use a recursive call to do the second direction.
int translateFrame(t_FrameData d, int direction)