summaryrefslogtreecommitdiff
path: root/agbx/source/gfx/plottex.c
blob: 2165c527925313a9b7d65531ae48ff7ee44f410b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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++));
		}
	}
}