hedgewars/pas2cSystem.pas
changeset 10015 4feced261c68
parent 9954 bf51bc7e2808
child 10080 ac51bcb534ef
equal deleted inserted replaced
10014:56d2f2d5aad8 10015:4feced261c68
       
     1 system;
       
     2 {This file contains functions that are external}
       
     3 type
       
     4     uinteger = uinteger;
       
     5     Integer = integer;
       
     6     LongInt = integer;
       
     7     LongWord = uinteger;
       
     8     Cardinal = uinteger;
       
     9     PtrInt = integer;
       
    10     Word = uinteger;
       
    11     Byte = integer;
       
    12     SmallInt = integer;
       
    13     ShortInt = integer;
       
    14     Int64 = integer;
       
    15     QWord = uinteger;
       
    16     GLint = integer;
       
    17     GLuint = integer;
       
    18     GLenum = integer;
       
    19 
       
    20     int = integer;
       
    21     size_t = integer;
       
    22 
       
    23     pointer = pointer;
       
    24 
       
    25     float = float;
       
    26     single = float;
       
    27     double = float;
       
    28     real = float;
       
    29     extended = float;
       
    30     GLfloat = float;
       
    31 
       
    32     boolean = boolean;
       
    33     LongBool = boolean;
       
    34 
       
    35     string = string;
       
    36     shortstring = string;
       
    37     ansistring = string;
       
    38     widechar = string;
       
    39 
       
    40     char = char;
       
    41     PChar = ^char;
       
    42     PPChar = ^Pchar;
       
    43 
       
    44     PByte = ^Byte;
       
    45     PWord = ^Word;
       
    46     PLongInt = ^LongInt;
       
    47     PLongWord = ^LongWord;
       
    48     PInteger = ^Integer;
       
    49 
       
    50     Handle = integer;
       
    51 
       
    52     png_structp = pointer;
       
    53     png_size_t = integer;
       
    54 
       
    55 var
       
    56     false, true: boolean;
       
    57 
       
    58     ord, Succ, Pred : function : integer;
       
    59     inc, dec, Low, High, Lo, Hi : function : integer;
       
    60 
       
    61     IOResult : integer;
       
    62     exit, break, halt, continue : procedure;
       
    63 
       
    64     TextFile, File : Handle;
       
    65     FileMode : integer;
       
    66     exitcode : integer;
       
    67     stdout, stderr : Handle;
       
    68 
       
    69     sqrt, cos, sin: function : float;
       
    70     pi : float;
       
    71 
       
    72     sizeof : function : integer;
       
    73 
       
    74     glGetString : function : pchar;
       
    75 
       
    76     glBegin, glBindTexture, glBlendFunc, glClear, glClearColor,
       
    77     glColor4ub, glColorMask, glColorPointer, glDeleteTextures,
       
    78     glDisable, glDisableClientState, glDrawArrays, glEnable,
       
    79     glEnableClientState, glEnd, glGenTextures, glGetIntegerv,
       
    80     glHint, glLineWidth, glLoadIdentity, glMatrixMode, glPopMatrix,
       
    81     glPushMatrix, glReadPixels, glRotatef, glScalef, glTexCoord2f,
       
    82     glTexCoordPointer, glTexImage2D, glTexParameterf,
       
    83     glTexParameteri, glTranslatef, glVertex2d, glVertexPointer,
       
    84     glViewport, glext_LoadExtension, glDeleteRenderbuffersEXT,
       
    85     glDeleteFramebuffersEXT, glGenFramebuffersEXT,
       
    86     glGenRenderbuffersEXT, glBindFramebufferEXT,
       
    87     glBindRenderbufferEXT, glRenderbufferStorageEXT,
       
    88     glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT,
       
    89     glUniformMatrix4fv, glVertexAttribPointer, glCreateShader,
       
    90     glShaderSource, glCompileShader, glGetShaderiv, glGetShaderInfoLog,
       
    91     glCreateProgram, glAttachShader, glBindAttribLocation, glLinkProgram,
       
    92     glDeleteShader, glGetProgramiv, glGetProgramInfoLog, glUseProgram,
       
    93     glUniform1i, glGetUniformLocation, glEnableVertexAttribArray,
       
    94     glGetError, glDeleteProgram, glDeleteBuffers,
       
    95     glGenBuffers, glBufferData, glBindBuffer, glewInit,
       
    96     glUniform4f, glDisableVertexAttribArray, glTexEnvi : procedure;
       
    97 
       
    98     GL_BGRA, GL_BLEND, GL_CLAMP_TO_EDGE, GL_COLOR_ARRAY,
       
    99     GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_DEPTH_COMPONENT,
       
   100     GL_DITHER, GL_EXTENSIONS, GL_FALSE, GL_FASTEST, GL_LINEAR,
       
   101     GL_LINE_LOOP, GL_LINES, GL_LINE_SMOOTH, GL_LINE_STRIP,
       
   102     GL_MAX_TEXTURE_SIZE, GL_MODELVIEW, GL_ONE_MINUS_SRC_ALPHA,
       
   103     GL_PERSPECTIVE_CORRECTION_HINT, GL_PROJECTION, GL_QUADS,
       
   104     GL_RENDERER, GL_RGBA, GL_RGBA8, GL_SRC_ALPHA, GL_TEXTURE_2D,
       
   105     GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_MAG_FILTER,
       
   106     GL_TEXTURE_MIN_FILTER, GL_TEXTURE_PRIORITY, GL_TEXTURE_WRAP_S,
       
   107     GL_TEXTURE_WRAP_T, GL_TRIANGLE_FAN, GL_TRUE, GL_VENDOR,
       
   108     GL_VERSION, GL_VERTEX_ARRAY, GLenum,  GL_FRAMEBUFFER_EXT,
       
   109     GL_RENDERBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
       
   110     GL_COLOR_ATTACHMENT0_EXT, GL_FLOAT, GL_UNSIGNED_BYTE, GL_COMPILE_STATUS,
       
   111     GL_INFO_LOG_LENGTH, GL_LINK_STATUS, GL_VERTEX_SHADER, GL_FRAGMENT_SHADER,
       
   112     GL_NO_ERROR, GL_ARRAY_BUFFER, GL_STATIC_DRAW, GLEW_OK,
       
   113     GL_AUX_BUFFERS, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE, GL_ADD: integer;
       
   114 
       
   115     TThreadId : function : integer;
       
   116 
       
   117     _strconcat, _strappend, _strprepend, _chrconcat : function : string;
       
   118     _strcompare, _strncompare, _strcomparec : function : boolean;
       
   119 
       
   120     png_structp, png_set_write_fn, png_get_io_ptr,
       
   121     png_get_libpng_ver, png_create_write_struct,
       
   122     png_create_info_struct, png_destroy_write_struct,
       
   123     png_write_row, png_set_ihdr, png_write_info,
       
   124     png_write_end : procedure;
       
   125 
       
   126     clear_filelist_hook, add_file_hook, idb_loader_hook, mainloop_hook, drawworld_hook : procedure;
       
   127     SDL_InitPatch : procedure;
       
   128 
       
   129     PHYSFS_init, PHYSFS_deinit, PHYSFS_mount, PHYSFS_readBytes : function : LongInt;
       
   130     PHYSFSRWOPS_openRead, PHYSFSRWOPS_openWrite, PHYSFS_openRead : function : pointer;
       
   131     PHYSFS_eof, PHYSFS_close, PHYSFS_exists : function : boolean;
       
   132 
       
   133     hedgewarsMountPackages, physfsReaderSetBuffer, hedgewarsMountPackage : procedure;
       
   134     physfsReader : function : pointer;