project_files/hwc/rtl/fpcrtl.h
author frd
Sat, 23 Apr 2016 16:18:07 -0400
changeset 11686 8fca9fd31357
parent 11405 fac466eb0c4d
child 15366 5c0479d0ed5b
permissions -rw-r--r--
Use hwlibrary while converting to c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     1
#ifndef _FPCRTL_H_
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     2
#define _FPCRTL_H_
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     3
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     4
#include <stdio.h>
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     5
#include <stdlib.h>
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     6
#include <string.h>
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     7
#include <unistd.h>
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     8
#include <math.h>
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
     9
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    10
#include "SysUtils.h"
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    11
#include "system.h"
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    12
#include "misc.h"
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    13
#include "fileio.h"
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    14
#include "pmath.h"
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    15
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    16
#ifndef EMSCRIPTEN
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    17
#include "GL/glew.h"
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    18
#endif
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    19
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    20
#define fpcrtl_memcpy                       memcpy
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    21
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    22
#define luapas_lua_gettop                   lua_gettop
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    23
#define luapas_lua_close                    lua_close
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    24
#define luapas_lua_createtable              lua_createtable
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    25
#define luapas_lua_error                    lua_error
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    26
#define luapas_lua_gc                       lua_gc
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    27
#define luapas_lua_getfield                 lua_getfield
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    28
#define luapas_lua_objlen                   lua_objlen
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    29
#define luapas_lua_call                     lua_call
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    30
#define luapas_lua_pcall                    lua_pcall
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    31
#define luapas_lua_pushboolean              lua_pushboolean
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    32
#define luapas_lua_pushcclosure             lua_pushcclosure
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    33
#define luapas_lua_pushinteger              lua_pushinteger
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    34
#define luapas_lua_pushnil                  lua_pushnil
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    35
#define luapas_lua_pushnumber               lua_pushnumber
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    36
#define luapas_lua_pushlstring              lua_pushlstring
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    37
#define luapas_lua_pushstring               lua_pushstring
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    38
#define luapas_lua_pushvalue                lua_pushvalue
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    39
#define luapas_lua_rawgeti                  lua_rawgeti
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    40
#define luapas_lua_setfield                 lua_setfield
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    41
#define luapas_lua_settop                   lua_settop
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    42
#define luapas_lua_toboolean                lua_toboolean
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    43
#define luapas_lua_tointeger                lua_tointeger
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    44
#define luapas_lua_tolstring                lua_tolstring
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    45
#define luapas_lua_tonumber                 lua_tonumber
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    46
#define luapas_lua_type                     lua_type
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    47
#define luapas_lua_typename                 lua_typename
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    48
#define luapas_luaL_argerror                luaL_argerror
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    49
#define luapas_luaL_checkinteger            luaL_checkinteger
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    50
#define luapas_luaL_checklstring            luaL_checklstring
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    51
#define luapas_luaL_loadfile                luaL_loadfile
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    52
#define luapas_luaL_loadstring              luaL_loadstring
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    53
#define luapas_luaL_newstate                luaL_newstate
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    54
#define luapas_luaL_optinteger              luaL_optinteger
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    55
#define luapas_luaL_optlstring              luaL_optlstring
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    56
#define luapas_luaL_prepbuffer              luaL_prepbuffer
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    57
#define luapas_luaL_ref                     luaL_ref
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    58
#define luapas_luaL_unref                   luaL_unref
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    59
#define luapas_luaopen_base                 luaopen_base
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    60
#define luapas_luaopen_math                 luaopen_math
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    61
#define luapas_luaopen_string               luaopen_string
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    62
#define luapas_luaopen_table                luaopen_table
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    63
#define luapas_lua_load                     lua_load
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    64
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    65
#define sdlh_IMG_Load                       IMG_Load
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    66
#define sdlh_IMG_Load_RW                    IMG_Load_RW
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    67
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    68
#ifndef EMSCRIPTEN
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    69
#define sdlh_Mix_AllocateChannels           Mix_AllocateChannels
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    70
#define sdlh_Mix_CloseAudio                 Mix_CloseAudio
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    71
#define sdlh_Mix_FadeInChannelTimed         Mix_FadeInChannelTimed
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    72
#define sdlh_Mix_FadeInMusic                Mix_FadeInMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    73
#define sdlh_Mix_FadeOutChannel             Mix_FadeOutChannel
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    74
#define sdlh_Mix_FreeChunk                  Mix_FreeChunk
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    75
#define sdlh_Mix_FreeMusic                  Mix_FreeMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    76
#define sdlh_Mix_HaltChannel                Mix_HaltChannel
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    77
#define sdlh_Mix_HaltMusic                  Mix_HaltMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    78
#define sdlh_Mix_LoadMUS                    Mix_LoadMUS
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    79
#define sdlh_Mix_LoadMUS_RW                 Mix_LoadMUS_RW
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    80
#define sdlh_Mix_LoadWAV_RW                 Mix_LoadWAV_RW
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    81
#define sdlh_Mix_OpenAudio                  Mix_OpenAudio
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    82
#define sdlh_Mix_PauseMusic                 Mix_PauseMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    83
#define sdlh_Mix_PlayChannelTimed           Mix_PlayChannelTimed
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    84
#define sdlh_Mix_Playing                    Mix_Playing
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    85
#define sdlh_Mix_ResumeMusic                Mix_ResumeMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    86
#define sdlh_Mix_Volume                     Mix_Volume
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    87
#define sdlh_Mix_VolumeMusic                Mix_VolumeMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    88
#else
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    89
#define sdlh_Mix_AllocateChannels           stub_Mix_AllocateChannels
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    90
#define sdlh_Mix_CloseAudio                 stub_Mix_CloseAudio
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    91
#define sdlh_Mix_FadeInChannelTimed         stub_Mix_FadeInChannelTimed
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    92
#define sdlh_Mix_FadeInMusic                stub_Mix_FadeInMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    93
#define sdlh_Mix_FadeOutChannel             stub_Mix_FadeOutChannel
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    94
#define sdlh_Mix_FreeChunk                  stub_Mix_FreeChunk
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    95
#define sdlh_Mix_FreeMusic                  stub_Mix_FreeMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    96
#define sdlh_Mix_HaltChannel                stub_Mix_HaltChannel
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    97
#define sdlh_Mix_HaltMusic                  stub_Mix_HaltMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    98
#define sdlh_Mix_LoadMUS                    stub_Mix_LoadMUS
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
    99
#define sdlh_Mix_LoadMUS_RW                 stub_Mix_LoadMUS_RW
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   100
#define sdlh_Mix_LoadWAV_RW                 stub_Mix_LoadWAV_RW
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   101
#define sdlh_Mix_OpenAudio                  stub_Mix_OpenAudio
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   102
#define sdlh_Mix_PauseMusic                 stub_Mix_PauseMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   103
#define sdlh_Mix_PlayChannelTimed           stub_Mix_PlayChannelTimed
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   104
#define sdlh_Mix_Playing                    stub_Mix_Playing
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   105
#define sdlh_Mix_ResumeMusic                stub_Mix_ResumeMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   106
#define sdlh_Mix_Volume                     stub_Mix_Volume
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   107
#define sdlh_Mix_VolumeMusic                stub_Mix_VolumeMusic
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   108
#endif
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   109
11359
c481d087f653 cmake tweaks. make pas2c build with sdl2 (keycodes or something still missing)
sheepluva
parents: 10129
diff changeset
   110
#define sdlh_SDL_free                       SDL_free
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   111
#define sdlh_SDL_ConvertSurface             SDL_ConvertSurface
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   112
#define sdlh_SDL_CreateRGBSurface           SDL_CreateRGBSurface
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   113
#define sdlh_SDL_CreateThread               SDL_CreateThread
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   114
#define sdlh_SDL_Delay                      SDL_Delay
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   115
#define sdlh_SDL_EnableKeyRepeat            SDL_EnableKeyRepeat
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   116
#define sdlh_SDL_EnableUNICODE              SDL_EnableUNICODE
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   117
#define sdlh_SDL_FillRect                   SDL_FillRect
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   118
#define sdlh_SDL_FreeSurface                SDL_FreeSurface
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   119
#define sdlh_SDL_GetError                   SDL_GetError
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   120
#define sdlh_SDL_GetKeyName                 SDL_GetKeyName
11359
c481d087f653 cmake tweaks. make pas2c build with sdl2 (keycodes or something still missing)
sheepluva
parents: 10129
diff changeset
   121
#define sdlh_SDL_GetKeyboardState           SDL_GetKeyboardState
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   122
#define sdlh_SDL_GetMouseState              SDL_GetMouseState
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   123
#define sdlh_SDL_GetRGBA                    SDL_GetRGBA
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   124
#define sdlh_SDL_GetTicks                   SDL_GetTicks
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   125
#define sdlh_SDL_GL_SetAttribute            SDL_GL_SetAttribute
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   126
#define sdlh_SDL_GL_SwapBuffers             SDL_GL_SwapBuffers
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   127
#define sdlh_SDL_Init                       SDL_Init
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   128
#define sdlh_SDL_InitSubSystem              SDL_InitSubSystem
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   129
#define sdlh_SDL_JoystickClose              SDL_JoystickClose
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   130
#define sdlh_SDL_JoystickEventState         SDL_JoystickEventState
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   131
#define sdlh_SDL_JoystickName               SDL_JoystickName
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   132
#define sdlh_SDL_JoystickNumAxes            SDL_JoystickNumAxes
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   133
#define sdlh_SDL_JoystickNumButtons         SDL_JoystickNumButtons
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   134
#define sdlh_SDL_JoystickNumHats            SDL_JoystickNumHats
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   135
#define sdlh_SDL_JoystickOpen               SDL_JoystickOpen
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   136
#define sdlh_SDL_LockSurface                SDL_LockSurface
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   137
#define sdlh_SDL_MapRGB                     SDL_MapRGB
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   138
#define sdlh_SDL_MapRGBA                    SDL_MapRGBA
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   139
#define sdlh_SDL_NumJoysticks               SDL_NumJoysticks
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   140
#define sdlh_SDL_PeepEvents                 SDL_PeepEvents
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   141
#define sdlh_SDL_PumpEvents                 SDL_PumpEvents
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   142
#define sdlh_SDL_Quit                       SDL_Quit
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   143
#define sdlh_SDL_RWFromFile                 SDL_RWFromFile
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   144
#define sdlh_SDL_SetColorKey                SDL_SetColorKey
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   145
#define sdlh_SDL_SetVideoMode               SDL_SetVideoMode
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   146
#define sdlh_SDL_WaitThread                 SDL_WaitThread
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   147
#define sdlh_SDL_CreateMutex                SDL_CreateMutex
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   148
#define sdlh_SDL_DestroyMutex               SDL_DestroyMutex
11359
c481d087f653 cmake tweaks. make pas2c build with sdl2 (keycodes or something still missing)
sheepluva
parents: 10129
diff changeset
   149
#define sdlh_SDL_LockMutex                  SDL_LockMutex
c481d087f653 cmake tweaks. make pas2c build with sdl2 (keycodes or something still missing)
sheepluva
parents: 10129
diff changeset
   150
#define sdlh_SDL_UnlockMutex                SDL_UnlockMutex
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   151
#ifndef EMSCRIPTEN
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   152
#define sdlh_SDL_ShowCursor                 SDL_ShowCursor
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   153
#else
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   154
#define sdlh_SDL_ShowCursor                 SDL_ShowCursor_patch
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   155
#endif
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   156
#define sdlh_SDL_UnlockSurface              SDL_UnlockSurface
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   157
#define sdlh_SDL_UpperBlit                  SDL_UpperBlit
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   158
#define sdlh_SDL_VideoDriverName            SDL_VideoDriverName
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   159
#define sdlh_SDL_WarpMouse                  SDL_WarpMouse
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   160
#define sdlh_SDL_WM_SetCaption              SDL_WM_SetCaption
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   161
#define sdlh_SDL_WM_SetIcon                 SDL_WM_SetIcon
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   162
#define sdlh_SDLNet_AddSocket               SDLNet_AddSocket
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   163
#define sdlh_SDLNet_AllocSocketSet          SDLNet_AllocSocketSet
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   164
#define sdlh_SDLNet_CheckSockets            SDLNet_CheckSockets
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   165
#define sdlh_SDLNet_FreeSocketSet           SDLNet_FreeSocketSet
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   166
#define sdlh_SDLNet_Init                    SDLNet_Init
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   167
#define sdlh_SDLNet_Quit                    SDLNet_Quit
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   168
#define sdlh_SDLNet_ResolveHost             SDLNet_ResolveHost
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   169
#define sdlh_SDLNet_TCP_Close               SDLNet_TCP_Close
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   170
#define sdlh_SDLNet_TCP_Open                SDLNet_TCP_Open
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   171
#define sdlh_SDLNet_TCP_Recv                SDLNet_TCP_Recv
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   172
#define sdlh_SDLNet_TCP_Send                SDLNet_TCP_Send
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   173
#define sdlh_TTF_Init                       TTF_Init
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   174
#define sdlh_TTF_OpenFont                   TTF_OpenFont
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   175
#define sdlh_TTF_OpenFontRW                 TTF_OpenFontRW
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   176
#define sdlh_TTF_Quit                       TTF_Quit
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   177
#define sdlh_TTF_RenderUTF8_Blended         TTF_RenderUTF8_Blended
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   178
#define sdlh_TTF_RenderUTF8_Solid           TTF_RenderUTF8_Solid
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   179
#define sdlh_TTF_SetFontStyle               TTF_SetFontStyle
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   180
#define sdlh_TTF_SizeUTF8                   TTF_SizeUTF8
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   181
10129
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   182
#define uphysfslayer_physfsReaderSetBuffer  physfsReaderSetBuffer
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   183
#define uphysfslayer_physfsReader           physfsReader
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   184
#define uphysfslayer_hedgewarsMountPackage  hedgewarsMountPackage
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   185
#define uphysfslayer_hedgewarsMountPackages hedgewarsMountPackages
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   186
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   187
#define uphysfslayer_PHYSFSRWOPS_openRead   PHYSFSRWOPS_openRead
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   188
#define uphysfslayer_PHYSFSRWOPS_openWrite  PHYSFSRWOPS_openWrite
cd2a64a1f4aa - Pas2C: make use of 'external' function decorator
unc0rr
parents: 10128
diff changeset
   189
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   190
#define _strconcat                          fpcrtl_strconcat
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   191
#define _strappend                          fpcrtl_strappend
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   192
#define _strprepend                         fpcrtl_strprepend
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   193
#define _strcompare                         fpcrtl_strcompare
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   194
#define _strncompare                        fpcrtl_strncompare
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   195
#define _strcomparec                        fpcrtl_strcomparec
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   196
#define _chrconcat                          fpcrtl_chrconcat
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   197
#define _pchar                              fpcrtl_pchar
10124
aabd1b75d5a3 Even more explicit type conversions and other stuff to help pas2c use ansistrings
unc0rr
parents: 10015
diff changeset
   198
#define _strconcatA                         fpcrtl_strconcatA
10127
7f29a65aa1e4 It compiles \o/
unc0rr
parents: 10124
diff changeset
   199
#define _strncompareA                       fpcrtl_strncompareA
10128
0f6878b5395a Implement needed rtl functions
unc0rr
parents: 10127
diff changeset
   200
#define _strappendA                         fpcrtl_strappendA
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   201
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   202
// hooks are implemented in javascript
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   203
void start_hook(void);
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   204
void mainloop_hook(void);
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   205
void clear_filelist_hook(void);
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   206
void add_file_hook(const char* ptr);
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   207
void idb_loader_hook();
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   208
void showcursor_hook();
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   209
void hidecursor_hook();
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   210
void drawworld_init_hook();
4feced261c68 partial merge of the webgl branch
koda
parents: 9264
diff changeset
   211
#endif