|
Help - Error - Assertion failed: rx >= 0... |
ryan lee
Member #15,143
May 2013
|
Can anyone help me with what this might mean.. the program works fine until I add a some code c++ using Allegro 5 I a debug error: Debug error R6010 - Abort() has been called Assertion failed: rx >= 0, file allegro-git\addons\primitives\high_primitives.c, line 944 this is the code that I'm inserting that seems to cause the problem. To save me inserting my full main file I have just snipped this code, obviously when i'm using it I'm putting the code in all the right places. Complete newbie here and any help would be massively appreciated! Thanks [code] FASTCAR fastcarr; InitFASTCAR(fastcarr); StartFASTCAR(fastcarr); DrawFASTCAR(fastcarr); void InitFASTCAR(FASTCAR &fastcarr) al_draw_filled_rounded_rectangle(fastcarr.x, fastcarr.y, fastcarr.x +70, fastcarr.y +50, fastcarr.x - 4,fastcarr.y - 4,al_map_rgb(50,50,50)); void UpdateFASTCAR(FASTCAR &fastcarr) if(fastcarr.live) if(fastcarr.x < 0) } |
Jeff Bernard
Member #6,698
December 2005
|
al_draw_filled_rounded_rectangle parameter rx and ry must be greater than zero. // Are you sure you want variable radii here? al_draw_filled_rounded_rectangle(fastcarr.x, fastcarr.y, fastcarr.x +70, fastcarr.y +50, fastcarr.x - 4,fastcarr.y - 4,al_map_rgb(255,0,0));
-- |
ryan lee
Member #15,143
May 2013
|
Aha! Your a legend thank you so much! I've just changed it to a normal rectangle as I can't really figure out the rounded thing for now! Thanks again! |
Jeff Bernard
Member #6,698
December 2005
|
Imagine a rounded rectangle was a normal rectangle, but with 4 ovals instead of the corners. The parameters rx and ry are the horizontal and vertical radii of the ovals. So increasing those parameters would put larger ovals on the corners, so the corners would be more round. -- |
ryan lee
Member #15,143
May 2013
|
Ah I see, so I wouldn't need to use my 'object's' x and y position variables, just a single number? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Imagine an ellipse with the specified radii, and then cut it in four and put it on the corners of the rectangle. hradius and vradius must be less than half the width and height respectively. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|