mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
Merge commit 'refs/pull/355/head' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
d10304ea4e
2 changed files with 14 additions and 0 deletions
|
@ -959,6 +959,19 @@ void DCanvas::DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32_t re
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(_Screen, DrawLine)
|
||||||
|
{
|
||||||
|
PARAM_PROLOGUE;
|
||||||
|
PARAM_INT(x0);
|
||||||
|
PARAM_INT(y0);
|
||||||
|
PARAM_INT(x1);
|
||||||
|
PARAM_INT(y1);
|
||||||
|
PARAM_INT(color);
|
||||||
|
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||||
|
screen->DrawLine(x0, y0, x1, y1, -1, color);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void DCanvas::DrawPixel(int x, int y, int palColor, uint32_t realcolor)
|
void DCanvas::DrawPixel(int x, int y, int palColor, uint32_t realcolor)
|
||||||
{
|
{
|
||||||
#ifndef NO_SWRENDER
|
#ifndef NO_SWRENDER
|
||||||
|
|
|
@ -168,6 +168,7 @@ struct Screen native
|
||||||
native static vararg void DrawTexture(TextureID tex, bool animate, double x, double y, ...);
|
native static vararg void DrawTexture(TextureID tex, bool animate, double x, double y, ...);
|
||||||
native static vararg void DrawChar(Font font, int normalcolor, double x, double y, int character, ...);
|
native static vararg void DrawChar(Font font, int normalcolor, double x, double y, int character, ...);
|
||||||
native static vararg void DrawText(Font font, int normalcolor, double x, double y, String text, ...);
|
native static vararg void DrawText(Font font, int normalcolor, double x, double y, String text, ...);
|
||||||
|
native static void DrawLine(int x0, int y0, int x1, int y1, Color color);
|
||||||
native static void DrawFrame(int x, int y, int w, int h);
|
native static void DrawFrame(int x, int y, int w, int h);
|
||||||
native static Vector2, Vector2 VirtualToRealCoords(Vector2 pos, Vector2 size, Vector2 vsize, bool vbottom=false, bool handleaspect=true);
|
native static Vector2, Vector2 VirtualToRealCoords(Vector2 pos, Vector2 size, Vector2 vsize, bool vbottom=false, bool handleaspect=true);
|
||||||
native static double GetAspectRatio();
|
native static double GetAspectRatio();
|
||||||
|
|
Loading…
Reference in a new issue