Hey all
To give you a bit of background, I’m a 21 year old college student on my second year.
This is my first semester doing C++, and my only other “coding” experience is Action Script 3.0.
I’m doing a group project with a touch table - sort of like Microsoft Surface.
We are using oF version 0061 FAT.
I’m trying to solve a problem that could be done with a hell of a lot of code repetition, but I refuse to resolve to the slavery solution
I hope the attached image can explain my problem but here it is:
I want to load/draw 7 (eventually more) different images, and there needs to be drawn a specific number of copies of each image, placed in order.
That alone poses a problem to me as I don’t know exactly how to do this
I think that could be done like such:
for(int i = 0; i < 5; i++) {
Projector.imageA.draw(500 + i * 10 ,500);
}
The real problem is that I need to be able to move each image around individually!
I see no other solution than somehow dynamically name each loaded image, in ways I don’t think is possible.
I am working on a multidimensional integer array that will hold the type of image as a number 1-7 and x and y positions.
int array[3][total_number_of_images]
“All” there is left to do is to read the array one integer at a time, create/load/draw an image there from and assign coordinates. My idea is that later on the coordinates for these images can be manipulated, i.e. moved around on screen. Using the same array.