removed pointless pointers in rect
This commit is contained in:
parent
1435ae14b0
commit
22faf6a02b
2 changed files with 8 additions and 8 deletions
|
|
@ -37,7 +37,7 @@ typedef struct ARC_FRect {
|
|||
* @param rect ARC_Rect to be centered
|
||||
* @param bounds ARC_Rect area to center rect on
|
||||
*/
|
||||
void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect *bounds);
|
||||
void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect bounds);
|
||||
|
||||
/**
|
||||
* @brief centers rect on given bounds
|
||||
|
|
@ -45,7 +45,7 @@ void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect *bounds);
|
|||
* @param rect ARC_FRect to be centered
|
||||
* @param bounds ARC_FRect area to center rect on
|
||||
*/
|
||||
void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect *bounds);
|
||||
void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect bounds);
|
||||
|
||||
/**
|
||||
* @brief casts Rect to FRect
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
//VERY TEMP
|
||||
// #include <SDL.h>
|
||||
|
||||
void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect *bounds){
|
||||
rect->x = (bounds->x + (bounds->w / 2)) - (rect->w / 2);
|
||||
rect->y = (bounds->y + (bounds->h / 2)) - (rect->h / 2);
|
||||
void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect bounds){
|
||||
rect->x = (bounds.x + (bounds.w / 2)) - (rect->w / 2);
|
||||
rect->y = (bounds.y + (bounds.h / 2)) - (rect->h / 2);
|
||||
}
|
||||
|
||||
void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect *bounds){
|
||||
rect->x = (bounds->x + (bounds->w / 2.0f)) - (rect->w / 2.0f);
|
||||
rect->y = (bounds->y + (bounds->h / 2.0f)) - (rect->h / 2.0f);
|
||||
void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect bounds){
|
||||
rect->x = (bounds.x + (bounds.w / 2.0f)) - (rect->w / 2.0f);
|
||||
rect->y = (bounds.y + (bounds.h / 2.0f)) - (rect->h / 2.0f);
|
||||
}
|
||||
|
||||
ARC_FRect ARC_Rect_CastToFRect(ARC_Rect rect){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue