summaryrefslogtreecommitdiff
path: root/agbx/source/gfx/plottex.c
diff options
context:
space:
mode:
Diffstat (limited to 'agbx/source/gfx/plottex.c')
-rw-r--r--agbx/source/gfx/plottex.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/agbx/source/gfx/plottex.c b/agbx/source/gfx/plottex.c
new file mode 100644
index 0000000..2165c52
--- /dev/null
+++ b/agbx/source/gfx/plottex.c
@@ -0,0 +1,36 @@
+/*
+ Copyright 2022 Gabriel Jensen.
+ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>.
+*/
+
+#include <ax/priv.h>
+
+#include <ax/gfx.h>
+
+void ax_plottex3(ax_i01 const * const _tex,ax_i8 const _x,ax_i8 const _y,ax_i8 const _w,ax_i8 const _h) {
+ ax_i01 const * texpos = _tex;
+ for (ax_i8 y = _y;y != _y + _h;++y) {
+ for (ax_i8 x = _x;x != _x + _w;++x) {
+ ax_plot3(x,y,*(texpos++));
+ }
+ }
+}
+
+void ax_plottex4(ax_i02 const _vaddr,ax_i8 const * const _tex,ax_i8 const _x,ax_i8 const _y,ax_i8 const _w,ax_i8 const _h) {
+ ax_i8 const * texpos = _tex;
+ for (ax_i8 y = _y;y != _y + _h;++y) {
+ for (ax_i8 x = _x;x != _x + _w;++x) {
+ ax_plot4(_vaddr,x,y,*(texpos++));
+ }
+ }
+}
+
+void ax_plottex5(ax_i02 const _vaddr,ax_i01 const * const _tex,ax_i8 const _x,ax_i8 const _y,ax_i8 const _w,ax_i8 const _h) {
+ ax_i01 const * texpos = _tex;
+ for (ax_i8 y = _y;y != _y + _h;++y) {
+ for (ax_i8 x = _x;x != _x + _w;++x) {
+ ax_plot5(_vaddr,x,y,*(texpos++));
+ }
+ }
+}