hedgewars/pas2cSystem.pas
branchwebgl
changeset 8026 4a4f21070479
parent 7616 dcda1c2b77e4
child 8105 d088be5ecdcb
equal deleted inserted replaced
8023:7de85783b823 8026:4a4f21070479
     1 system;
     1 system;
     2 
     2 
     3 type 
     3 type 
       
     4     uinteger = uinteger;
     4     Integer = integer;
     5     Integer = integer;
     5     LongInt = integer;
     6     LongInt = integer;
     6     LongWord = integer;
     7     LongWord = uinteger;
     7     Cardinal = integer;
     8     Cardinal = uinteger;
     8     PtrInt = integer;
     9     PtrInt = integer;
     9     Word = integer;
    10     Word = uinteger;
    10     Byte = integer;
    11     Byte = integer;
    11     SmallInt = integer;
    12     SmallInt = integer;
    12     ShortInt = integer;
    13     ShortInt = integer;
    13     QWord = integer;
    14     QWord = uinteger;
    14     GLint = integer;
    15     GLint = integer;
    15     GLuint = integer;
    16     GLuint = integer;
       
    17     GLenum = integer;
       
    18 
    16     int = integer;
    19     int = integer;
    17     size_t = integer;
    20     size_t = integer;
    18 
    21 
    19     pointer = pointer;
    22     pointer = pointer;
    20 
    23 
    49     png_size_t = integer;
    52     png_size_t = integer;
    50 
    53 
    51 var 
    54 var 
    52     false, true: boolean;
    55     false, true: boolean;
    53     
    56     
    54     write, writeLn, read, readLn: procedure;
    57     ord, Succ, Pred : function : integer;
    55     
       
    56     StrLen, ord, Succ, Pred : function : integer;
       
    57     inc, dec, Low, High, Lo, Hi : function : integer;
    58     inc, dec, Low, High, Lo, Hi : function : integer;
    58     odd, even : function : boolean;
       
    59 
    59 
    60     Now : function : integer;
       
    61 
       
    62     new, dispose, FillChar, Move : procedure;
       
    63 
       
    64     trunc, round : function : integer;
       
    65     abs, sqr : function : integer;
       
    66 
       
    67     StrPas, FormatDateTime, copy, delete, str, pos, trim, LowerCase : function : shortstring;
       
    68     Length, StrToInt : function : integer;
       
    69     SetLength, val : procedure;
       
    70     _pchar : function : PChar;
       
    71     pchar2str : function : string;
       
    72     memcpy : procedure;
       
    73 
       
    74     assign, rewrite, reset, flush, BlockWrite, BlockRead, close : procedure;
       
    75     IOResult : integer;
    60     IOResult : integer;
    76     exit, break, halt, continue : procedure;
    61     exit, break, halt, continue : procedure;
    77     TextFile, file : Handle;
    62 
       
    63     TextFile, File : Handle;
    78     FileMode : integer;
    64     FileMode : integer;
    79     FileExists, DirectoryExists, eof : function : boolean;
       
    80     ExtractFileName : function : string;
       
    81     exitcode : integer;
    65     exitcode : integer;
    82     stdout, stderr : Handle;
    66     stdout, stderr : Handle;
    83     
       
    84     ParamCount : function : integer;
       
    85     ParamStr : function : string;
       
    86 
    67 
    87     sqrt, arctan2, cos, sin, power : function : float;
    68     sqrt, cos, sin: function : float;
    88     pi : float;
    69     pi : float;
    89 
       
    90     TypeInfo, GetEnumName : function : shortstring;
       
    91 
       
    92     UTF8ToUnicode, WrapText: function : shortstring;
       
    93 
    70 
    94     sizeof : function : integer;
    71     sizeof : function : integer;
    95 
    72 
    96     GetMem : function : pointer;
       
    97     FreeMem : procedure;
       
    98    
       
    99     glGetString : function : pchar;
    73     glGetString : function : pchar;
   100  
    74  
   101     glBegin, glBindTexture, glBlendFunc, glClear, glClearColor,
    75     glBegin, glBindTexture, glBlendFunc, glClear, glClearColor,
   102     glColor4ub, glColorMask, glColorPointer, glDeleteTextures,
    76     glColor4ub, glColorMask, glColorPointer, glDeleteTextures,
   103     glDisable, glDisableClientState, glDrawArrays, glEnable,
    77     glDisable, glDisableClientState, glDrawArrays, glEnable,
   108     glTexParameteri, glTranslatef, glVertex2d, glVertexPointer,
    82     glTexParameteri, glTranslatef, glVertex2d, glVertexPointer,
   109     glViewport, glext_LoadExtension, glDeleteRenderbuffersEXT,
    83     glViewport, glext_LoadExtension, glDeleteRenderbuffersEXT,
   110     glDeleteFramebuffersEXT, glGenFramebuffersEXT,
    84     glDeleteFramebuffersEXT, glGenFramebuffersEXT,
   111     glGenRenderbuffersEXT, glBindFramebufferEXT, 
    85     glGenRenderbuffersEXT, glBindFramebufferEXT, 
   112     glBindRenderbufferEXT, glRenderbufferStorageEXT,
    86     glBindRenderbufferEXT, glRenderbufferStorageEXT,
   113     glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT : procedure;
    87     glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT,
       
    88     glUniformMatrix4fv, glVertexAttribPointer, glCreateShader,
       
    89     glShaderSource, glCompileShader, glGetShaderiv, glGetShaderInfoLog,
       
    90     glCreateProgram, glAttachShader, glBindAttribLocation, glLinkProgram,
       
    91     glDeleteShader, glGetProgramiv, glGetProgramInfoLog, glUseProgram,
       
    92     glUniform1i, glGetUniformLocation, glEnableVertexAttribArray,
       
    93     glGetError, glDeleteProgram, glDeleteBuffers,
       
    94     glGenBuffers, glBufferData, glBindBuffer, glewInit,
       
    95     glUniform4f, glDisableVertexAttribArray : procedure;
   114 
    96 
   115     GL_BGRA, GL_BLEND, GL_CLAMP_TO_EDGE, GL_COLOR_ARRAY,
    97     GL_BGRA, GL_BLEND, GL_CLAMP_TO_EDGE, GL_COLOR_ARRAY,
   116     GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_DEPTH_COMPONENT,
    98     GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_DEPTH_COMPONENT,
   117     GL_DITHER, GL_EXTENSIONS, GL_FALSE, GL_FASTEST, GL_LINEAR,
    99     GL_DITHER, GL_EXTENSIONS, GL_FALSE, GL_FASTEST, GL_LINEAR,
   118     GL_LINE_LOOP, GL_LINES, GL_LINE_SMOOTH, GL_LINE_STRIP,
   100     GL_LINE_LOOP, GL_LINES, GL_LINE_SMOOTH, GL_LINE_STRIP,
   122     GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_MAG_FILTER,
   104     GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_MAG_FILTER,
   123     GL_TEXTURE_MIN_FILTER, GL_TEXTURE_PRIORITY, GL_TEXTURE_WRAP_S,
   105     GL_TEXTURE_MIN_FILTER, GL_TEXTURE_PRIORITY, GL_TEXTURE_WRAP_S,
   124     GL_TEXTURE_WRAP_T, GL_TRIANGLE_FAN, GL_TRUE, GL_VENDOR,
   106     GL_TEXTURE_WRAP_T, GL_TRIANGLE_FAN, GL_TRUE, GL_VENDOR,
   125     GL_VERSION, GL_VERTEX_ARRAY, GLenum,  GL_FRAMEBUFFER_EXT,
   107     GL_VERSION, GL_VERTEX_ARRAY, GLenum,  GL_FRAMEBUFFER_EXT,
   126     GL_RENDERBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
   108     GL_RENDERBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
   127     GL_COLOR_ATTACHMENT0_EXT, GL_FLOAT, GL_UNSIGNED_BYTE : integer;
   109     GL_COLOR_ATTACHMENT0_EXT, GL_FLOAT, GL_UNSIGNED_BYTE, GL_COMPILE_STATUS,
       
   110     GL_INFO_LOG_LENGTH, GL_LINK_STATUS, GL_VERTEX_SHADER, GL_FRAGMENT_SHADER,
       
   111     GL_NO_ERROR, GL_ARRAY_BUFFER, GL_STATIC_DRAW, GLEW_OK,
       
   112     GL_AUX_BUFFERS: integer;
   128 
   113 
   129     TThreadId : function : integer;
   114     TThreadId : function : integer;
   130     BeginThread, ThreadSwitch : procedure;
       
   131     InterlockedIncrement, InterlockedDecrement : procedure;
       
   132     
       
   133     random : function : integer;
       
   134     randomize : procedure;
       
   135     
       
   136     Assigned : function : boolean;
       
   137     
   115     
   138     _strconcat, _strappend, _strprepend, _chrconcat : function : string;
   116     _strconcat, _strappend, _strprepend, _chrconcat : function : string;
   139     _strcompare, _strncompare, _strcomparec : function : boolean;
   117     _strcompare, _strncompare, _strcomparec : function : boolean;
   140 
   118 
   141     png_structp, png_set_write_fn, png_get_io_ptr,
   119     png_structp, png_set_write_fn, png_get_io_ptr,
   142     png_get_libpng_ver, png_create_write_struct,
   120     png_get_libpng_ver, png_create_write_struct,
   143     png_create_info_struct, png_destroy_write_struct,
   121     png_create_info_struct, png_destroy_write_struct,
   144     png_write_row, png_set_ihdr, png_write_info,
   122     png_write_row, png_set_ihdr, png_write_info,
   145     png_write_end : procedure;
   123     png_write_end : procedure;
   146 
   124 
   147     EnumToStr : function : string;
   125     clear_filelist_hook, add_file_hook, idb_loader_hook, mainloop_hook, drawworld_hook : procedure;
       
   126     SDL_InitPatch : procedure;
   148 
   127 
       
   128