Hi,
I was trying to use al_draw_scaled_bitmap() but whenever this function is called more than 1 time every sub sequential calls after the first seems to just be ignore and nothing is drawn. In both the manual and the man page there is noting saying this is how it's intended to work. al_draw_bitmap() Seems to work just fine.
I've added a sample of code to show the issue.
Any idea on how to resolve the issue?
Are you sure you are using al_draw_scaled_bitmap correctly?
Isn't it like this?
al_draw_scaled_bitmap(King, 0, 0, al_get_bitmap_width(King), al_get_bitmap_height(King), x_position, y_position, scaled_width, scaled_height, 0);
@torhu
Should be correct in theory, I should have renamed the variable to fit their use better.
al_draw_scaled_bitmap (
King is the ALLEGRO_BITMAP
j * NewOffSet is the X Coordinate of the Top Left Corner of the Source
i * NewOffSet is the Y Coordinate of the Top Left Corner of the Source
Offset is the bitmap Width
OffSet is the bitmap Height
j * NewOffSet is the X Coordinate of the Top Left Corner of the Destination
i * NewOffSet is the Y Coordinate of the Top Left Corner of the Destination
NewOffSet is the Width of the Destination
NewOffSet is the Height of the Destination
0 are the applied flags) ;
Basically was I was trying to do was to draw the pieces of chess on the chessboard but only the first piece is being drawn. Just to clarify this variables name are what I was using in the full program this is just a piece of code throw together to test out al_draw_scaled_bitmap().
I think I'm probably misunderstanding something on how the parameters off the function works.
Update : After some more trying I understood how the parameters works. Resolved.