ports/quake2: Update to new LibGUI interface
This commit is contained in:
parent
92d26f2216
commit
df3d2d57c3
|
@ -198,7 +198,7 @@ new file mode 100644
|
||||||
index 0000000..c7d7e16
|
index 0000000..c7d7e16
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/port_soft_banan_os.cpp
|
+++ b/port_soft_banan_os.cpp
|
||||||
@@ -0,0 +1,277 @@
|
@@ -0,0 +1,278 @@
|
||||||
+#include <LibGUI/Window.h>
|
+#include <LibGUI/Window.h>
|
||||||
+#include <LibInput/KeyEvent.h>
|
+#include <LibInput/KeyEvent.h>
|
||||||
+#include <LibInput/MouseEvent.h>
|
+#include <LibInput/MouseEvent.h>
|
||||||
|
@ -397,11 +397,12 @@ index 0000000..c7d7e16
|
||||||
+
|
+
|
||||||
+void SWimp_EndFrame(void)
|
+void SWimp_EndFrame(void)
|
||||||
+{
|
+{
|
||||||
|
+ auto& texture = s_window->texture();
|
||||||
+ const uint32_t width = s_window->width();
|
+ const uint32_t width = s_window->width();
|
||||||
+ const uint32_t height = s_window->height();
|
+ const uint32_t height = s_window->height();
|
||||||
+ for (int y = 0; y < height; y++)
|
+ for (int y = 0; y < height; y++)
|
||||||
+ for (int x = 0; x < width; x++)
|
+ for (int x = 0; x < width; x++)
|
||||||
+ s_window->set_pixel(x, y, s_palette[s_buffer[y * width + x]].as_argb());
|
+ texture.set_pixel(x, y, s_palette[s_buffer[y * width + x]].as_argb());
|
||||||
+ s_window->invalidate();
|
+ s_window->invalidate();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in New Issue