diff --git a/renderer/HardwareBaseGPU.cpp b/renderer/HardwareBaseGPU.cpp index 41ffae1b..d617ff7a 100644 --- a/renderer/HardwareBaseGPU.cpp +++ b/renderer/HardwareBaseGPU.cpp @@ -123,6 +123,38 @@ void rend_SetCharacterParameters(ddgr_color color1, ddgr_color color2, ddgr_colo rend_FontAlpha[3] = (color4 >> 24) / 255.0f; } +void rend_FillCircle(ddgr_color col, int x, int y, int rad) {} + +void rend_DrawCircle(int x, int y, int rad) {} + +// Sets up a font character to draw. We draw our fonts as pieces of textures +void rend_DrawFontCharacter(int bm_handle, int x1, int y1, int x2, int y2, float u, float v, float w, float h) { + g3Point *ptr_pnts[4]; + g3Point pnts[4]; + for (int i = 0; i < 4; i++) { + pnts[i].p3_z = 1; // Make REALLY close! + pnts[i].p3_flags = PF_PROJECTED; + ptr_pnts[i] = &pnts[i]; + } + pnts[0].p3_sx = x1; + pnts[0].p3_sy = y1; + pnts[0].p3_u = u; + pnts[0].p3_v = v; + pnts[1].p3_sx = x2; + pnts[1].p3_sy = y1; + pnts[1].p3_u = u + w; + pnts[1].p3_v = v; + pnts[2].p3_sx = x2; + pnts[2].p3_sy = y2; + pnts[2].p3_u = u + w; + pnts[2].p3_v = v + h; + pnts[3].p3_sx = x1; + pnts[3].p3_sy = y2; + pnts[3].p3_u = u; + pnts[3].p3_v = v + h; + rend_DrawPolygon2D(bm_handle, ptr_pnts, 4); +} + // Sets the alpha value for constant alpha void rend_SetAlphaValue(ubyte val) { gpu_state.cur_alpha = val; diff --git a/renderer/HardwareOpenGL.cpp b/renderer/HardwareOpenGL.cpp index 24b39620..25d1f441 100644 --- a/renderer/HardwareOpenGL.cpp +++ b/renderer/HardwareOpenGL.cpp @@ -2482,38 +2482,6 @@ ddgr_color rend_GetPixel(int x, int y) { return color[0]; } -void rend_FillCircle(ddgr_color col, int x, int y, int rad) {} - -void rend_DrawCircle(int x, int y, int rad) {} - -// Sets up a font character to draw. We draw our fonts as pieces of textures -void rend_DrawFontCharacter(int bm_handle, int x1, int y1, int x2, int y2, float u, float v, float w, float h) { - g3Point *ptr_pnts[4]; - g3Point pnts[4]; - for (int i = 0; i < 4; i++) { - pnts[i].p3_z = 1; // Make REALLY close! - pnts[i].p3_flags = PF_PROJECTED; - ptr_pnts[i] = &pnts[i]; - } - pnts[0].p3_sx = x1; - pnts[0].p3_sy = y1; - pnts[0].p3_u = u; - pnts[0].p3_v = v; - pnts[1].p3_sx = x2; - pnts[1].p3_sy = y1; - pnts[1].p3_u = u + w; - pnts[1].p3_v = v; - pnts[2].p3_sx = x2; - pnts[2].p3_sy = y2; - pnts[2].p3_u = u + w; - pnts[2].p3_v = v + h; - pnts[3].p3_sx = x1; - pnts[3].p3_sy = y2; - pnts[3].p3_u = u; - pnts[3].p3_v = v + h; - rend_DrawPolygon2D(bm_handle, ptr_pnts, 4); -} - // Draws a line void rend_DrawLine(int x1, int y1, int x2, int y2) { sbyte atype; @@ -2535,6 +2503,7 @@ void rend_DrawLine(int x1, int y1, int x2, int y2) { rend_SetLighting(LS_NONE); rend_SetTextureType(TT_FLAT); + // TODO: Generalize dglBegin(GL_LINES); dglColor4ub(r, g, b, 255); dglVertex2i(x1 + gpu_state.clip_x1, y1 + gpu_state.clip_y1);