~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/gbaunits/gba_window.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(*
 
2
  gba_window.pas  18/06/2006 4.40.07
 
3
  ------------------------------------------------------------------------------
 
4
  This lib is a raw porting of libgba library for gba (you can find it at
 
5
  http://www.devkitpro.org).
 
6
  
 
7
  As this is a direct port from c, I'm pretty sure that something could not work
 
8
  as you expect. I am even more sure that this code could be written better, so 
 
9
  if you think that I have made some mistakes or you have some better 
 
10
  implemented functions, let me know [francky74 (at) gmail (dot) com]
 
11
  Enjoy!
 
12
 
 
13
  Conversion by Legolas (http://itaprogaming.free.fr) for freepascal compiler
 
14
  (http://www.freepascal.org)
 
15
  
 
16
  Copyright (C) 2006  Francesco Lombardi
 
17
  
 
18
  This library is free software; you can redistribute it and/or
 
19
  modify it under the terms of the GNU Lesser General Public
 
20
  License as published by the Free Software Foundation; either
 
21
  version 2.1 of the License, or (at your option) any later version.
 
22
  
 
23
  This library is distributed in the hope that it will be useful,
 
24
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
26
  Lesser General Public License for more details.
 
27
  
 
28
  You should have received a copy of the GNU Lesser General Public
 
29
  License along with this library; if not, write to the Free Software
 
30
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 
31
  ------------------------------------------------------------------------------
 
32
*)
 
33
 
 
34
unit gba_window;
 
35
{$i def.inc}
 
36
interface
 
37
 
 
38
uses 
 
39
  gba_types;
 
40
 
 
41
const 
 
42
  WIN_0_BG0 = (1 shl 0);
 
43
  WIN_0_BG1 = (1 shl 1);
 
44
  WIN_0_BG2 = (1 shl 2);
 
45
  WIN_0_BG3 = (1 shl 3);
 
46
  WIN_0_OBJ = (1 shl 4);
 
47
  WIN_0_SPE = (1 shl 5);
 
48
  WIN_1_BG0 = (1 shl 8);
 
49
  WIN_1_BG1 = (1 shl 9);
 
50
  WIN_1_BG2 = (1 shl 10);
 
51
  WIN_1_BG3 = (1 shl 11);
 
52
  WIN_1_OBJ = (1 shl 12);
 
53
  WIN_1_SPE = (1 shl 13);
 
54
 
 
55
function WinRight(x: dword): dword;
 
56
function WinLeft(x: dword): dword;
 
57
function WinDown(x: dword): dword;
 
58
function WinTop(x: dword): dword;
 
59
 
 
60
 
 
61
implementation
 
62
 
 
63
function WinRight(x: dword): dword;
 
64
begin
 
65
  WinRight := (x shl 0);
 
66
end;
 
67
 
 
68
function WinLeft(x: dword): dword;
 
69
begin
 
70
  WinLeft := (x shl 8);
 
71
end;
 
72
 
 
73
function WinDown(x: dword): dword;
 
74
begin
 
75
  WinDown := (x shl 0);
 
76
end;
 
77
 
 
78
function WinTop(x: dword): dword;
 
79
begin
 
80
  WinTop := (x shl 8);
 
81
end;
 
82
 
 
83
end.