sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
aafastre.c
1
#include <stdio.h>
2
#include "
aalib.h
"
3
#include "
aamktabl.h
"
4
void
aa_fastrender(
aa_context
* c,
int
x1,
int
y1,
int
x2,
int
y2)
5
{
6
int
x, y;
7
int
val;
8
int
wi = c->imgwidth;
9
int
pos;
10
int
pos1;
11
if
(x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c))
12
return
;
13
if
(x2 >= aa_scrwidth(c))
14
x2 = aa_scrwidth(c);
15
if
(y2 >= aa_scrheight(c))
16
y2 = aa_scrheight(c);
17
if
(x1 < 0)
18
x1 = 0;
19
if
(y1 < 0)
20
y1 = 0;
21
if
(c->table == NULL)
22
aa_mktable(c);
23
for
(y = y1; y < y2; y++) {
24
pos = 2 * y * wi;
25
pos1 = y * aa_scrwidth(c);
26
for
(x = x1; x < x2; x++) {
27
val = c->table[
28
((((int) c->imagebuffer[pos] >> 4)) << 8) +
29
((((
int
) c->imagebuffer[pos + 1] >> 4)) << 12) +
30
((((int) c->imagebuffer[pos + wi] >> 4))) +
31
((((
int
) c->imagebuffer[pos + 1 + wi] >> 4)) << 4)];
32
c->attrbuffer[pos1] = val >> 8;
33
c->textbuffer[pos1] = val & 0xff;
34
pos += 2;
35
pos1++;
36
}
37
}
38
}
aalib.h
aamktabl.h
aa_context
Definition
aalib.h:78
aalib
src
aafastre.c
Generated by
1.18.0