sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
aastdout.c
1
#include "
config.h
"
2
#include <stdio.h>
3
#include "
aalib.h
"
4
#include "debug.h"
5
6
static
int
stdout_init(
struct
aa_hardware_params
*p,
void
*none,
struct
aa_hardware_params
*dest,
void
**n)
7
{
8
static
struct
aa_hardware_params
def={NULL, AA_NORMAL_MASK | AA_EXTENDED};
9
*dest=def;
10
init_scr();
11
scr_clear();
12
return
1;
13
}
14
static
void
stdout_uninit(
aa_context
* c)
15
{
16
}
17
static
void
stdout_getsize(
aa_context
* c,
int
*width,
int
*height)
18
{
19
}
20
21
static
void
stdout_flush(
aa_context
* c)
22
{
23
int
x, y;
24
for
(y = 0; y < aa_scrheight(c); y++) {
25
for
(x = 0; x < aa_scrwidth(c)-2; x++) {
26
scr_printf(
"%c"
,c->textbuffer[x + y * aa_scrwidth(c)]);
27
}
28
scr_printf(
" \n"
);
29
}
30
scr_printf(
" \n"
);
31
scr_clear();
32
}
33
static
void
stdout_gotoxy(
aa_context
* c,
int
x,
int
y)
34
{
35
}
36
struct
aa_driver
stdout_d =
37
{
38
"stdout"
,
"Standard output driver"
,
39
stdout_init,
40
stdout_uninit,
41
stdout_getsize,
42
NULL,
43
NULL,
44
stdout_gotoxy,
45
stdout_flush,
46
NULL
47
};
48
49
50
static
void
stderr_flush(
aa_context
* c)
51
{
52
int
x, y;
53
for
(y = 0; y < aa_scrheight(c); y++) {
54
for
(x = 0; x < aa_scrwidth(c); x++) {
55
putc(c->textbuffer[x + y * aa_scrwidth(c)], stderr);
56
}
57
putc(
'\n'
, stderr);
58
}
59
putc(
'␌'
, stderr);
60
putc(
'\n'
, stderr);
61
fflush(stderr);
62
}
63
struct
aa_driver
stderr_d =
64
{
65
"stderr"
,
"Standard error driver"
,
66
stdout_init,
67
stdout_uninit,
68
stdout_getsize,
69
NULL,
70
NULL,
71
stdout_gotoxy,
72
stderr_flush,
73
NULL
74
};
config.h
aalib.h
aa_context
Definition
aalib.h:78
aa_driver
Definition
aalib.h:99
aa_hardware_params
Definition
aalib.h:67
aalib
src
aastdout.c
Generated by
1.18.0