author | alfadur |
Tue, 13 Feb 2024 00:58:17 +0300 | |
changeset 16018 | fb389df02e3e |
parent 15376 | 5c0479d0ed5b |
permissions | -rw-r--r-- |
6512 | 1 |
system; |
10015 | 2 |
{This file contains functions that are external} |
3 |
type |
|
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
4 |
uinteger = uinteger; |
6635
c2fa29fe2a58
Some progress, still can't find the source of bad behavior
unc0rr
parents:
6552
diff
changeset
|
5 |
Integer = integer; |
6512 | 6 |
LongInt = integer; |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
7 |
LongWord = uinteger; |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
8 |
Cardinal = uinteger; |
6516 | 9 |
PtrInt = integer; |
12104 | 10 |
SizeInt = PtrInt; |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
11 |
Word = uinteger; |
6520 | 12 |
Byte = integer; |
13 |
SmallInt = integer; |
|
14 |
ShortInt = integer; |
|
8105 | 15 |
Int64 = integer; |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
16 |
QWord = uinteger; |
6891
ab9843957664
Improve rendering of function types, ranges, and more
unc0rr
parents:
6873
diff
changeset
|
17 |
GLint = integer; |
11800 | 18 |
GLsizei = integer; |
6891
ab9843957664
Improve rendering of function types, ranges, and more
unc0rr
parents:
6873
diff
changeset
|
19 |
GLuint = integer; |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
20 |
GLenum = integer; |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
21 |
|
7044 | 22 |
int = integer; |
7073 | 23 |
size_t = integer; |
6516 | 24 |
|
25 |
pointer = pointer; |
|
26 |
||
6649
7f78e8a6db69
Fix a bug with type declaration trying to resolve type being declared
unc0rr
parents:
6635
diff
changeset
|
27 |
float = float; |
6838 | 28 |
single = float; |
6516 | 29 |
double = float; |
30 |
real = float; |
|
6653 | 31 |
extended = float; |
6891
ab9843957664
Improve rendering of function types, ranges, and more
unc0rr
parents:
6873
diff
changeset
|
32 |
GLfloat = float; |
6516 | 33 |
|
34 |
boolean = boolean; |
|
35 |
LongBool = boolean; |
|
36 |
||
37 |
string = string; |
|
38 |
shortstring = string; |
|
39 |
ansistring = string; |
|
6838 | 40 |
widechar = string; |
6516 | 41 |
|
42 |
char = char; |
|
6873 | 43 |
PChar = ^char; |
6926
6e832f8f4d8e
Make adler32 friendlier for pas2c - this should work the same (needs testing ofc)
nemo
parents:
6902
diff
changeset
|
44 |
PPChar = ^Pchar; |
10131
4b4a043111f4
- pas2c recognizes typecasts in initialization expressions
unc0rr
parents:
10129
diff
changeset
|
45 |
PWideChar = ^WideChar; |
10015 | 46 |
|
6520 | 47 |
PByte = ^Byte; |
7616 | 48 |
PWord = ^Word; |
6520 | 49 |
PLongInt = ^LongInt; |
50 |
PLongWord = ^LongWord; |
|
51 |
PInteger = ^Integer; |
|
10015 | 52 |
|
6663 | 53 |
Handle = integer; |
6838 | 54 |
|
6893 | 55 |
png_structp = pointer; |
56 |
png_size_t = integer; |
|
57 |
||
10015 | 58 |
var |
6512 | 59 |
false, true: boolean; |
10015 | 60 |
|
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
61 |
ord, Succ, Pred : function : integer; |
6838 | 62 |
inc, dec, Low, High, Lo, Hi : function : integer; |
63 |
||
6902
7d4e5ce73b98
Make pas2c even smarter. Now uIO.c compiles fine, and only 1 warning when compiled with -Wall (clang).
unc0rr
parents:
6898
diff
changeset
|
64 |
IOResult : integer; |
6853 | 65 |
exit, break, halt, continue : procedure; |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
66 |
|
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
67 |
TextFile, File : Handle; |
6853 | 68 |
FileMode : integer; |
6855
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
69 |
exitcode : integer; |
7151 | 70 |
stdout, stderr : Handle; |
6838 | 71 |
|
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
72 |
sqrt, cos, sin: function : float; |
7062 | 73 |
pi : float; |
6838 | 74 |
|
75 |
sizeof : function : integer; |
|
76 |
||
7064 | 77 |
glGetString : function : pchar; |
10015 | 78 |
|
7064 | 79 |
glBegin, glBindTexture, glBlendFunc, glClear, glClearColor, |
80 |
glColor4ub, glColorMask, glColorPointer, glDeleteTextures, |
|
81 |
glDisable, glDisableClientState, glDrawArrays, glEnable, |
|
82 |
glEnableClientState, glEnd, glGenTextures, glGetIntegerv, |
|
83 |
glHint, glLineWidth, glLoadIdentity, glMatrixMode, glPopMatrix, |
|
84 |
glPushMatrix, glReadPixels, glRotatef, glScalef, glTexCoord2f, |
|
85 |
glTexCoordPointer, glTexImage2D, glTexParameterf, |
|
86 |
glTexParameteri, glTranslatef, glVertex2d, glVertexPointer, |
|
7065 | 87 |
glViewport, glext_LoadExtension, glDeleteRenderbuffersEXT, |
88 |
glDeleteFramebuffersEXT, glGenFramebuffersEXT, |
|
10015 | 89 |
glGenRenderbuffersEXT, glBindFramebufferEXT, |
7065 | 90 |
glBindRenderbufferEXT, glRenderbufferStorageEXT, |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
91 |
glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT, |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
92 |
glUniformMatrix4fv, glVertexAttribPointer, glCreateShader, |
15313
70d416a8f63f
fix Bug 750: workaround GL2 function params const-iness issues with pas2c
sheepluva
parents:
14911
diff
changeset
|
93 |
{glShaderSource, }glCompileShader, glGetShaderiv, glGetShaderInfoLog, |
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
94 |
glCreateProgram, glAttachShader, glBindAttribLocation, glLinkProgram, |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
95 |
glDeleteShader, glGetProgramiv, glGetProgramInfoLog, glUseProgram, |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
96 |
glUniform1i, glGetUniformLocation, glEnableVertexAttribArray, |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
97 |
glGetError, glDeleteProgram, glDeleteBuffers, |
15376
5c0479d0ed5b
Remove last vestiges of GLEW
raptor <buckyballreaction@gmail.com>
parents:
15313
diff
changeset
|
98 |
glGenBuffers, glBufferData, glBindBuffer, |
10133 | 99 |
glUniform4f, glDisableVertexAttribArray, glTexEnvi, |
14911
ff2c19a462de
Pas2C: Add a couple of missing symbols
Wuzzy <Wuzzy2@mail.ru>
parents:
13342
diff
changeset
|
100 |
glLoadMatrixf, glMultMatrixf, glGetFloatv, |
ff2c19a462de
Pas2C: Add a couple of missing symbols
Wuzzy <Wuzzy2@mail.ru>
parents:
13342
diff
changeset
|
101 |
glDrawBuffer, glReadBuffer: procedure; |
7064 | 102 |
|
103 |
GL_BGRA, GL_BLEND, GL_CLAMP_TO_EDGE, GL_COLOR_ARRAY, |
|
104 |
GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_DEPTH_COMPONENT, |
|
105 |
GL_DITHER, GL_EXTENSIONS, GL_FALSE, GL_FASTEST, GL_LINEAR, |
|
106 |
GL_LINE_LOOP, GL_LINES, GL_LINE_SMOOTH, GL_LINE_STRIP, |
|
107 |
GL_MAX_TEXTURE_SIZE, GL_MODELVIEW, GL_ONE_MINUS_SRC_ALPHA, |
|
108 |
GL_PERSPECTIVE_CORRECTION_HINT, GL_PROJECTION, GL_QUADS, |
|
10535 | 109 |
GL_RENDERER, GL_RGB, GL_RGB8, GL_RGBA, GL_RGBA8, GL_SRC_ALPHA, GL_TEXTURE_2D, |
7064 | 110 |
GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_MAG_FILTER, |
111 |
GL_TEXTURE_MIN_FILTER, GL_TEXTURE_PRIORITY, GL_TEXTURE_WRAP_S, |
|
10319 | 112 |
GL_TEXTURE_WRAP_T, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRUE, GL_VENDOR, |
7065 | 113 |
GL_VERSION, GL_VERTEX_ARRAY, GLenum, GL_FRAMEBUFFER_EXT, |
114 |
GL_RENDERBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, |
|
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
115 |
GL_COLOR_ATTACHMENT0_EXT, GL_FLOAT, GL_UNSIGNED_BYTE, GL_COMPILE_STATUS, |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
116 |
GL_INFO_LOG_LENGTH, GL_LINK_STATUS, GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, |
15376
5c0479d0ed5b
Remove last vestiges of GLEW
raptor <buckyballreaction@gmail.com>
parents:
15313
diff
changeset
|
117 |
GL_NO_ERROR, GL_ARRAY_BUFFER, GL_STATIC_DRAW, |
10133 | 118 |
GL_AUX_BUFFERS, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE, GL_ADD, |
14911
ff2c19a462de
Pas2C: Add a couple of missing symbols
Wuzzy <Wuzzy2@mail.ru>
parents:
13342
diff
changeset
|
119 |
GL_MODELVIEW_MATRIX, GL_AUX0, GL_BACK: integer; |
6838 | 120 |
|
121 |
TThreadId : function : integer; |
|
10015 | 122 |
|
7151 | 123 |
_strconcat, _strappend, _strprepend, _chrconcat : function : string; |
10124
aabd1b75d5a3
Even more explicit type conversions and other stuff to help pas2c use ansistrings
unc0rr
parents:
10120
diff
changeset
|
124 |
_strcompare, _strncompare, _strcomparec, _strncompareA : function : boolean; |
13342
774dd8762607
Pas2C: Add support for char + ansistring
Wuzzy <Wuzzy2@mail.ru>
parents:
12597
diff
changeset
|
125 |
_strconcatA, _strappendA, _strprependA: function : ansistring; |
6893 | 126 |
|
127 |
png_structp, png_set_write_fn, png_get_io_ptr, |
|
128 |
png_get_libpng_ver, png_create_write_struct, |
|
129 |
png_create_info_struct, png_destroy_write_struct, |
|
130 |
png_write_row, png_set_ihdr, png_write_info, |
|
131 |
png_write_end : procedure; |
|
6894 | 132 |
|
8026
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
133 |
clear_filelist_hook, add_file_hook, idb_loader_hook, mainloop_hook, drawworld_hook : procedure; |
4a4f21070479
merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents:
7616
diff
changeset
|
134 |
SDL_InitPatch : procedure; |
7066
12cc2bd84b0b
Make pas2c even more happier with uGears.c, allow assigning arrays in some cases
unc0rr
parents:
7065
diff
changeset
|
135 |
|
11643 | 136 |
PHYSFS_init, PHYSFS_deinit, PHYSFS_mount, PHYSFS_readBytes, PHYSFS_writeBytes, PHYSFS_read : function : LongInt; |
137 |
PHYSFSRWOPS_openRead, PHYSFSRWOPS_openWrite, PHYSFS_openRead, PHYSFS_openWrite : function : pointer; |
|
12597 | 138 |
PHYSFS_eof, PHYSFS_close, PHYSFS_exists, PHYSFS_mkdir, PHYSFS_flush, PHYSFS_setWriteDir, PHYSFS_setBuffer : function : boolean; |
10080 | 139 |
PHYSFS_getLastError : function : PChar; |
11643 | 140 |
PHYSFS_enumerateFiles : function : PPChar; |
141 |
PHYSFS_freeList : procedure; |
|
9260 | 142 |
|
143 |
hedgewarsMountPackages, physfsReaderSetBuffer, hedgewarsMountPackage : procedure; |
|
144 |
physfsReader : function : pointer; |