blob: f4453dc7f98cf39d16c30b840976e92915e9cf62 (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
(*
$Id: background.inc 25 2007-12-10 21:06:46Z p4p3r0 $
------------------------------------------------------------------------------
Copyright (C) 2005
Jason Rogers (dovoto)
Dave Murphy (WinterMute)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
------------------------------------------------------------------------------
Conversion by Legolas (http://itaprogaming.free.fr) for freepascal compiler
(http://www.freepascal.org)
Copyright (C) 2006 Francesco Lombardi
Check http://sourceforge.net/projects/libndsfpc for updates
------------------------------------------------------------------------------
$Log$
*)
// Background control defines
{$ifdef NDS_INTERFACE}
// BGxCNT defines ///
const
BG_MOSAIC_ENABLE = $40;
BG_COLOR_256 = $80;
BG_COLOR_16 = $00;
{$endif NDS_INTERFACE}
{$ifdef NDS_IMPLEMENTATION}
function CHAR_BASE_BLOCK(n: cint): cint; inline;
begin
CHAR_BASE_BLOCK := (n * $4000)+ $06000000;
end;
function CHAR_BASE_BLOCK_SUB(n: cint): cint; inline;
begin
CHAR_BASE_BLOCK_SUB := (n * $4000)+ $06200000;
end;
function SCREEN_BASE_BLOCK(n: cint): cint; inline;
begin
SCREEN_BASE_BLOCK := (n * $800) + $06000000;
end;
function SCREEN_BASE_BLOCK_SUB(n: cint): cint; inline;
begin
SCREEN_BASE_BLOCK_SUB := (n * $800) + $06200000;
end;
{$endif NDS_IMPLEMENTATION}
{$ifdef NDS_INTERFACE}
const
CHAR_SHIFT = 2;
SCREEN_SHIFT = 8;
TEXTBG_SIZE_256x256 = $0;
TEXTBG_SIZE_256x512 = $8000;
TEXTBG_SIZE_512x256 = $4000;
TEXTBG_SIZE_512x512 = $C000;
ROTBG_SIZE_128x128 = $0;
ROTBG_SIZE_256x256 = $4000;
ROTBG_SIZE_512x512 = $8000;
ROTBG_SIZE_1024x1024 = $C000;
WRAPAROUND = $1;
{$endif NDS_INTERFACE}
{$ifdef NDS_INTERFACE}
function CHAR_BASE_BLOCK(n: cint): cint; inline;
function CHAR_BASE_BLOCK_SUB(n: cint): cint; inline;
function SCREEN_BASE_BLOCK(n: cint): cint; inline;
function SCREEN_BASE_BLOCK_SUB(n: cint): cint; inline;
{$endif NDS_INTERFACE}
|