hedgewars/pas2cSystem.pas
author krdrt5367
Tue, 03 Apr 2012 10:06:58 +0100
changeset 6849 7b5e5410f5e8
parent 6843 59da15acb2f2
child 6853 affeaba0af71
permissions -rw-r--r--
de update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6512
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
     1
system;
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
     2
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
     3
type 
6635
c2fa29fe2a58 Some progress, still can't find the source of bad behavior
unc0rr
parents: 6552
diff changeset
     4
    Integer = integer;
6512
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
     5
    LongInt = integer;
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
     6
    LongWord = integer;
6516
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
     7
    Cardinal = integer;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
     8
    PtrInt = integer;
6520
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
     9
    Word = integer;
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    10
    Byte = integer;
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    11
    SmallInt = integer;
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    12
    ShortInt = integer;
6653
d45b6dbd2ad6 Move a bit further
unc0rr
parents: 6649
diff changeset
    13
    QWord = integer;
d45b6dbd2ad6 Move a bit further
unc0rr
parents: 6649
diff changeset
    14
    GLInt = integer;
d45b6dbd2ad6 Move a bit further
unc0rr
parents: 6649
diff changeset
    15
    GLUInt = integer;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    16
    gl_unsigned_byte = integer;
6516
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    17
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    18
    pointer = pointer;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    19
    PChar = pointer;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    20
6649
7f78e8a6db69 Fix a bug with type declaration trying to resolve type being declared
unc0rr
parents: 6635
diff changeset
    21
    float = float;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    22
    single = float;
6516
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    23
    double = float;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    24
    real = float;
6653
d45b6dbd2ad6 Move a bit further
unc0rr
parents: 6649
diff changeset
    25
    extended = float;
d45b6dbd2ad6 Move a bit further
unc0rr
parents: 6649
diff changeset
    26
    GLFloat = float;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    27
    gl_float = float;
6516
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    28
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    29
    boolean = boolean;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    30
    LongBool = boolean;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    31
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    32
    string = string;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    33
    shortstring = string;
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    34
    ansistring = string;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    35
    widechar = string;
6516
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    36
addaeb1b9539 Further progress on dealing with namespaces
unc0rr
parents: 6512
diff changeset
    37
    char = char;
6520
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    38
    
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    39
    PByte = ^Byte;
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    40
    PLongInt = ^LongInt;
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    41
    PLongWord = ^LongWord;
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    42
    PInteger = ^Integer;
6663
2c4151afad0c Workaround pointers to not yet defined types
unc0rr
parents: 6653
diff changeset
    43
    
2c4151afad0c Workaround pointers to not yet defined types
unc0rr
parents: 6653
diff changeset
    44
    Handle = integer;
2c4151afad0c Workaround pointers to not yet defined types
unc0rr
parents: 6653
diff changeset
    45
    stderr = Handle;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    46
6512
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
    47
var 
0df7f6697939 "System" unit to help converter
unc0rr
parents:
diff changeset
    48
    false, true: boolean;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    49
    write, writeLn, read, readLn: procedure;
6520
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    50
    StrLen, ord, Succ, Pred : function : integer;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    51
    inc, dec, Low, High, Lo, Hi : function : integer;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    52
    odd, even : function : boolean;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    53
6520
6fecdc5d182f Some more work on scopes
unc0rr
parents: 6516
diff changeset
    54
    Now : function : integer;
6663
2c4151afad0c Workaround pointers to not yet defined types
unc0rr
parents: 6653
diff changeset
    55
    Length : function : integer;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    56
    SetLength, val : procedure;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    57
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    58
    new, dispose, FillChar, Move : procedure;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    59
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    60
    trunc, round : function : integer;
6837
a137733c5776 Much better types handling, work correctly with functions
unc0rr
parents: 6835
diff changeset
    61
    Abs, Sqr : function : integer;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    62
6843
59da15acb2f2 Finally fix the bug with pointer declarations polluting namespace with bad records
unc0rr
parents: 6838
diff changeset
    63
    StrPas, FormatDateTime, copy, delete, str, pos : function : shortstring;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    64
6843
59da15acb2f2 Finally fix the bug with pointer declarations polluting namespace with bad records
unc0rr
parents: 6838
diff changeset
    65
    assign, rewrite, reset, flush, BlockWrite, close : procedure;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    66
    IOResult : function : integer;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    67
    exit, break, halt : procedure;
6843
59da15acb2f2 Finally fix the bug with pointer declarations polluting namespace with bad records
unc0rr
parents: 6838
diff changeset
    68
    TextFile, file : Handle;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    69
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    70
    Sqrt, ArcTan2, pi, cos, sin : function : float;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    71
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    72
    TypeInfo, GetEnumName : function : shortstring;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    73
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    74
    UTF8ToUnicode, WrapText: function : shortstring;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    75
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    76
    sizeof : function : integer;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    77
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    78
    GetMem : function : pointer;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    79
    FreeMem : procedure;
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    80
    
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    81
    gl_texture_2d, glbindtexture, gltexparameterf, gl_rgba, 
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    82
    glteximage2d, glvertexpointer, gltexcoordpointer,
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    83
    gl_triangle_fan, gldrawarrays, glpushmatrix, glpopmatrix,
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    84
    gltranslatef, glscalef, glrotatef, gldisable, glenable,
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    85
    gl_line_smooth, gllinewidth, gl_lines, gl_line_loop,
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    86
    glcolor4ub, gl_texture_wrap_s, gltexparameteri,
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    87
    gl_texture_wrap_t, gl_texture_min_filter,
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    88
    gl_linear, gl_texture_mag_filter, glgentextures,
6843
59da15acb2f2 Finally fix the bug with pointer declarations polluting namespace with bad records
unc0rr
parents: 6838
diff changeset
    89
    gldeletetextures, glreadpixels : procedure;
6838
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    90
b1a0e7a52c04 More clean namespace, some fixes
unc0rr
parents: 6837
diff changeset
    91
    TThreadId : function : integer;