From ac201b02f10ef558087d50f6b03b4519ab567558 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Mon, 18 Apr 2016 10:42:16 +0300 Subject: [PATCH] put "{$MODE ...}" directive in each source file; removed trailing spaces, and converted tabs to spaces --- src/engine/e_fixedbuffer.pas | 1 + src/engine/e_graphics.pas | 5 +- src/engine/e_input.pas | 3 +- src/engine/e_log.pas | 3 +- src/engine/e_sound.pas | 1 + src/engine/e_sound_sdl.inc | 2 +- src/engine/e_textures.pas | 3 +- src/game/Doom2DF.dpr | 11 ++- src/game/g_basic.pas | 1 + src/game/g_console.pas | 3 +- src/game/g_game.pas | 1 + src/game/g_gfx.pas | 1 + src/game/g_gui.pas | 1 + src/game/g_items.pas | 1 + src/game/g_language.pas | 1 + src/game/g_main.pas | 7 +- src/game/g_map.pas | 1 + src/game/g_menu.pas | 1 + src/game/g_monsters.pas | 1 + src/game/g_net.pas | 1 + src/game/g_nethandler.pas | 1 + src/game/g_netmaster.pas | 1 + src/game/g_netmsg.pas | 1 + src/game/g_options.pas | 1 + src/game/g_panel.pas | 1 + src/game/g_phys.pas | 1 + src/game/g_player.pas | 1 + src/game/g_playermodel.pas | 1 + src/game/g_res_downloader.pas | 1 + src/game/g_saveload.pas | 1 + src/game/g_sound.pas | 1 + src/game/g_textures.pas | 1 + src/game/g_triggers.pas | 1 + src/game/g_weapons.pas | 1 + src/game/g_window.pas | 23 ++--- src/lib/sdl2/LICENSE | 2 +- src/lib/sdl2/README.md | 2 +- src/lib/sdl2/SDL2_gfx.pas | 77 +++++++-------- src/lib/sdl2/SDL2_image.pas | 7 +- src/lib/sdl2/SDL2_mixer.pas | 3 +- src/lib/sdl2/SDL2_net.pas | 150 ++++++++++++++--------------- src/lib/sdl2/SDL2_ttf.pas | 2 +- src/lib/sdl2/jedi.inc | 14 +-- src/lib/sdl2/sdl.inc | 19 ++-- src/lib/sdl2/sdl2.pas | 7 +- src/lib/sdl2/sdlaudio.inc | 3 +- src/lib/sdl2/sdlclipboard.inc | 1 - src/lib/sdl2/sdlcpuinfo.inc | 1 - src/lib/sdl2/sdlevents.inc | 84 ++++++++-------- src/lib/sdl2/sdlgamecontroller.inc | 2 +- src/lib/sdl2/sdlhaptic.inc | 1 - src/lib/sdl2/sdlhints.inc | 9 +- src/lib/sdl2/sdlkeyboard.inc | 16 +-- src/lib/sdl2/sdllog.inc | 50 +++++----- src/lib/sdl2/sdlmessagebox.inc | 3 +- src/lib/sdl2/sdlmouse.inc | 22 ++--- src/lib/sdl2/sdlpixels.inc | 2 +- src/lib/sdl2/sdlrenderer.inc | 2 +- src/lib/sdl2/sdlrwops.inc | 56 +++++------ src/lib/sdl2/sdlscancode.inc | 24 ++--- src/lib/sdl2/sdlsurface.inc | 10 +- src/lib/sdl2/sdlsystem.inc | 4 +- src/lib/sdl2/sdlsyswm.inc | 6 +- src/lib/sdl2/sdltouch.inc | 1 - src/lib/sdl2/sdltype.inc | 2 +- src/lib/sdl2/sdlvideo.inc | 86 ++++++++--------- src/sfs/sfs.pas | 2 +- src/sfs/sfsPlainFS.pas | 2 +- src/sfs/sfsZipFS.pas | 2 +- src/sfs/wadcvt.dpr | 4 +- src/shared/BinEditor.pas | 1 + src/shared/CONFIG.pas | 1 + src/shared/CONFIGSIMPLE.pas | 1 + src/shared/MAPDEF.pas | 1 + src/shared/MAPREADER.pas | 1 + src/shared/MAPSTRUCT.pas | 1 + src/shared/wadreader.pas | 1 + src/shared/xstreams.pas | 2 +- src/sheditor/MAPWRITER.pas | 1 + src/sheditor/WADEDITOR_full.pas | 1 + src/sheditor/WADSTRUCT.pas | 1 + src/sheditor/xstreams_sdl.pas | 2 +- 82 files changed, 409 insertions(+), 369 deletions(-) diff --git a/src/engine/e_fixedbuffer.pas b/src/engine/e_fixedbuffer.pas index 833fd05..3a450bb 100644 --- a/src/engine/e_fixedbuffer.pas +++ b/src/engine/e_fixedbuffer.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit e_fixedbuffer; interface diff --git a/src/engine/e_graphics.pas b/src/engine/e_graphics.pas index f2afd54..898c208 100644 --- a/src/engine/e_graphics.pas +++ b/src/engine/e_graphics.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit e_graphics; interface @@ -392,9 +393,9 @@ begin Result.X := 0; Result.Width := w; Result.Height := h; - + if e_NoGraphics then Exit; - + data := GetMemory(w*h*4); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, e_Textures[ID].tx.id); diff --git a/src/engine/e_input.pas b/src/engine/e_input.pas index b16508f..095a76e 100644 --- a/src/engine/e_input.pas +++ b/src/engine/e_input.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit e_input; interface @@ -247,7 +248,7 @@ end; function e_InitInput(): Boolean; begin Result := False; - + e_JoysticksAvailable := OpenJoysticks(); e_EnableInput := True; GenerateKeyNames(); diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas index e524c1a..1a24990 100644 --- a/src/engine/e_log.pas +++ b/src/engine/e_log.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} {$R-} unit e_log; @@ -60,7 +61,7 @@ begin if WriteTime then OutStr := '['+TimeToStr(Time)+'] '+Prefix+' '+TextLine else - OutStr := Prefix+' '+TextLine; + OutStr := Prefix+' '+TextLine; Writeln(LogFile, OutStr); if e_WriteToStdOut then Writeln(OutStr); diff --git a/src/engine/e_sound.pas b/src/engine/e_sound.pas index 221c5ea..e5c6364 100644 --- a/src/engine/e_sound.pas +++ b/src/engine/e_sound.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit e_sound; {$IFDEF USE_SDLMIXER} diff --git a/src/engine/e_sound_sdl.inc b/src/engine/e_sound_sdl.inc index 0104f3a..4808dbd 100644 --- a/src/engine/e_sound_sdl.inc +++ b/src/engine/e_sound_sdl.inc @@ -163,7 +163,7 @@ begin Result := False; SoundInitialized := False; - + if NoOutput then begin Result := true; Exit end; // wow, this is actually MIDI player! diff --git a/src/engine/e_textures.pas b/src/engine/e_textures.pas index 2a4300b..e53a3ef 100644 --- a/src/engine/e_textures.pas +++ b/src/engine/e_textures.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit e_textures; { This unit provides interface to load 24-bit and 32-bit uncompressed images @@ -101,7 +102,7 @@ begin Result := True; Exit; end; - + glGenTextures(1, @Texture); tex.id := Texture; glBindTexture(GL_TEXTURE_2D, Texture); diff --git a/src/game/Doom2DF.dpr b/src/game/Doom2DF.dpr index 5a10057..ac174d8 100644 --- a/src/game/Doom2DF.dpr +++ b/src/game/Doom2DF.dpr @@ -1,6 +1,7 @@ +{$MODE DELPHI} program Doom2DF; {$IFNDEF HEADLESS} - {$IFDEF WIN32} + {$IFDEF WINDOWS} {$APPTYPE GUI} {$ENDIF} {$ENDIF} @@ -42,11 +43,11 @@ uses e_sound in '../engine/e_sound.pas', e_textures in '../engine/e_textures.pas', e_fixedbuffer in '../engine/e_fixedbuffer.pas', + utils in '../shared/utils.pas', + xstreams in '../shared/xstreams.pas', sfs in '../sfs/sfs.pas', sfsPlainFS in '../sfs/sfsPlainFS.pas', sfsZipFS in '../sfs/sfsZipFS.pas', - xstreams in '../shared/xstreams.pas', - utils in '../shared/utils.pas', wadreader in '../shared/wadreader.pas', MAPSTRUCT in '../shared/MAPSTRUCT.pas', MAPREADER in '../shared/MAPREADER.pas', @@ -77,7 +78,7 @@ uses g_triggers in 'g_triggers.pas', g_weapons in 'g_weapons.pas', g_window in 'g_window.pas', - sysutils, + SysUtils, {$IFDEF USE_FMOD} fmod in '../lib/FMOD/fmod.pas', fmoderrors in '../lib/FMOD/fmoderrors.pas', @@ -88,7 +89,7 @@ uses g_panel in 'g_panel.pas', g_language in 'g_language.pas'; -{$IFDEF WIN32} +{$IFDEF WINDOWS} {$R *.res} {$R CustomRes.res} {$ENDIF} diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas index 69d8aa7..6a29d61 100644 --- a/src/game/g_basic.pas +++ b/src/game/g_basic.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_basic; interface diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 31bce9a..8b9ef25 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_console; interface @@ -832,7 +833,7 @@ begin Time := MsgTime; end; end; - + {$IFDEF HEADLESS} e_WriteLog('CON: ' + L, MSG_NOTIFY); {$ENDIF} diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 4a8afe8..54046f0 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_game; interface diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index f655889..87b60c1 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_gfx; interface diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas index e26ad7c..973def6 100644 --- a/src/game/g_gui.pas +++ b/src/game/g_gui.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_gui; interface diff --git a/src/game/g_items.pas b/src/game/g_items.pas index c536181..30de468 100644 --- a/src/game/g_items.pas +++ b/src/game/g_items.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_items; interface diff --git a/src/game/g_language.pas b/src/game/g_language.pas index f687aa3..5762a52 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_language; interface diff --git a/src/game/g_main.pas b/src/game/g_main.pas index 48f0bb5..969167f 100644 --- a/src/game/g_main.pas +++ b/src/game/g_main.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_main; interface @@ -43,7 +44,7 @@ begin e_WriteLog('Read config file', MSG_NOTIFY); g_Options_Read(GameDir + '/' + CONFIG_FILENAME); - + e_WriteToStdOut := {$IFDEF HEADLESS}True;{$ELSE}False;{$ENDIF} //GetSystemDefaultLCID() @@ -52,7 +53,7 @@ begin //g_Language_Load(DataDir + gLanguage + '.txt'); e_WriteLog(gLanguage, MSG_NOTIFY); g_Language_Set(gLanguage); - + {$IFDEF HEADLESS} sdlflags := SDL_INIT_TIMER or $00004000; {$ELSE} @@ -64,7 +65,7 @@ begin {$ENDIF} if SDL_Init(sdlflags) < 0 then raise Exception.Create('SDL: Init failed: ' + SDL_GetError()); - + {$IFDEF HEADLESS} SDL_StartTextInput(); {$ENDIF} diff --git a/src/game/g_map.pas b/src/game/g_map.pas index 7b1b1d7..25b1bfe 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_map; interface diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index be5f432..62e4e8d 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_menu; interface diff --git a/src/game/g_monsters.pas b/src/game/g_monsters.pas index e47c0ff..fb8ee7c 100644 --- a/src/game/g_monsters.pas +++ b/src/game/g_monsters.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_monsters; interface diff --git a/src/game/g_net.pas b/src/game/g_net.pas index 1219448..72cbb9a 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_net; interface diff --git a/src/game/g_nethandler.pas b/src/game/g_nethandler.pas index c25b314..76a4a5d 100644 --- a/src/game/g_nethandler.pas +++ b/src/game/g_nethandler.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_nethandler; interface diff --git a/src/game/g_netmaster.pas b/src/game/g_netmaster.pas index c5e792b..916f7cd 100644 --- a/src/game/g_netmaster.pas +++ b/src/game/g_netmaster.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_netmaster; interface diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 9df97c1..90b25ff 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_netmsg; interface diff --git a/src/game/g_options.pas b/src/game/g_options.pas index c24efc2..b308b04 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_options; interface diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index c3db76e..d1a2c3b 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_panel; interface diff --git a/src/game/g_phys.pas b/src/game/g_phys.pas index 90e330d..a22cd17 100644 --- a/src/game/g_phys.pas +++ b/src/game/g_phys.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_phys; interface diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 28c28b1..5dc5a09 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_player; interface diff --git a/src/game/g_playermodel.pas b/src/game/g_playermodel.pas index dd66ccd..7cb1eda 100644 --- a/src/game/g_playermodel.pas +++ b/src/game/g_playermodel.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_playermodel; interface diff --git a/src/game/g_res_downloader.pas b/src/game/g_res_downloader.pas index 77db011..05dfc24 100644 --- a/src/game/g_res_downloader.pas +++ b/src/game/g_res_downloader.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_res_downloader; interface diff --git a/src/game/g_saveload.pas b/src/game/g_saveload.pas index 980cef8..3a1cecd 100644 --- a/src/game/g_saveload.pas +++ b/src/game/g_saveload.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_saveload; interface diff --git a/src/game/g_sound.pas b/src/game/g_sound.pas index 48c5167..0632efd 100644 --- a/src/game/g_sound.pas +++ b/src/game/g_sound.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_sound; interface diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index a6ea764..fba31e4 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_textures; interface diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index 8e8cf44..89adae4 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_triggers; interface diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index e63de3c..f923b2d 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_weapons; interface diff --git a/src/game/g_window.pas b/src/game/g_window.pas index cbc1028..29f79e4 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit g_window; interface @@ -78,7 +79,7 @@ begin Result := True; Exit; {$ENDIF} - + Result := False; e_WriteLog('Setting display mode...', MSG_NOTIFY); @@ -86,13 +87,13 @@ begin wFlags := SDL_WINDOW_OPENGL or SDL_WINDOW_RESIZABLE; if gFullscreen then wFlags := wFlags or SDL_WINDOW_FULLSCREEN; if gWinMaximized then wFlags := wFlags or SDL_WINDOW_MAXIMIZED; - + if h_Wnd <> nil then begin SDL_DestroyWindow(h_Wnd); h_Wnd := nil; end; - + if gFullscreen then begin mode.w := gScreenWidth; @@ -114,7 +115,7 @@ begin h_Wnd := SDL_CreateWindow(PChar(wTitle), gWinRealPosX, gWinRealPosY, gScreenWidth, gScreenHeight, wFlags); if h_Wnd = nil then Exit; - + SDL_GL_MakeCurrent(h_Wnd, h_GL); SDL_ShowCursor(SDL_DISABLE); @@ -205,7 +206,7 @@ begin Result := False; wActivate := False; wDeactivate := False; - + case ev.event of SDL_WINDOWEVENT_MOVED: begin @@ -215,7 +216,7 @@ begin gWinRealPosY := ev.data2; end; end; - + SDL_WINDOWEVENT_MINIMIZED: begin if not wMinimized then @@ -231,7 +232,7 @@ begin wDeactivate := True; end; end; - + SDL_WINDOWEVENT_RESIZED: begin gScreenWidth := ev.data1; @@ -244,10 +245,10 @@ begin e_WriteLog('[DEBUG] WinMsgs: Resized to ' + IntToStr(ev.data1) + 'x' + IntToStr(ev.data2), MSG_NOTIFY); end; end; - + SDL_WINDOWEVENT_EXPOSED: SwapBuffers(); - + SDL_WINDOWEVENT_MAXIMIZED: begin if wMinimized then @@ -266,7 +267,7 @@ begin end; end; end; - + SDL_WINDOWEVENT_RESTORED: begin if wMinimized then @@ -375,7 +376,7 @@ begin key := ev.key.keysym.scancode; KeyPress(key); end; - + SDL_TEXTINPUT: begin Utf8ToUnicode(@uc, PChar(ev.text.text), 1); diff --git a/src/lib/sdl2/LICENSE b/src/lib/sdl2/LICENSE index 14e2f77..a612ad9 100644 --- a/src/lib/sdl2/LICENSE +++ b/src/lib/sdl2/LICENSE @@ -35,7 +35,7 @@ Mozilla Public License Version 2.0 means any form of the work other than Source Code Form. 1.7. "Larger Work" - means a work that combines Covered Software with other material, in + means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" diff --git a/src/lib/sdl2/README.md b/src/lib/sdl2/README.md index 9c5f9b9..9c4db9d 100644 --- a/src/lib/sdl2/README.md +++ b/src/lib/sdl2/README.md @@ -1,4 +1,4 @@ Pascal-SDL-2-Headers ==================== -This are the Pascal SDL 2 Headers. \ No newline at end of file +This are the Pascal SDL 2 Headers. diff --git a/src/lib/sdl2/SDL2_gfx.pas b/src/lib/sdl2/SDL2_gfx.pas index 1d97b55..3a1936c 100644 --- a/src/lib/sdl2/SDL2_gfx.pas +++ b/src/lib/sdl2/SDL2_gfx.pas @@ -1,10 +1,11 @@ +{$MODE DELPHI} unit SDL2_gfx; (* SDL2_framerate.h: framerate manager SDL2_gfxPrimitives.h: graphics primitives for SDL -SDL2_imageFilter.h: byte-image "filter" routines +SDL2_imageFilter.h: byte-image "filter" routines SDL2_rotozoom.h: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces Copyright (C) 2001-2012 Andreas Schiffler @@ -86,10 +87,10 @@ Const FPS_DEFAULT = 30; Type - {*! - \brief Structure holding the state and timing information of the framerate controller. + {*! + \brief Structure holding the state and timing information of the framerate controller. *} - + TFPSManager = record framecount : uInt32; rateticks : Single; // float rateticks; @@ -97,7 +98,7 @@ Type lastticks : uInt32; rate : uInt32; end; - + PFPSManager = ^TFPSManager; Procedure SDL_initFramerate(manager: PFPSManager); @@ -105,10 +106,10 @@ Procedure SDL_initFramerate(manager: PFPSManager); Function SDL_setFramerate(manager: PFPSManager; rate: uInt32):sInt32; external GFX_LibName {$IFDEF DELMAC} name '_SDL_setFramerate' {$ENDIF}; - + Function SDL_getFramerate(manager: PFPSManager):sInt32; external GFX_LibName {$IFDEF DELMAC} name '_SDL_getFramerate' {$ENDIF}; - + Function SDL_getFramecount(manager: PFPSManager):sInt32; external GFX_LibName {$IFDEF DELMAC} name '_SDL_getFramecount' {$ENDIF}; @@ -130,7 +131,7 @@ Const Function pixelColor(renderer: PSDL_Renderer; x, y: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_pixelColor' {$ENDIF}; - + Function pixelRGBA(renderer: PSDL_Renderer; x, y: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_pixelRGBA' {$ENDIF}; @@ -138,7 +139,7 @@ Function pixelRGBA(renderer: PSDL_Renderer; x, y: sInt16; r, g, b, a: uInt8):sIn Function hlineColor(renderer: PSDL_Renderer; x1, x2, y: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_hlineColor' {$ENDIF}; - + Function hlineRGBA(renderer: PSDL_Renderer; x1, x2, y:sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_hlineRGBA' {$ENDIF}; @@ -146,7 +147,7 @@ Function hlineRGBA(renderer: PSDL_Renderer; x1, x2, y:sInt16; r, g, b, a: uInt8) Function vlineColor(renderer: PSDL_Renderer; x, y1, y2: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_vlineColor' {$ENDIF}; - + Function vlineRGBA(renderer: PSDL_Renderer; x, y1, y2: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_vlineRGBA' {$ENDIF}; @@ -154,7 +155,7 @@ Function vlineRGBA(renderer: PSDL_Renderer; x, y1, y2: sInt16; r, g, b, a: uInt8 Function rectangleColor(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_rectangleColor' {$ENDIF}; - + Function rectangleRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_rectangleRGBA' {$ENDIF}; @@ -162,7 +163,7 @@ Function rectangleRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, Function roundedRectangleColor(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_roundedRectangleColor' {$ENDIF}; - + Function roundedRectangleRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_roundedRectangleRGBA' {$ENDIF}; @@ -170,7 +171,7 @@ Function roundedRectangleRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: sInt Function boxColor(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_boxColor' {$ENDIF}; - + Function boxRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_boxRGBA' {$ENDIF}; @@ -178,7 +179,7 @@ Function boxRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, a: uI Function roundedBoxColor(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_roundedBoxColor' {$ENDIF}; - + Function roundedBoxRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_roundedBoxRGBA' {$ENDIF}; @@ -186,7 +187,7 @@ Function roundedBoxRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: sInt16; r, Function lineColor(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_lineColor' {$ENDIF}; - + Function lineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_lineRGBA' {$ENDIF}; @@ -194,14 +195,14 @@ Function lineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, a: u Function aalineColor(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aalineColor' {$ENDIF}; - + Function aalineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aalineRGBA' {$ENDIF}; { Thick Line } Function thickLineColor(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; width: uInt8; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_thickLineColor' {$ENDIF}; - + Function thickLineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; width, r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_thickLineRGBA' {$ENDIF}; @@ -209,7 +210,7 @@ Function thickLineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: sInt16; width, r Function circleColor(renderer: PSDL_Renderer; x, y, rad: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_circleColor' {$ENDIF}; - + Function circleRGBA(renderer: PSDL_Renderer; x, y, rad: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_circleRGBA' {$ENDIF}; @@ -217,7 +218,7 @@ Function circleRGBA(renderer: PSDL_Renderer; x, y, rad: sInt16; r, g, b, a: uInt Function arcColor(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_arcColor' {$ENDIF}; - + Function arcRGBA(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_arcRGBA' {$ENDIF}; @@ -225,7 +226,7 @@ Function arcRGBA(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; r, g Function aacircleColor(renderer: PSDL_Renderer; x, y, rad: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aacircleColor' {$ENDIF}; - + Function aacircleRGBA(renderer: PSDL_Renderer; x, y, rad: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aacircleRGBA' {$ENDIF}; @@ -233,7 +234,7 @@ Function aacircleRGBA(renderer: PSDL_Renderer; x, y, rad: sInt16; r, g, b, a: uI Function filledCircleColor(renderer: PSDL_Renderer; x, y, rad: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledCircleColor' {$ENDIF}; - + Function filledCircleRGBA(renderer: PSDL_Renderer; x, y, rad: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledCircleRGBA' {$ENDIF}; @@ -241,7 +242,7 @@ Function filledCircleRGBA(renderer: PSDL_Renderer; x, y, rad: sInt16; r, g, b, a Function ellipseColor(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_ellipseColor' {$ENDIF}; - + Function ellipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_ellipseRGBA' {$ENDIF}; @@ -249,7 +250,7 @@ Function ellipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; r, g, b, a: Function aaellipseColor(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aaellipseColor' {$ENDIF}; - + Function aaellipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aaellipseRGBA' {$ENDIF}; @@ -257,7 +258,7 @@ Function aaellipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; r, g, b, a Function filledEllipseColor(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledEllipseColor' {$ENDIF}; - + Function filledEllipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledEllipseRGBA' {$ENDIF}; @@ -265,7 +266,7 @@ Function filledEllipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: sInt16; r, g, Function pieColor(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_pieColor' {$ENDIF}; - + Function pieRGBA(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_pieRGBA' {$ENDIF}; @@ -273,7 +274,7 @@ Function pieRGBA(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; r, g Function filledPieColor(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledPieColor' {$ENDIF}; - + Function filledPieRGBA(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledPieRGBA' {$ENDIF}; @@ -281,7 +282,7 @@ Function filledPieRGBA(renderer: PSDL_Renderer; x, y, rad, start, finish: sInt16 Function trigonColor(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_trigonColor' {$ENDIF}; - + Function trigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_trigonRGBA' {$ENDIF}; @@ -289,7 +290,7 @@ Function trigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; r, Function aatrigonColor(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aatrigonColor' {$ENDIF}; - + Function aatrigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aatrigonRGBA' {$ENDIF}; @@ -297,7 +298,7 @@ Function aatrigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; Function filledTrigonColor(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledTrigonColor' {$ENDIF}; - + Function filledTrigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt16; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledTrigonRGBA' {$ENDIF}; @@ -305,7 +306,7 @@ Function filledTrigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: sInt1 Function polygonColor(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_polygonColor' {$ENDIF}; - + Function polygonRGBA(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_polugonRGBA' {$ENDIF}; @@ -313,7 +314,7 @@ Function polygonRGBA(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; Function aapolygonColor(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aapolygonColor' {$ENDIF}; - + Function aapolygonRGBA(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_aapolygonRGBA' {$ENDIF}; @@ -321,7 +322,7 @@ Function aapolygonRGBA(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32 Function filledPolygonColor(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledPolygonColor' {$ENDIF}; - + Function filledPolygonRGBA(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt32; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_filledPolygonRGBA' {$ENDIF}; @@ -334,7 +335,7 @@ Function texturedPolygon(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n: sInt Function bezierColor(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n, s: sInt32; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_bezierColor' {$ENDIF}; - + Function bezierRGBA(renderer: PSDL_Renderer; Const vx, vy: PsInt16; n, s: sInt32; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_bezierRGBA' {$ENDIF}; @@ -349,14 +350,14 @@ Procedure gfxPrimitivesSetFontRotation(rotation: uInt32); cdecl; Function characterColor(renderer: PSDL_Renderer; x, y: sInt16; c: Char; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_characterColor' {$ENDIF}; - + Function characterRGBA(renderer: PSDL_Renderer; x, y: sInt16; c: Char; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_characterRGBA' {$ENDIF}; - - + + Function stringColor(renderer: PSDL_Renderer; x, y: sInt16; Const str: PChar; colour: uInt32):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_stringColor' {$ENDIF}; - + Function stringRGBA(renderer: PSDL_Renderer; x, y: sInt16; Const syt: PChar; r, g, b, a: uInt8):sInt32; cdecl; external GFX_LibName {$IFDEF DELMAC} name '_stringRGBA' {$ENDIF}; @@ -376,7 +377,7 @@ Function SDL_imageFilterMMXdetect():sInt32; cdecl; // Force use of MMX off (or turn possible use back on) Procedure SDL_imageFilterMMXoff(); cdecl; external GFX_LibName {$IFDEF DELMAC} name '_SDL_imageFilterMMXoff' {$ENDIF}; - + Procedure SDL_imageFilterMMXon(); cdecl; external GFX_LibName {$IFDEF DELMAC} name '_SDL_imageFilterMMXon' {$ENDIF}; diff --git a/src/lib/sdl2/SDL2_image.pas b/src/lib/sdl2/SDL2_image.pas index 7afdfe6..81a8cb1 100644 --- a/src/lib/sdl2/SDL2_image.pas +++ b/src/lib/sdl2/SDL2_image.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit sdl2_image; {* @@ -27,7 +28,7 @@ unit sdl2_image; ChangeLog (Header-Translation): ------------------------------- - v.1.72-stable; 29.09.2013: fixed bug with procedure without parameters + v.1.72-stable; 29.09.2013: fixed bug with procedure without parameters (they must have brackets) v.1.70-stable; 11.09.2013: MacOS compatibility (with Delphi) v.1.33-Alpha; 31.07.2013: Initial Commit @@ -79,10 +80,10 @@ const procedure SDL_IMAGE_VERSION(Out X: TSDL_Version); {* This function gets the version of the dynamically linked SDL_image library. - * + * * Note that this function does NOT allocate a new TSDL_Version and fill it with info, * but returns a pointer to a TSDL_Version residing inside dynlinked file. - * + * * As such, attempting to Dispose() of this memory will result in access violation. *} function IMG_Linked_Version: PSDL_Version cdecl; external IMG_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_IMG_Linked_Version' {$ENDIF} {$ENDIF}; diff --git a/src/lib/sdl2/SDL2_mixer.pas b/src/lib/sdl2/SDL2_mixer.pas index 56b7cae..928d5d6 100644 --- a/src/lib/sdl2/SDL2_mixer.pas +++ b/src/lib/sdl2/SDL2_mixer.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit SDL2_mixer; {* @@ -25,7 +26,7 @@ unit SDL2_mixer; ---------- v.1.72-stable; 29.09.2013: fixed bug with procedures without parameters - (they must have brackets) + (they must have brackets) v.1.70-stable; 16.09.2013: Initial Commit *} diff --git a/src/lib/sdl2/SDL2_net.pas b/src/lib/sdl2/SDL2_net.pas index 5f1309a..da3916f 100644 --- a/src/lib/sdl2/SDL2_net.pas +++ b/src/lib/sdl2/SDL2_net.pas @@ -1,18 +1,19 @@ - +{$MODE DELPHI} + {* SDL_net: An example cross-platform network library for use with SDL Copyright (C) 1997-2013 Sam Lantinga Copyright (C) 2012 Simeon Maxein - + This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - + Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be @@ -22,18 +23,18 @@ 3. This notice may not be removed or altered from any source distribution. *} unit SDL2_net; - + {$INCLUDE jedi.inc} - + interface - + uses SDL2; - + const {$IFDEF WINDOWS} SDLNet_LibName = 'SDL2_net.dll'; {$ENDIF} - + {$IFDEF UNIX} {$IFDEF DARWIN} SDLNet_LibName = 'libSDL2_net.dylib'; @@ -45,52 +46,52 @@ {$ENDIF} {$ENDIF} {$ENDIF} - + {$IFDEF MACOS} SDLNet_LibName = 'SDL2_net'; {$IFDEF FPC} {$linklib libSDL2_net} {$ENDIF} {$ENDIF} - - + + type TSDLNet_Version = TSDL_Version; - + const {* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *} SDL_NET_MAJOR_VERSION = 2; SDL_NET_MINOR_VERSION = 0; SDL_NET_PATCHLEVEL = 0; - + {* This macro can be used to fill a version structure with the compile-time * version of the SDL_net library. *} procedure SDL_NET_VERSION(Out X: TSDL_Version); - + {* This function gets the version of the dynamically linked SDL_net library. it should NOT be used to fill a version structure, instead you should use the SDL_NET_VERSION() macro. *} procedure SDLNet_Linked_Version() cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_Linked_Version' {$ENDIF} {$ENDIF}; - + {* Initialize/Cleanup the network API SDL must be initialized before calls to functions in this library, because this library uses utility functions from the SDL library. *} function SDLNet_Init(): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_Init' {$ENDIF} {$ENDIF}; procedure SDLNet_Quit() cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_Quit' {$ENDIF} {$ENDIF}; - + type {***********************************************************************} {* IPv4 hostname resolution API *} {***********************************************************************} TIPaddress = record host: UInt32; {* 32-bit IPv4 host address *} - port: UInt16; {* 16-bit protocol port *} + port: UInt16; {* 16-bit protocol port *} end; PIPaddress = ^TIPaddress; - + {* Resolve a host name and port to an IP address in network form. If the function succeeds, it will return 0. If the host couldn't be resolved, the host portion of the returned @@ -102,21 +103,21 @@ INADDR_NONE = $FFFFFFFF; INADDR_LOOPBACK = $7f000001; INADDR_BROADCAST = $FFFFFFFF; - + function SDLNet_ResolveHost(address: PIPaddress; const host: PAnsiChar; port: UInt16): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_ResolveHost' {$ENDIF} {$ENDIF}; - + {* Resolve an ip address to a host name in canonical form. If the ip couldn't be resolved, this function returns NULL, otherwise a pointer to a static buffer containing the hostname is returned. Note that this function is not thread-safe. *} function SDLNet_ResolveIP(const ip: PIPaddress): PAnsiChar cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_ResolveIP' {$ENDIF} {$ENDIF}; - + {* Get the addresses of network interfaces on this system. This returns the number of addresses saved in 'addresses' *} function SDLNet_GetLocalAddresses(addresses: PIPaddress; maxcount: Integer): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_GetLocalAddresses' {$ENDIF} {$ENDIF}; - + {***********************************************************************} {* TCP network API *} {***********************************************************************} @@ -124,7 +125,7 @@ _TCPSocket = record end; TTCPSocket = ^_TCPSocket; - + {* Open a TCP network socket If ip.host is INADDR_NONE or INADDR_ANY, this creates a local server socket on the given port, otherwise a TCP connection to the remote @@ -134,24 +135,24 @@ The newly created socket is returned, or NULL if there was an error. *} function SDLNet_TCP_Open(ip: PIPaddress): TTCPSocket cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_TCP_Open' {$ENDIF} {$ENDIF}; - + {* Accept an incoming connection on the given server socket. The newly created socket is returned, or NULL if there was an error. *} function SDLNet_TCP_Accept(server: TTCPSocket): TTCPSocket cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_TCP_Accept' {$ENDIF} {$ENDIF}; - + {* Get the IP address of the remote system associated with the socket. If the socket is a server socket, this function returns NULL. *} function SDLNet_TCP_GetPeerAddress(sock: TTCPSocket): PIPaddress cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_TCP_GetPeerAddress' {$ENDIF} {$ENDIF}; - + {* Send 'len' bytes of 'data' over the non-server socket 'sock' This function returns the actual amount of data sent. If the return value is less than the amount of data sent, then either the remote connection was closed, or an unknown socket error occurred. *} function SDLNet_TCP_Send(sock: TTCPSocket; const data: Pointer; len: Integer): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_TCP_Send' {$ENDIF} {$ENDIF}; - + {* Receive up to 'maxlen' bytes of data over the non-server socket 'sock', and store them in the buffer pointed to by 'data'. This function returns the actual amount of data received. If the return @@ -159,25 +160,25 @@ closed, or an unknown socket error occurred. *} function SDLNet_TCP_Recv(sock: TTCPSocket; data: Pointer; maxlen: Integer): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_TCP_Recv' {$ENDIF} {$ENDIF}; - + {* Close a TCP network socket *} procedure SDLNet_TCP_Close(sock: TTCPSocket) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_TCP_Close' {$ENDIF} {$ENDIF}; - + {***********************************************************************} {* UDP network API *} {***********************************************************************} - + const {* The maximum channels on a a UDP socket *} SDLNET_MAX_UDPCHANNELS = 32; {* The maximum addresses bound to a single UDP socket channel *} SDLNET_MAX_UDPADDRESSES = 4; - + type TUDPSocket = record end; PUDPSocket = ^TUDPSocket; - + TUDPPacket = record channel: Integer; {* The src/dst channel of the packet *} data: PUInt8; {* The packet data *} @@ -188,14 +189,14 @@ end; PUDPPacket = ^TUDPPacket; PPUDPPacket = ^PUDPPacket; - + {* Allocate/resize/free a single UDP packet 'size' bytes long. The new packet is returned, or NULL if the function ran out of memory. *} function SDLNet_AllocPacket(size: Integer): PUDPPacket cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_AllocPacket' {$ENDIF} {$ENDIF}; function SDLNet_ResizePacket(packet: PUDPPacket; newsize: Integer): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_ResizePacket' {$ENDIF} {$ENDIF}; procedure SDLNet_FreePacket(packet: PUDPPacket) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_FreePacket' {$ENDIF} {$ENDIF}; - + {* Allocate/Free a UDP packet vector (array of packets) of 'howmany' packets, each 'size' bytes long. A pointer to the first packet in the array is returned, or NULL if the @@ -203,7 +204,7 @@ *} function SDLNet_AllocPacketV(howmany: Integer; size: Integer): PPUDPPacket cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_AllocPacketV' {$ENDIF} {$ENDIF}; procedure SDLNet_FreePacketV(packetV: PPUDPPacket) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_FreePacketV' {$ENDIF} {$ENDIF}; - + {* Open a UDP network socket If 'port' is non-zero, the UDP socket is bound to a local port. The 'port' should be given in native byte order, but is used @@ -211,10 +212,10 @@ This allows other systems to send to this socket via a known port. *} function SDLNet_UDP_Open(port: UInt16): TUDPSocket cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_Open' {$ENDIF} {$ENDIF}; - + {* Set the percentage of simulated packet loss for packets sent on the socket. *} procedure SDLNet_UDP_SetPacketLoss(sock: TUDPSocket; percent: Integer) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_SetPacketLoss' {$ENDIF} {$ENDIF}; - + {* Bind the address 'address' to the requested channel on the UDP socket. If the channel is -1, then the first unbound channel that has not yet been bound to the maximum number of addresses will be bound with @@ -226,10 +227,10 @@ This function returns the channel which was bound, or -1 on error. *} function SDLNet_UDP_Bind(sock: TUDPSocket; channel: Integer; const address: PIPaddress): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_Bind' {$ENDIF} {$ENDIF}; - + {* Unbind all addresses from the given channel *} procedure SDLNet_UDP_Unbind(sock: TUDPSocket; channel: Integer) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_Unbind' {$ENDIF} {$ENDIF}; - + {* Get the primary IP address of the remote system associated with the socket and channel. If the channel is -1, then the primary IP port of the UDP socket is returned -- this is only meaningful for sockets @@ -237,7 +238,7 @@ If the channel is not bound and not -1, this function returns NULL. *} function SDLNet_UDP_GetPeerAddress(sock: TUDPSocket; channel: Integer): PIPaddress cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_GetPeerAddress' {$ENDIF} {$ENDIF}; - + {* Send a vector of packets to the the channels specified within the packet. If the channel specified in the packet is -1, the packet will be sent to the address in the 'src' member of the packet. @@ -246,21 +247,21 @@ This function returns the number of packets sent. *} function SDLNet_UDP_SendV(sock: TUDPSocket; packets: PPUDPPacket; npackets: Integer): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_SendV' {$ENDIF} {$ENDIF}; - + {* Send a single packet to the specified channel. If the channel specified in the packet is -1, the packet will be sent to the address in the 'src' member of the packet. The packet will be updated with the status of the packet after it has been sent. This function returns 1 if the packet was sent, or 0 on error. - + NOTE: The maximum size of the packet is limited by the MTU (Maximum Transfer Unit) of the transport medium. It can be as low as 250 bytes for some PPP links, and as high as 1500 bytes for ethernet. *} function SDLNet_UDP_Send(sock: TUDPSocket; channel: Integer; packet: PUDPPacket): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_Send' {$ENDIF} {$ENDIF}; - + {* Receive a vector of pending packets from the UDP socket. The returned packets contain the source address and the channel they arrived on. If they did not arrive on a bound channel, the the channel will be set @@ -272,7 +273,7 @@ on error. This function does not block, so can return 0 packets pending. *} function SDLNet_UDP_RecvV(sock: TUDPSocket; packets: PPUDPPacket): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_RecvV' {$ENDIF} {$ENDIF}; - + {* Receive a single packet from the UDP socket. The returned packet contains the source address and the channel it arrived on. If it did not arrive on a bound channel, the the channel will be set @@ -284,41 +285,41 @@ on error. This function does not block, so can return 0 packets pending. *} function SDLNet_UDP_Recv(sock: TUDPSocket; packet: PUDPPacket): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_Recv' {$ENDIF} {$ENDIF}; - + {* Close a UDP network socket *} procedure SDLNet_UDP_Close(sock: TUDPSocket) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_UDP_Close' {$ENDIF} {$ENDIF}; - + {***********************************************************************} {* Hooks for checking sockets for available data *} {***********************************************************************} - + type TSDLNet_SocketSet = record end; PSDLNet_SocketSet = ^TSDLNet_SocketSet; - + {* Any network socket can be safely cast to this socket type *} TSDLNet_GenericSocket = record ready: Integer; end; PSDLNet_GenericSocket = ^TSDLNet_GenericSocket; - + {* Allocate a socket set for use with SDLNet_CheckSockets() This returns a socket set for up to 'maxsockets' sockets, or NULL if the function ran out of memory. *} function SDLNet_AllocSocketSet(maxsockets: Integer): TSDLNet_GenericSocket cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_AllocSocketSet' {$ENDIF} {$ENDIF}; - + {* Add a socket to a set of sockets to be checked for available data *} function SDLNet_AddSocket(set_: TSDLNet_SocketSet; sock: TSDLNet_GenericSocket): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_AddSocket' {$ENDIF} {$ENDIF}; //function SDLNet_TCP_AddSocket(set_: TSDLNet_SocketSet; sock: TTCPSocket): Integer; inline; //function SDLNet_UDP_AddSocket(set_: TSDLNet_SocketSet; sock: TUDPSocket): Integer; inline; - + {* Remove a socket from a set of sockets to be checked for available data *} function SDLNet_DelSocket(set_: TSDLNet_SocketSet; sock: TSDLNet_GenericSocket): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_DelSocket' {$ENDIF} {$ENDIF}; //function SDLNet_TCP_DelSocket(set_: TSDLNet_SocketSet; sock: TTCPSocket): Integer; inline; //function SDLNet_UDP_DelSocket(set_: TSDLNet_SocketSet; sock: TUDPSocket): Integer; inline; - + {* This function checks to see if data is available for reading on the given set of sockets. If 'timeout' is 0, it performs a quick poll, otherwise the function returns when either data is available for @@ -327,103 +328,102 @@ or -1 if there was an error with the select() system call. *} function SDLNet_CheckSockets(set_: TSDLNet_SocketSet; timeout: UInt32): Integer cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_CheckSockets' {$ENDIF} {$ENDIF}; - + {* After calling SDLNet_CheckSockets(), you can use this function on a socket that was in the socket set, to find out if data is available for reading. *} function SDLNet_SocketReady(sock: TSDLNet_GenericSocket): Integer; {$IFNDEF DELPHI} inline; {$ELSE} {$IFDEF DELPHI10UP} inline; {$ENDIF} {$ENDIF}; - + {* Free a set of sockets allocated by SDL_NetAllocSocketSet() *} procedure SDLNet_FreeSocketSet(set_: TSDLNet_SocketSet) cdecl; external SDLNet_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDLNet_FreeSocketSet' {$ENDIF} {$ENDIF}; - + {***********************************************************************} {* Error reporting functions *} {***********************************************************************} - + procedure SDLNet_SetError(const fmt: PAnsiChar); cdecl; function SDLNet_GetError(): PAnsiChar; cdecl; - + {***********************************************************************} {* Inline functions to read/write network data *} {***********************************************************************} - + {* Write a 16/32-bit value to network packet buffer *} - + //procedure SDLNet_Write16(value: UInt16; areap: Pointer); inline; //procedure SDLNet_Write32(value: UInt32; areap: Pointer); inline; - + {* Read a 16/32-bit value from network packet buffer *} //function SDLNet_Read16(const areap: Pointer): UInt16; inline; //function SDLNet_Read32(const areap: Pointer): UInt32; inline; - + implementation - + procedure SDL_NET_VERSION(Out X: TSDL_Version); begin X.major := SDL_NET_MAJOR_VERSION; X.minor := SDL_NET_MINOR_VERSION; X.patch := SDL_NET_PATCHLEVEL; end; - + (* function SDLNet_TCP_AddSocket(set_: TSDLNet_SocketSet; sock: TTCPSocket): Integer; begin Result := SDLNet_AddSocket(set_, TSDLNet_GenericSocket(sock)); end; - + function SDLNet_UDP_AddSocket(set_: TSDLNet_SocketSet; sock: TUDPSocket): Integer; begin Result := SDLNet_AddSocket(set_, TSDLNet_GenericSocket(sock)); end; - + function SDLNet_TCP_DelSocket(set_: TSDLNet_SocketSet; sock: TTCPSocket): Integer; begin Result := SDLNet_DelSocket(set_, TSDLNet_GenericSocket(sock)); end; - + function SDLNet_UDP_DelSocket(set_: TSDLNet_SocketSet; sock: TUDPSocket): Integer; begin Result := SDLNet_DelSocket(set_, TSDLNet_GenericSocket(sock)); end; *) - + function SDLNet_SocketReady(sock: TSDLNet_GenericSocket): Integer; begin Result := sock.ready; end; - + procedure SDLNet_SetError(const fmt: PAnsiChar); cdecl; begin SDL_SetError(fmt); end; - + function SDLNet_GetError(): PAnsiChar; cdecl; begin Result := SDL_GetError(); end; - + (* procedure SDLNet_Write16(value: UInt16; areap: Pointer); begin PUInt16(areap) := SDL_SwapBE16(value); end; - + procedure SDLNet_Write32(value: UInt32; areap: Pointer); begin PUInt32(areap) := SDL_SwapBE32(value); end; - + {* Read a 16/32-bit value from network packet buffer *} function SDLNet_Read16(const areap: Pointer): UInt16; begin Result := SDL_SwapBE16(PUInt16(areap)); end; - + function SDLNet_Read32(const areap: Pointer): UInt32; begin Result := SDL_SwapBE32(PUInt32(areap)); end; *) end. - diff --git a/src/lib/sdl2/SDL2_ttf.pas b/src/lib/sdl2/SDL2_ttf.pas index 420c6a9..b53cdc4 100644 --- a/src/lib/sdl2/SDL2_ttf.pas +++ b/src/lib/sdl2/SDL2_ttf.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit sdl2_ttf; {* @@ -303,4 +304,3 @@ begin end; end. - diff --git a/src/lib/sdl2/jedi.inc b/src/lib/sdl2/jedi.inc index 0f7cbac..034429f 100644 --- a/src/lib/sdl2/jedi.inc +++ b/src/lib/sdl2/jedi.inc @@ -8,9 +8,9 @@ sdl.inc is based on the files: "begin_code.h", "close_code.h", - "sdl_config.h", - "sdl_config_windows.h", - ... + "sdl_config.h", + "sdl_config_windows.h", + ... it defines some variables for several Pascal-Compilers and OS-versions. It is based on mine updated version of jedi-sdl.inc from the SDL 1.2 Headers, @@ -419,10 +419,10 @@ {$DEFINE DELPHI32} {$ELSE} {$IFDEF 64Bit} - {$DEFINE DELPHI64} - {$ELSE} - {$DEFINE DELPHI16} - {$ENDIF} + {$DEFINE DELPHI64} + {$ELSE} + {$DEFINE DELPHI16} + {$ENDIF} {$ENDIF} //{$ALIGN ON} {$ENDIF Delphi} diff --git a/src/lib/sdl2/sdl.inc b/src/lib/sdl2/sdl.inc index 17b0b86..5457364 100644 --- a/src/lib/sdl2/sdl.inc +++ b/src/lib/sdl2/sdl.inc @@ -17,11 +17,11 @@ const SDL_INIT_NOPARACHUTE = $00100000; //Don't catch fatal signals {$EXTERNALSYM SDL_INIT_NOPARACHUTE} SDL_INIT_EVERYTHING = SDL_INIT_TIMER or - SDL_INIT_AUDIO or - SDL_INIT_VIDEO or - SDL_INIT_JOYSTICK or - SDL_INIT_HAPTIC or - SDL_INIT_GAMECONTROLLER; + SDL_INIT_AUDIO or + SDL_INIT_VIDEO or + SDL_INIT_JOYSTICK or + SDL_INIT_HAPTIC or + SDL_INIT_GAMECONTROLLER; {$EXTERNALSYM SDL_INIT_EVERYTHING} {** @@ -41,22 +41,21 @@ function SDL_InitSubSystem(flags: UInt32): SInt32 cdecl; external SDL_LibName {$ {** * This function cleans up specific SDL subsystems *} - + procedure SDL_QuitSubSystem(flags: UInt32) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QuitSubSystem' {$ENDIF} {$ENDIF}; {** * This function returns a mask of the specified subsystems which have * previously been initialized. - * + * * If flags is 0, it returns a mask of all initialized subsystems. *} - + function SDL_WasInit(flags: UInt32): UInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WasInit' {$ENDIF} {$ENDIF}; {** * This function cleans up all initialized subsystems. You should * call it upon all exit conditions. *} - -procedure SDL_Quit() cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Quit' {$ENDIF} {$ENDIF}; +procedure SDL_Quit() cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Quit' {$ENDIF} {$ENDIF}; diff --git a/src/lib/sdl2/sdl2.pas b/src/lib/sdl2/sdl2.pas index 4f1dfca..18fd044 100644 --- a/src/lib/sdl2/sdl2.pas +++ b/src/lib/sdl2/sdl2.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit SDL2; { @@ -141,7 +142,7 @@ interface X, XLib; {$ENDIF} - + {$IFDEF DARWIN} uses X, @@ -241,7 +242,7 @@ end; //from "sdl_mouse.h" function SDL_Button(button: SInt32): SInt32; begin - Result := 1 shl (button - 1); + Result := 1 shl (button - 1); end; {$IFDEF WINDOWS} @@ -303,7 +304,7 @@ function SDL_LoadWAV(_file: PAnsiChar; spec: PSDL_AudioSpec; audio_buf: PPUInt8; begin Result := SDL_LoadWAV_RW(SDL_RWFromFile(_file, 'rb'), 1, spec, audio_buf, audio_len); end; - + function SDL_AUDIO_BITSIZE(x: Cardinal): Cardinal; begin Result := x and SDL_AUDIO_MASK_BITSIZE; diff --git a/src/lib/sdl2/sdlaudio.inc b/src/lib/sdl2/sdlaudio.inc index 79bf7f0..24b466c 100644 --- a/src/lib/sdl2/sdlaudio.inc +++ b/src/lib/sdl2/sdlaudio.inc @@ -174,7 +174,7 @@ function SDL_GetAudioDriver(index: Integer): PAnsiChar cdecl; external SDL_LibNa * you have a specific need to specify the audio driver you want to * use. You should normally use SDL_Init() or SDL_InitSubSystem(). *} - + function SDL_AudioInit(driver_name: PAnsiChar): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioInit' {$ENDIF} {$ENDIF}; procedure SDL_AudioQuit cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioQuit' {$ENDIF} {$ENDIF}; @@ -422,4 +422,3 @@ procedure SDL_CloseAudioDevice(dev: TSDL_AudioDeviceID) cdecl; external SDL_LibN * 1 if audio device is still functioning, zero if not, -1 on error. *} function SDL_AudioDeviceConnected(dev: TSDL_AudioDeviceID): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioDeviceConnected' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdlclipboard.inc b/src/lib/sdl2/sdlclipboard.inc index 07eab87..a60dce8 100644 --- a/src/lib/sdl2/sdlclipboard.inc +++ b/src/lib/sdl2/sdlclipboard.inc @@ -21,4 +21,3 @@ function SDL_GetClipboardText(): PAnsiChar cdecl; external SDL_LibName {$IFDEF D * \sa SDL_GetClipboardText() *} function SDL_HasClipboardText(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasClipboardText' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdlcpuinfo.inc b/src/lib/sdl2/sdlcpuinfo.inc index 2ea9f29..7c3e853 100644 --- a/src/lib/sdl2/sdlcpuinfo.inc +++ b/src/lib/sdl2/sdlcpuinfo.inc @@ -74,4 +74,3 @@ function SDL_HasAVX(): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$I * This function returns the amount of RAM configured in the system, in MB. *} function SDL_GetSystemRAM(): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSystemRAM' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdlevents.inc b/src/lib/sdl2/sdlevents.inc index 34b02df..c22b6f9 100644 --- a/src/lib/sdl2/sdlevents.inc +++ b/src/lib/sdl2/sdlevents.inc @@ -64,17 +64,17 @@ const SDL_JOYHATMOTION = $602; // Joystick hat position change SDL_JOYBUTTONDOWN = $603; // Joystick button pressed SDL_JOYBUTTONUP = $604; // Joystick button released - SDL_JOYDEVICEADDED = $605; // A new joystick has been inserted into the system - SDL_JOYDEVICEREMOVED = $606; // An opened joystick has been removed + SDL_JOYDEVICEADDED = $605; // A new joystick has been inserted into the system + SDL_JOYDEVICEREMOVED = $606; // An opened joystick has been removed { Game controller events } SDL_CONTROLLERAXISMOTION = $650; // Game controller axis motion - SDL_CONTROLLERBUTTONDOWN = $651; // Game controller button pressed + SDL_CONTROLLERBUTTONDOWN = $651; // Game controller button pressed SDL_CONTROLLERBUTTONUP = $652; // Game controller button released - SDL_CONTROLLERDEVICEADDED = $653; // A new Game controller has been inserted into the system - SDL_CONTROLLERDEVICEREMOVED = $654; // An opened Game controller has been removed - SDL_CONTROLLERDEVICEREMAPPED = $655; // The controller mapping was updated - + SDL_CONTROLLERDEVICEADDED = $653; // A new Game controller has been inserted into the system + SDL_CONTROLLERDEVICEREMOVED = $654; // An opened Game controller has been removed + SDL_CONTROLLERDEVICEREMAPPED = $655; // The controller mapping was updated + { Touch events } SDL_FINGERDOWN = $700; SDL_FINGERUP = $701; @@ -98,7 +98,7 @@ const { Render events } SDL_RENDER_TARGETS_RESET = $2000; // The render targets have been reset SDL_RENDER_DEVICE_RESET = $2001; // The device has been reset and all textures need to be recreated - + {** Events SDL_USEREVENT through SDL_LASTEVENT are for your use, * and should be allocated with SDL_RegisterEvents() *} @@ -135,7 +135,7 @@ type padding2: UInt8; padding3: UInt8; data1: SInt32; // event dependent data - data2: SInt32; // event dependent data + data2: SInt32; // event dependent data end; {** @@ -145,7 +145,7 @@ type type_: UInt32; // SDL_KEYDOWN or SDL_KEYUP timestamp: UInt32; windowID: UInt32; // The window with keyboard focus, if any - state: UInt8; // SDL_PRESSED or SDL_RELEASED + state: UInt8; // SDL_PRESSED or SDL_RELEASED _repeat: UInt8; // Non-zero if this is a key repeat padding2: UInt8; padding3: UInt8; @@ -156,16 +156,16 @@ const SDL_TEXTEDITINGEVENT_TEXT_SIZE = 32; type - + {** * Keyboard text editing event structure (event.edit.*) *} TSDL_TextEditingEvent = record - type_: UInt32; // SDL_TEXTEDITING + type_: UInt32; // SDL_TEXTEDITING timestamp: UInt32; windowID: UInt32; // The window with keyboard focus, if any - text: array[0..SDL_TEXTEDITINGEVENT_TEXT_SIZE] of Char; // The editing text + text: array[0..SDL_TEXTEDITINGEVENT_TEXT_SIZE] of Char; // The editing text start: SInt32; // The start cursor of selected editing text length: SInt32; // The length of selected editing text end; @@ -180,28 +180,28 @@ type *} TSDL_TextInputEvent = record - type_: UInt32; // SDL_TEXTINPUT + type_: UInt32; // SDL_TEXTINPUT timestamp: UInt32; windowID: UInt32; // The window with keyboard focus, if any - text: array[0..SDL_TEXTINPUTEVENT_TEXT_SIZE] of Char; // The input text + text: array[0..SDL_TEXTINPUTEVENT_TEXT_SIZE] of Char; // The input text end; {** * Mouse motion event structure (event.motion.*) *} - + TSDL_MouseMotionEvent = record type_: UInt32; // SDL_MOUSEMOTION timestamp: UInt32; windowID: UInt32; // The window with mouse focus, if any which: UInt32; // The mouse instance id, or SDL_TOUCH_MOUSEID - state: UInt8; // The current button state + state: UInt8; // The current button state padding1: UInt8; padding2: UInt8; padding3: UInt8; x: SInt32; // X coordinate, relative to window y: SInt32; // Y coordinate, relative to window - xrel: SInt32; // The relative motion in the X direction + xrel: SInt32; // The relative motion in the X direction yrel: SInt32; // The relative motion in the Y direction end; @@ -210,28 +210,28 @@ type *} TSDL_MouseButtonEvent = record - type_: UInt32; // SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP + type_: UInt32; // SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP timestamp: UInt32; windowID: UInt32; // The window with mouse focus, if any - which: UInt32; // The mouse instance id, or SDL_TOUCH_MOUSEID + which: UInt32; // The mouse instance id, or SDL_TOUCH_MOUSEID button: UInt8; // The mouse button index state: UInt8; // SDL_PRESSED or SDL_RELEASED clicks: UInt8; // 1 for single-click, 2 for double-click, etc. padding1: UInt8; x: SInt32; // X coordinate, relative to window - y: SInt32; // Y coordinate, relative to window + y: SInt32; // Y coordinate, relative to window end; {** * Mouse wheel event structure (event.wheel.*) *} - + TSDL_MouseWheelEvent = record type_: UInt32; // SDL_MOUSEWHEEL timestamp: UInt32; windowID: UInt32; // The window with mouse focus, if any which: UInt32; // The mouse instance id, or SDL_TOUCH_MOUSEID - x: SInt32; // The amount scrolled horizontally + x: SInt32; // The amount scrolled horizontally y: SInt32; // The amount scrolled vertically direction: UInt32; // Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back end; @@ -241,10 +241,10 @@ type *} TSDL_JoyAxisEvent = record - type_: UInt32; // SDL_JOYAXISMOTION + type_: UInt32; // SDL_JOYAXISMOTION timestamp: UInt32; which: TSDL_JoystickID; // The joystick instance id - axis: UInt8; // The joystick axis index + axis: UInt8; // The joystick axis index padding1: UInt8; padding2: UInt8; padding3: UInt8; @@ -295,7 +295,7 @@ type TSDL_JoyButtonEvent = record type_: UInt32; // SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP timestamp: UInt32; - which: TSDL_JoystickID; // The joystick instance id + which: TSDL_JoystickID; // The joystick instance id button: UInt8; // The joystick button index state: UInt8; // SDL_PRESSED or SDL_RELEASED padding1: UInt8; @@ -482,7 +482,7 @@ type SDL_MOUSEBUTTONUP, SDL_MOUSEBUTTONDOWN: (button: TSDL_MouseButtonEvent); SDL_MOUSEWHEEL: (wheel: TSDL_MouseWheelEvent); - + SDL_JOYAXISMOTION: (jaxis: TSDL_JoyAxisEvent); SDL_JOYBALLMOTION: (jball: TSDL_JoyBallEvent); SDL_JOYHATMOTION: (jhat: TSDL_JoyHatEvent); @@ -520,9 +520,9 @@ type {** * Pumps the event loop, gathering events from the input devices. - * + * * This function updates the event queue and internal input device state. - * + * * This should only be run in the thread that sets the video mode. *} procedure SDL_PumpEvents cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PumpEvents' {$ENDIF} {$ENDIF}; @@ -583,10 +583,10 @@ type {** * Waits indefinitely for the next available event. - * + * * 1, or 0 if there was an error while waiting for events. - * - * event - If not nil, the next event is removed from the queue and + * + * event - If not nil, the next event is removed from the queue and * stored in that area. *} @@ -595,18 +595,18 @@ type {** * Waits until the specified timeout (in milliseconds) for the next * available event. - * + * * 1, or 0 if there was an error while waiting for events. - * + * * event - If not nil, the next event is removed from the queue and * stored in that area. *} - + function SDL_WaitEventTimeout(event: PSDL_Event; timeout: SInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitEventTimeout' {$ENDIF} {$ENDIF}; {** * Add an event to the event queue. - * + * * 1 on success, 0 if the event was filtered, or -1 if the event queue * was full or there was some other error. *} @@ -626,13 +626,13 @@ type * are posted to the internal event queue. * * If the filter returns 1, then the event will be added to the internal queue. - * If it returns 0, then the event will be dropped from the queue, but the + * If it returns 0, then the event will be dropped from the queue, but the * internal state will still be updated. This allows selective filtering of * dynamically arriving events. * - * Be very careful of what you do in the event filter function, as + * Be very careful of what you do in the event filter function, as * it may run in a different thread! - * + * * There is one caveat when dealing with the SDL_QUITEVENT event type. The * event filter is only called when the window manager desires to close the * application window. If the event filter returns 1, then the window will @@ -641,7 +641,7 @@ type * If the quit event is generated by an interrupt signal, it will bypass the * internal queue and be delivered to the application at the next event poll. *} - + procedure SDL_SetEventFilter(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetEventFilter' {$ENDIF} {$ENDIF}; {** @@ -654,13 +654,13 @@ type {** * Add a function which is called when an event is added to the queue. *} - + procedure SDL_AddEventWatch(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddEventWatch' {$ENDIF} {$ENDIF}; {** * Remove an event watch function added with SDL_AddEventWatch() *} - + procedure SDL_DelEventWatch(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelEventWatch' {$ENDIF} {$ENDIF}; {** diff --git a/src/lib/sdl2/sdlgamecontroller.inc b/src/lib/sdl2/sdlgamecontroller.inc index f758310..31d7c69 100644 --- a/src/lib/sdl2/sdlgamecontroller.inc +++ b/src/lib/sdl2/sdlgamecontroller.inc @@ -76,7 +76,7 @@ function SDL_GameControllerAddMapping( mappingString: PAnsiChar ): Integer cdecl * A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt * * If freerw is non-zero, the stream will be closed after being read. - * + * * Returns number of mappings added, -1 on error *} function SDL_GameControllerAddMappingsFromRW(rw: PSDL_RWops; freerw: SInt32):SInt32; diff --git a/src/lib/sdl2/sdlhaptic.inc b/src/lib/sdl2/sdlhaptic.inc index b0ef8f4..b15ae42 100644 --- a/src/lib/sdl2/sdlhaptic.inc +++ b/src/lib/sdl2/sdlhaptic.inc @@ -1154,4 +1154,3 @@ function SDL_HapticRumblePlay(haptic: PSDL_Haptic; strength: Float; length: UInt * SDL_HapticRumblePlay *} function SDL_HapticRumbleStop(haptic: PSDL_Haptic): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleStop' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdlhints.inc b/src/lib/sdl2/sdlhints.inc index b3f393d..7f5f9d6 100644 --- a/src/lib/sdl2/sdlhints.inc +++ b/src/lib/sdl2/sdlhints.inc @@ -135,7 +135,7 @@ SDL_HINT_RENDER_SCALE_QUALITY = 'SDL_RENDER_SCALE_QUALITY'; SDL_HINT_RENDER_VSYNC = 'SDL_RENDER_VSYNC'; {/** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -311,7 +311,7 @@ SDL_HINT_VIDEO_HIGHDPI_DISABLED = 'SDL_VIDEO_HIGHDPI_DISABLED'; {** * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac - * + * * If present, holding ctrl while left clicking will generate a right click * event when on Mac. *} @@ -335,9 +335,9 @@ SDL_HINT_VIDEO_WIN_D3DCOMPILER = 'SDL_VIDEO_WIN_D3DCOMPILER'; {/** * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). - * + * * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has - * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly + * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -504,4 +504,3 @@ procedure SDL_DelHintCallback(const name: PChar; callback: TSDL_HintCallback; us */} //extern DECLSPEC void SDLCALL SDL_ClearHints(void); procedure SDL_ClearHints(); cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearHints' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdlkeyboard.inc b/src/lib/sdl2/sdlkeyboard.inc index 90040aa..3dd5319 100644 --- a/src/lib/sdl2/sdlkeyboard.inc +++ b/src/lib/sdl2/sdlkeyboard.inc @@ -25,7 +25,7 @@ type * Get a snapshot of the current state of the keyboard. * * numkeys if non-nil, receives the length of the returned array. - * + * * An array of key states. Indexes into this array are obtained by using SDL_Scancode values. * *} @@ -40,7 +40,7 @@ type {** * Set the current key modifier state for the keyboard. - * + * * This does not change the keyboard state, only the key modifier flags. *} @@ -51,7 +51,7 @@ type * to the current keyboard layout. * * See SDL_Keycode for details. - * + * * SDL_GetKeyName() *} @@ -97,7 +97,7 @@ type * call to this function. If you need it around any longer, you must * copy it. If the key doesn't have a name, this function returns an * empty string (""). - * + * * SDL_Key *} @@ -116,7 +116,7 @@ type {** * Start accepting Unicode text input events. * This function will show the on-screen keyboard if supported. - * + * * SDL_StopTextInput() * SDL_SetTextInputRect() * SDL_HasScreenKeyboardSupport() @@ -136,7 +136,7 @@ type {** * Stop receiving any text input events. * This function will hide the on-screen keyboard if supported. - * + * * SDL_StartTextInput() * SDL_HasScreenKeyboardSupport() *} @@ -146,7 +146,7 @@ type {** * Set the rectangle used to type Unicode text inputs. * This is used as a hint for IME and on-screen keyboard placement. - * + * * SDL_StartTextInput() *} @@ -154,7 +154,7 @@ type {** * Returns whether the platform has some screen keyboard support. - * + * * SDL_TRUE if some keyboard support is available else SDL_FALSE. * * Not all screen keyboard functions are supported on all platforms. diff --git a/src/lib/sdl2/sdllog.inc b/src/lib/sdl2/sdllog.inc index 169334a..6ff9c8f 100644 --- a/src/lib/sdl2/sdllog.inc +++ b/src/lib/sdl2/sdllog.inc @@ -20,29 +20,29 @@ const *} type TSDL_LogCategory = (SDL_LOG_CATEGORY_APPLICATION, - SDL_LOG_CATEGORY_ERROR, - SDL_LOG_CATEGORY_ASSERT, - SDL_LOG_CATEGORY_SYSTEM, - SDL_LOG_CATEGORY_AUDIO, - SDL_LOG_CATEGORY_VIDEO, - SDL_LOG_CATEGORY_RENDER, - SDL_LOG_CATEGORY_INPUT, - SDL_LOG_CATEGORY_TEST, - - {* Reserved for future SDL library use *} - SDL_LOG_CATEGORY_RESERVED1, - SDL_LOG_CATEGORY_RESERVED2, - SDL_LOG_CATEGORY_RESERVED3, - SDL_LOG_CATEGORY_RESERVED4, - SDL_LOG_CATEGORY_RESERVED5, - SDL_LOG_CATEGORY_RESERVED6, - SDL_LOG_CATEGORY_RESERVED7, - SDL_LOG_CATEGORY_RESERVED8, - SDL_LOG_CATEGORY_RESERVED9, - SDL_LOG_CATEGORY_RESERVED10, - - {* Beyond this point is reserved for application use *} - SDL_LOG_CATEGORY_CUSTOM); + SDL_LOG_CATEGORY_ERROR, + SDL_LOG_CATEGORY_ASSERT, + SDL_LOG_CATEGORY_SYSTEM, + SDL_LOG_CATEGORY_AUDIO, + SDL_LOG_CATEGORY_VIDEO, + SDL_LOG_CATEGORY_RENDER, + SDL_LOG_CATEGORY_INPUT, + SDL_LOG_CATEGORY_TEST, + + {* Reserved for future SDL library use *} + SDL_LOG_CATEGORY_RESERVED1, + SDL_LOG_CATEGORY_RESERVED2, + SDL_LOG_CATEGORY_RESERVED3, + SDL_LOG_CATEGORY_RESERVED4, + SDL_LOG_CATEGORY_RESERVED5, + SDL_LOG_CATEGORY_RESERVED6, + SDL_LOG_CATEGORY_RESERVED7, + SDL_LOG_CATEGORY_RESERVED8, + SDL_LOG_CATEGORY_RESERVED9, + SDL_LOG_CATEGORY_RESERVED10, + + {* Beyond this point is reserved for application use *} + SDL_LOG_CATEGORY_CUSTOM); {** * \brief The predefined log priorities @@ -55,7 +55,7 @@ const SDL_LOG_PRIORITY_ERROR = 5; SDL_LOG_PRIORITY_CRITICAL = 6; SDL_NUM_LOG_PRIORITIES = 7; -type +type TSDL_LogPriority = Integer; @@ -132,7 +132,7 @@ procedure SDL_LogMessageV(category: Integer; priority: TSDL_LogPriority; const f type TSDL_LogOutputFunction = procedure(userdata: Pointer; category: Integer; priority: TSDL_LogPriority; const msg: PAnsiChar); PSDL_LogOutputFunction = ^TSDL_LogOutputFunction; - + {** * \brief Get the current log output function. *} diff --git a/src/lib/sdl2/sdlmessagebox.inc b/src/lib/sdl2/sdlmessagebox.inc index 2728f56..0919e08 100644 --- a/src/lib/sdl2/sdlmessagebox.inc +++ b/src/lib/sdl2/sdlmessagebox.inc @@ -3,7 +3,7 @@ {** * SDL_MessageBox flags. If supported will display warning icon, etc. *} - + const SDL_MESSAGEBOX_ERROR = $00000010; {**< error dialog *} SDL_MESSAGEBOX_WARNING = $00000020; {**< warning dialog *} @@ -105,4 +105,3 @@ function SDL_ShowMessageBox(messageboxdata: PSDL_MessageBoxData; buttonid: PInt) * SDL_ShowMessageBox *} function SDL_ShowSimpleMessageBox(flags: UInt32; title: PAnsiChar; _message: PAnsiChar; window: PSDL_Window): Integer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowSimpleMessageBox' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdlmouse.inc b/src/lib/sdl2/sdlmouse.inc index 994b52c..439fe41 100644 --- a/src/lib/sdl2/sdlmouse.inc +++ b/src/lib/sdl2/sdlmouse.inc @@ -37,7 +37,7 @@ type {** * Retrieve the current state of the mouse. - * + * * The current button state is returned as a button bitmask, which can * be tested using the SDL_BUTTON(X) macros, and x and y are set to the * mouse cursor position relative to the focus window for the currently @@ -83,7 +83,7 @@ type * will not change. * * This function will flush any pending mouse motion. - * + * * SDL_GetRelativeMouseMode() *} @@ -91,7 +91,7 @@ type {** * Query whether relative mouse mode is enabled. - * + * * SDL_SetRelativeMouseMode() *} @@ -109,10 +109,10 @@ type * 0 1 White * 1 1 Black * 0 0 Transparent - * 1 0 Inverted color if possible, black + * 1 0 Inverted color if possible, black * if not. * - * + * * SDL_FreeCursor() *} @@ -159,7 +159,7 @@ type * * toggle 1 to show the cursor, 0 to hide it, -1 to query the current * state. - * + * * 1 if the cursor is shown, or 0 if the cursor is hidden. *} @@ -175,11 +175,11 @@ const * - Button 3: Right mouse button *} - SDL_BUTTON_LEFT = 1; - SDL_BUTTON_MIDDLE = 2; - SDL_BUTTON_RIGHT = 3; - SDL_BUTTON_X1 = 4; - SDL_BUTTON_X2 = 5; + SDL_BUTTON_LEFT = 1; + SDL_BUTTON_MIDDLE = 2; + SDL_BUTTON_RIGHT = 3; + SDL_BUTTON_X1 = 4; + SDL_BUTTON_X2 = 5; SDL_BUTTON_LMASK = 1 shl ((SDL_BUTTON_LEFT) - 1); SDL_BUTTON_MMASK = 1 shl ((SDL_BUTTON_MIDDLE) - 1); SDL_BUTTON_RMASK = 1 shl ((SDL_BUTTON_RIGHT) - 1); diff --git a/src/lib/sdl2/sdlpixels.inc b/src/lib/sdl2/sdlpixels.inc index d97f165..39d3036 100644 --- a/src/lib/sdl2/sdlpixels.inc +++ b/src/lib/sdl2/sdlpixels.inc @@ -432,7 +432,7 @@ procedure SDL_FreeFormat(format: PSDL_PixelFormat) cdecl; external SDL_LibName { * A new palette, or nil if there wasn't enough memory. * * The palette entries are initialized to white. - * + * * SDL_FreePalette() *} diff --git a/src/lib/sdl2/sdlrenderer.inc b/src/lib/sdl2/sdlrenderer.inc index 466173c..fcc2bc7 100644 --- a/src/lib/sdl2/sdlrenderer.inc +++ b/src/lib/sdl2/sdlrenderer.inc @@ -20,7 +20,7 @@ type * Information on the capabilities of a render driver or context. *} PSDL_RendererInfo = ^TSDL_RendererInfo; - TSDL_RendererInfo = record + TSDL_RendererInfo = record name: PAnsiChar; {**< The name of the renderer *} flags: UInt32; {**< Supported ::SDL_RendererFlags *} num_texture_formats: UInt32; {**< The number of available texture formats *} diff --git a/src/lib/sdl2/sdlrwops.inc b/src/lib/sdl2/sdlrwops.inc index 335fcba..482a8f2 100644 --- a/src/lib/sdl2/sdlrwops.inc +++ b/src/lib/sdl2/sdlrwops.inc @@ -2,12 +2,12 @@ const {* RWops Types *} - SDL_RWOPS_UNKNOWN = 0; {* Unknown stream type *} - SDL_RWOPS_WINFILE = 1; {* Win32 file *} - SDL_RWOPS_STDFILE = 2; {* Stdio file *} - SDL_RWOPS_JNIFILE = 3; {* Android asset *} - SDL_RWOPS_MEMORY = 4; {* Memory stream *} - SDL_RWOPS_MEMORY_RO = 5; {* Read-Only memory stream *} + SDL_RWOPS_UNKNOWN = 0; {* Unknown stream type *} + SDL_RWOPS_WINFILE = 1; {* Win32 file *} + SDL_RWOPS_STDFILE = 2; {* Stdio file *} + SDL_RWOPS_JNIFILE = 3; {* Android asset *} + SDL_RWOPS_MEMORY = 4; {* Memory stream *} + SDL_RWOPS_MEMORY_RO = 5; {* Read-Only memory stream *} type PSDL_RWops = ^TSDL_RWops; @@ -28,7 +28,7 @@ type * the final offset in the data stream, or -1 on error. *} TSeek = function(context: PSDL_RWops; offset: SInt64; whence: SInt32): SInt64; {$IFNDEF GPC} cdecl; {$ENDIF} - + {** * Read up to maxnum objects each of size size from the data * stream to the area pointed at by ptr. @@ -41,15 +41,15 @@ type {** * Write exactly num objects each of size size from the area * pointed at by ptr to data stream. - * + * * the number of objects written, or 0 at error or end of file. *} - + TWrite = function(context: PSDL_RWops; const ptr: Pointer; size: size_t; num: size_t): size_t; {$IFNDEF GPC} cdecl; {$ENDIF} - + {** * Close and free an allocated SDL_RWops structure. - * + * * 0 if successful or -1 on write error when flushing data. *} @@ -57,15 +57,15 @@ type TStdio = record autoclose: TSDL_Bool; - fp: file; + fp: file; end; - + TMem = record base: PUInt8; - here: PUInt8; - stop: PUInt8; + here: PUInt8; + stop: PUInt8; end; - + TUnknown = record data1: Pointer; end; @@ -84,8 +84,8 @@ type TWindowsIOBuffer = record data: Pointer; - size: size_t; - left: size_t; + size: size_t; + left: size_t; end; TWindowsIO = record @@ -103,16 +103,16 @@ type _type: UInt32; - case Integer of - 0: (stdio: TStdio); - 1: (mem: TMem); - 2: (unknown: TUnknown); - {$IFDEF ANDROID} - 3: (androidio: TAndroidIO); - {$ENDIF} - {$IFDEF WINDOWS} - 3: (windowsio: TWindowsIO); - {$ENDIF} + case Integer of + 0: (stdio: TStdio); + 1: (mem: TMem); + 2: (unknown: TUnknown); + {$IFDEF ANDROID} + 3: (androidio: TAndroidIO); + {$ENDIF} + {$IFDEF WINDOWS} + 3: (windowsio: TWindowsIO); + {$ENDIF} end; {** diff --git a/src/lib/sdl2/sdlscancode.inc b/src/lib/sdl2/sdlscancode.inc index eb64319..d9d0d68 100644 --- a/src/lib/sdl2/sdlscancode.inc +++ b/src/lib/sdl2/sdlscancode.inc @@ -72,21 +72,21 @@ const * key on ISO keyboards and at the right end * of the QWERTY row on ANSI keyboards. * Produces REVERSE SOLIDUS (backslash) and - * VERTICAL LINE in a US layout; REVERSE + * VERTICAL LINE in a US layout; REVERSE * SOLIDUS and VERTICAL LINE in a UK Mac - * layout; NUMBER SIGN and TILDE in a UK + * layout; NUMBER SIGN and TILDE in a UK * Windows layout; DOLLAR SIGN and POUND SIGN * in a Swiss German layout; NUMBER SIGN and * APOSTROPHE in a German layout; GRAVE - * ACCENT and POUND SIGN in a French Mac + * ACCENT and POUND SIGN in a French Mac * layout; and ASTERISK and MICRO SIGN in a * French Windows layout. *} SDL_SCANCODE_NONUSHASH = 50; {**< ISO USB keyboards actually use this code * instead of 49 for the same key; but all - * OSes I've seen treat the two codes + * OSes I've seen treat the two codes * identically. So; as an implementor; unless - * your keyboard generates both of those + * your keyboard generates both of those * codes and your OS treats them differently; * you should generate SDL_SCANCODE_BACKSLASH * instead of this code. As a user; you @@ -167,12 +167,12 @@ const SDL_SCANCODE_KP_PERIOD = 99; SDL_SCANCODE_NONUSBACKSLASH = 100; {**< This is the additional key that ISO - * keyboards have over ANSI ones; - * located between left shift and Y. + * keyboards have over ANSI ones; + * located between left shift and Y. * Produces GRAVE ACCENT and TILDE in a * US or UK Mac layout; REVERSE SOLIDUS - * (backslash) and VERTICAL LINE in a - * US or UK Windows layout; and + * (backslash) and VERTICAL LINE in a + * US or UK Windows layout; and * LESS-THAN SIGN and GREATER-THAN SIGN * in a Swiss German; German; or French * layout. *} @@ -302,11 +302,11 @@ const SDL_SCANCODE_RALT = 230; {**< alt gr; option *} SDL_SCANCODE_RGUI = 231; {**< windows; command (apple); meta *} - SDL_SCANCODE_MODE = 257; {**< I'm not sure if this is really not covered - * by any of the above; but since there's a + SDL_SCANCODE_MODE = 257; {**< I'm not sure if this is really not covered + * by any of the above; but since there's a * special KMOD_MODE for it I'm adding it here *} - + {*Usage page $07*} {** diff --git a/src/lib/sdl2/sdlsurface.inc b/src/lib/sdl2/sdlsurface.inc index 05624f4..0c5a0fd 100644 --- a/src/lib/sdl2/sdlsurface.inc +++ b/src/lib/sdl2/sdlsurface.inc @@ -154,7 +154,7 @@ function SDL_SaveBMP(Const surface:PSDL_Surface; Const filename:AnsiString):sInt * Sets the RLE acceleration hint for a surface. * * 0 on success, or -1 if the surface is not valid - * + * * If RLE is enabled, colorkey and alpha blending blits are much faster, * but the surface must be locked before directly accessing the pixels. *} @@ -322,9 +322,9 @@ function SDL_ConvertPixels(width: SInt32; height: SInt32; src_format: UInt32; co * * If rect is NULL, the whole surface will be filled with color. * - * The color should be a pixel of the format used by the surface, and + * The color should be a pixel of the format used by the surface, and * can be generated by the SDL_MapRGB() function. - * + * * 0 on success, or -1 on error. *} @@ -392,7 +392,7 @@ function SDL_FillRects(dst: PSDL_Surface; const rects: PSDL_Rect; count: SInt32; (* SDL_surface.h uses #define to change all SDL_BlitSurface() calls into SDL_UpperBlit() calls. * * Since Pascal macro support is very limited, we workaround by outright pointing SDL_BlitSurface() to SDL_UpperBlit(). *) -function SDL_BlitSurface(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): SInt32 cdecl; +function SDL_BlitSurface(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): SInt32 cdecl; external SDL_LibName name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_UpperBlit' {$ELSE} 'SDL_UpperBlit' {$IFEND}; @@ -421,7 +421,7 @@ function SDL_SoftStretch(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_ (* SDL_surface.h uses #define to change all SDL_BlitSurfaceScaled() calls into SDL_UpperBlitScaled() calls. * * Since Pascal macro support is very limited, we workaround by outright pointing SDL_BlitSurfaceScaled() to SDL_UpperBlitScaled(). *) -function SDL_BlitSurfaceScaled(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): SInt32 cdecl; +function SDL_BlitSurfaceScaled(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): SInt32 cdecl; external SDL_LibName name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_UpperBlitScaled' {$ELSE} 'SDL_UpperBlitScaled' {$IFEND}; {** diff --git a/src/lib/sdl2/sdlsystem.inc b/src/lib/sdl2/sdlsystem.inc index 9849bb0..1e06d9f 100644 --- a/src/lib/sdl2/sdlsystem.inc +++ b/src/lib/sdl2/sdlsystem.inc @@ -1,7 +1,7 @@ // from "SDL_system.h" (* Platform specific functions for Windows *) -{$IF DEFINED(WIN32) OR DEFINED(WIN64)} +{$IF DEFINED(WIN32) OR DEFINED(WIN64)} {* Returns the D3D9 adapter index that matches the specified display index. * This adapter index can be passed to IDirect3D9::CreateDevice and controls @@ -17,7 +17,7 @@ Type PIDirect3DDevice9 = Pointer; Function SDL_RenderGetD3D9Device(renderer:PSDL_Renderer):PIDirect3DDevice9; cdecl; external SDL_LibName; -{* Returns the DXGI Adapter and Output indices for the specified display index. +{* Returns the DXGI Adapter and Output indices for the specified display index. * These can be passed to EnumAdapters and EnumOutputs respectively to get the objects * required to create a DX10 or DX11 device and swap chain. *} diff --git a/src/lib/sdl2/sdlsyswm.inc b/src/lib/sdl2/sdlsyswm.inc index 13280f7..0b2b7c6 100644 --- a/src/lib/sdl2/sdlsyswm.inc +++ b/src/lib/sdl2/sdlsyswm.inc @@ -76,10 +76,10 @@ Type {$IFDEF SDL_VIDEO_DRIVER_X11} SDL_SYSWM_X11: (x11: __SYSWM_X11); {$ENDIF} - {$IFDEF SDL_VIDEO_DRIVER_DIRECTFB} - SDL_SYSWM_DIRECTFB: (dfb: __SYSWM_DIRECTFB); + {$IFDEF SDL_VIDEO_DRIVER_DIRECTFB} + SDL_SYSWM_DIRECTFB: (dfb: __SYSWM_DIRECTFB); {$ENDIF} - {$IFDEF SDL_VIDEO_DRIVER_COCOA} + {$IFDEF SDL_VIDEO_DRIVER_COCOA} SDL_SYSWM_COCOA: (cocoa: __SYSWM_COCOA); {$ENDIF} {$IFDEF SDL_VIDEO_DRIVER_UIKIT} diff --git a/src/lib/sdl2/sdltouch.inc b/src/lib/sdl2/sdltouch.inc index 92b6a68..b1facdb 100644 --- a/src/lib/sdl2/sdltouch.inc +++ b/src/lib/sdl2/sdltouch.inc @@ -40,4 +40,3 @@ function SDL_GetNumTouchFingers(touchID: TSDL_TouchID): SInt32 cdecl; external S * Get the finger object of the given touch, with the given index. *} function SDL_GetTouchFinger(touchID: TSDL_TouchID; index: SInt32): PSDL_Finger cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchFinger' {$ENDIF} {$ENDIF}; - diff --git a/src/lib/sdl2/sdltype.inc b/src/lib/sdl2/sdltype.inc index 7779cb7..14b76f9 100644 --- a/src/lib/sdl2/sdltype.inc +++ b/src/lib/sdl2/sdltype.inc @@ -6,7 +6,7 @@ type DWord = LongWord; PUInt8Array = ^TUInt8Array; - PUInt8 = ^UInt8; + PUInt8 = ^UInt8; PPUInt8 = ^PUInt8; UInt8 = Byte; {$EXTERNALSYM UInt8} diff --git a/src/lib/sdl2/sdlvideo.inc b/src/lib/sdl2/sdlvideo.inc index ddb72ca..2ec24e8 100644 --- a/src/lib/sdl2/sdlvideo.inc +++ b/src/lib/sdl2/sdlvideo.inc @@ -246,7 +246,7 @@ type {** * OpenGL configuration attributes *} - + const SDL_GL_RED_SIZE = 0; SDL_GL_GREEN_SIZE = 1; @@ -335,7 +335,7 @@ function SDL_VideoInit(const driver_name: PAnsiChar): SInt32 cdecl; external SDL * Shuts down the video subsystem. * * function closes all windows, and restores the original video mode. - * + * * SDL_VideoInit() *} procedure SDL_VideoQuit cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_VideoQuit' {$ENDIF} {$ENDIF}; @@ -354,7 +354,7 @@ function SDL_GetCurrentVideoDriver: PAnsiChar cdecl; external SDL_LibName {$IFDE {** * Returns the number of available video displays. - * + * * SDL_GetDisplayBounds() *} @@ -364,7 +364,7 @@ function SDL_GetNumVideoDisplays: SInt32 cdecl; external SDL_LibName {$IFDEF DEL * Get the name of a display in UTF-8 encoding * * The name of a display, or nil for an invalid display index. - * + * * SDL_GetNumVideoDisplays() *} @@ -424,11 +424,11 @@ function SDL_GetCurrentDisplayMode(displayIndex: SInt32; mode: PSDL_DisplayMode) * * The passed in value closest, or nil if no matching video mode * was available. - * + * * The available display modes are scanned, and closest is filled in with the - * closest mode matching the requested mode and returned. The mode format and + * closest mode matching the requested mode and returned. The mode format and * refresh_rate default to the desktop mode if they are 0. The modes are - * scanned with size being first priority, format being second priority, and + * scanned with size being first priority, format being second priority, and * finally checking the refresh_rate. If all the available modes are too * small, then nil is returned. * @@ -440,7 +440,7 @@ function SDL_GetClosestDisplayMode(displayIndex: SInt32; const mode: PSDL_Displa {** * Get the display index associated with a window. - * + * * the display index of the display containing the center of the * window, or -1 on error. *} @@ -452,11 +452,11 @@ function SDL_GetWindowDisplayIndex(window: PSDL_Window): SInt32 cdecl; external * * By default the window's dimensions and the desktop format and refresh rate * are used. - * + * * mode The mode to use, or nil for the default mode. - * + * * 0 on success, or -1 if setting the display mode failed. - * + * * SDL_GetWindowDisplayMode() * SDL_SetWindowFullscreen() *} @@ -490,9 +490,9 @@ function SDL_GetWindowPixelFormat(window: PSDL_Window): UInt32 cdecl; external S * w The width of the window. * h The height of the window. * flags The flags for the window, a mask of any of the following: - * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, + * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_BORDERLESS, - * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, + * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED. * * The id of the window created, or zero if window creation failed. @@ -504,9 +504,9 @@ function SDL_CreateWindow(const title: PAnsiChar; x: SInt32; y: SInt32; w: SInt3 {** * Create an SDL window from an existing native window. - * + * * data A pointer to driver-dependent window creation data - * + * * The id of the window created, or zero if window creation failed. * * SDL_DestroyWindow() @@ -534,7 +534,7 @@ function SDL_GetWindowFlags(window: PSDL_Window): UInt32 cdecl; external SDL_Lib {** * Set the title of a window, in UTF-8 format. - * + * * SDL_GetWindowTitle() *} @@ -558,7 +558,7 @@ procedure SDL_SetWindowIcon(window: PSDL_Window; icon: PSDL_Surface) cdecl; exte {** * Associate an arbitrary named pointer with a window. - * + * * window The window to associate with the pointer. * name The name of the pointer. * userdata The associated pointer. @@ -620,7 +620,7 @@ procedure SDL_GetWindowPosition(window: PSDL_Window; x: PInt; y: PInt) cdecl; ex * * You can't change the size of a fullscreen window, it automatically * matches the size of the display mode. - * + * * SDL_GetWindowSize() *} @@ -628,18 +628,18 @@ procedure SDL_SetWindowSize(window: PSDL_Window; w: SInt32; h: SInt32) cdecl; ex {** * Get the size of a window's client area. - * + * * w Pointer to variable for storing the width, may be nil * h Pointer to variable for storing the height, may be nil - * + * * SDL_SetWindowSize() *} procedure SDL_GetWindowSize(window: PSDL_Window; w: PInt; h: PInt) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowSize' {$ENDIF} {$ENDIF}; - + {** * Set the minimum size of a window's client area. - * + * * min_w The minimum width of the window, must be >0 * min_h The minimum height of the window, must be >0 * @@ -651,10 +651,10 @@ procedure SDL_GetWindowSize(window: PSDL_Window; w: PInt; h: PInt) cdecl; extern *} procedure SDL_SetWindowMinimumSize(window: PSDL_Window; min_w: SInt32; min_h: SInt32) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMinimumSize' {$ENDIF} {$ENDIF}; - + {** * Get the minimum size of a window's client area. - * + * * w Pointer to variable for storing the minimum width, may be nil * h Pointer to variable for storing the minimum height, may be nil * @@ -681,7 +681,7 @@ procedure SDL_SetWindowMaximumSize(window: PSDL_Window; max_w: SInt32; max_h: SI {** * Get the maximum size of a window's client area. - * + * * w Pointer to variable for storing the maximum width, may be nil * h Pointer to variable for storing the maximum height, may be nil * @@ -702,7 +702,7 @@ procedure SDL_GetWindowMaximumSize(window: PSDL_Window; w: PInt; h: PInt) cdecl; * bordered SDL_FALSE to remove border, SDL_TRUE to add border. * * You can't change the border state of a fullscreen window. - * + * * SDL_GetWindowFlags() *} @@ -710,7 +710,7 @@ procedure SDL_SetWindowBordered(window: PSDL_Window; bordered: TSDL_Bool) cdecl; {** * Show a window. - * + * * SDL_HideWindow() *} @@ -718,7 +718,7 @@ procedure SDL_ShowWindow(window: PSDL_Window) cdecl; external SDL_LibName {$IFDE {** * Hide a window. - * + * * SDL_ShowWindow() *} @@ -732,7 +732,7 @@ procedure SDL_RaiseWindow(window: PSDL_Window) cdecl; external SDL_LibName {$IFD {** * Make a window as large as possible. - * + * * SDL_RestoreWindow() *} @@ -748,7 +748,7 @@ procedure SDL_MinimizeWindow(window: PSDL_Window) cdecl; external SDL_LibName {$ {** * Restore the size and position of a minimized or maximized window. - * + * * SDL_MaximizeWindow() * SDL_MinimizeWindow() *} @@ -757,9 +757,9 @@ procedure SDL_RestoreWindow(window: PSDL_Window) cdecl; external SDL_LibName {$I {** * Set a window's fullscreen state. - * + * * 0 on success, or -1 if setting the display mode failed. - * + * * SDL_SetWindowDisplayMode() * SDL_GetWindowDisplayMode() *} @@ -806,9 +806,9 @@ function SDL_UpdateWindowSurfaceRects(window: PSDL_Window; rects: PSDL_Rect; num {** * Set a window's input grab mode. - * + * * grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input. - * + * * SDL_GetWindowGrab() *} @@ -816,7 +816,7 @@ procedure SDL_SetWindowGrab(window: PSDL_Window; grabbed: TSDL_Bool) cdecl; exte {** * Get a window's input grab mode. - * + * * This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise. * * SDL_SetWindowGrab() @@ -837,7 +837,7 @@ function SDL_SetWindowBrightness(window: PSDL_Window; brightness: Float): SInt32 {** * Get the brightness (gamma correction) for a window. - * + * * The last brightness value passed to SDL_SetWindowBrightness() * * SDL_SetWindowBrightness() @@ -847,13 +847,13 @@ function SDL_GetWindowBrightness(window: PSDL_Window): Float cdecl; external SDL {** * Set the gamma ramp for a window. - * + * * red The translation table for the red channel, or nil. * green The translation table for the green channel, or nil. * blue The translation table for the blue channel, or nil. * * 0 on success, or -1 if gamma ramps are unsupported. - * + * * Set the gamma translation table for the red, green, and blue channels * of the video hardware. Each table is an array of 256 16-bit quantities, * representing a mapping between the input and output for that channel. @@ -874,7 +874,7 @@ function SDL_SetWindowGammaRamp(window: PSDL_Window; const red: PUInt16; const g * the translation table for the green channel, or nil. * blue A pointer to a 256 element array of 16-bit quantities to hold * the translation table for the blue channel, or nil. - * + * * 0 on success, or -1 if gamma ramps are unsupported. * * SDL_SetWindowGammaRamp() @@ -890,7 +890,7 @@ procedure SDL_DestroyWindow(window: PSDL_Window) cdecl; external SDL_LibName {$I {** * Returns whether the screensaver is currently enabled (default on). - * + * * SDL_EnableScreenSaver() * SDL_DisableScreenSaver() *} @@ -1007,7 +1007,7 @@ function SDL_GL_GetCurrentContext: TSDL_GLContext cdecl; external SDL_LibName {$ {** * Set the swap interval for the current OpenGL context. - * + * * interval 0 for immediate updates, 1 for updates synchronized with the * vertical retrace. If the system supports it, you may * specify -1 to allow late swaps to happen immediately @@ -1028,7 +1028,7 @@ function SDL_GL_SetSwapInterval(interval: SInt32): SInt32 cdecl; external SDL_Li * swaps happen immediately instead of waiting for the next retrace. * If the system can't determine the swap interval, or there isn't a * valid current context, this will return 0 as a safe default. - * + * * SDL_GL_SetSwapInterval() *} @@ -1043,7 +1043,7 @@ procedure SDL_GL_SwapWindow(window: PSDL_Window) cdecl; external SDL_LibName {$I {** * Delete an OpenGL context. - * + * * SDL_GL_CreateContext() *} diff --git a/src/sfs/sfs.pas b/src/sfs/sfs.pas index 49f8f76..948b470 100644 --- a/src/sfs/sfs.pas +++ b/src/sfs/sfs.pas @@ -1,5 +1,5 @@ // streaming file system (virtual) -{$MODE OBJFPC} +{$MODE DELPHI} {$R+} {.$DEFINE SFS_VOLDEBUG} unit sfs; diff --git a/src/sfs/sfsPlainFS.pas b/src/sfs/sfsPlainFS.pas index e0b2bd0..e43f367 100644 --- a/src/sfs/sfsPlainFS.pas +++ b/src/sfs/sfsPlainFS.pas @@ -6,7 +6,7 @@ // Quake I/II .PAK (PACK) // SiN .SIN (SPAK) // -{$MODE OBJFPC} +{$MODE DELPHI} {$R+} unit sfsPlainFS; diff --git a/src/sfs/sfsZipFS.pas b/src/sfs/sfsZipFS.pas index 941f2d4..22235a8 100644 --- a/src/sfs/sfsZipFS.pas +++ b/src/sfs/sfsZipFS.pas @@ -7,7 +7,7 @@ // dfwad : D2D:F wad archives // {.$DEFINE SFS_DEBUG_ZIPFS} -{$MODE OBJFPC} +{$MODE DELPHI} {$R+} unit sfsZipFS; diff --git a/src/sfs/wadcvt.dpr b/src/sfs/wadcvt.dpr index 34ffcfb..1e5f677 100644 --- a/src/sfs/wadcvt.dpr +++ b/src/sfs/wadcvt.dpr @@ -1,7 +1,7 @@ -{$IFDEF WIN32} +{$MODE OBJFPC} +{$IFDEF WINDOWS} {$APPTYPE CONSOLE} {$ENDIF} -{$MODE DELPHI} program __wadcvt__; uses diff --git a/src/shared/BinEditor.pas b/src/shared/BinEditor.pas index 8a8e532..50867f4 100644 --- a/src/shared/BinEditor.pas +++ b/src/shared/BinEditor.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} Unit BinEditor; Interface diff --git a/src/shared/CONFIG.pas b/src/shared/CONFIG.pas index 8420d0b..0a4898e 100644 --- a/src/shared/CONFIG.pas +++ b/src/shared/CONFIG.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit CONFIG; { diff --git a/src/shared/CONFIGSIMPLE.pas b/src/shared/CONFIGSIMPLE.pas index 31b1573..70163ca 100644 --- a/src/shared/CONFIGSIMPLE.pas +++ b/src/shared/CONFIGSIMPLE.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit CONFIGSIMPLE; interface diff --git a/src/shared/MAPDEF.pas b/src/shared/MAPDEF.pas index 697d253..c759528 100644 --- a/src/shared/MAPDEF.pas +++ b/src/shared/MAPDEF.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit MAPDEF; { diff --git a/src/shared/MAPREADER.pas b/src/shared/MAPREADER.pas index f9f5780..0c8849b 100644 --- a/src/shared/MAPREADER.pas +++ b/src/shared/MAPREADER.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit MAPREADER; { diff --git a/src/shared/MAPSTRUCT.pas b/src/shared/MAPSTRUCT.pas index 1124b25..c2e4b91 100644 --- a/src/shared/MAPSTRUCT.pas +++ b/src/shared/MAPSTRUCT.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit MAPSTRUCT; { diff --git a/src/shared/wadreader.pas b/src/shared/wadreader.pas index 252075f..aee12f4 100644 --- a/src/shared/wadreader.pas +++ b/src/shared/wadreader.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit wadreader; {$DEFINE SFS_DWFAD_DEBUG} diff --git a/src/shared/xstreams.pas b/src/shared/xstreams.pas index abf8bec..5e026e1 100644 --- a/src/shared/xstreams.pas +++ b/src/shared/xstreams.pas @@ -1,5 +1,5 @@ // special stream classes -{$MODE OBJFPC} +{$MODE DELPHI} {$R+} unit xstreams; diff --git a/src/sheditor/MAPWRITER.pas b/src/sheditor/MAPWRITER.pas index 6399330..7879d15 100644 --- a/src/sheditor/MAPWRITER.pas +++ b/src/sheditor/MAPWRITER.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit MAPWRITER; { diff --git a/src/sheditor/WADEDITOR_full.pas b/src/sheditor/WADEDITOR_full.pas index cec3571..e9b2c3f 100644 --- a/src/sheditor/WADEDITOR_full.pas +++ b/src/sheditor/WADEDITOR_full.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit WADEDITOR_full; { diff --git a/src/sheditor/WADSTRUCT.pas b/src/sheditor/WADSTRUCT.pas index 7c2546c..4fb5406 100644 --- a/src/sheditor/WADSTRUCT.pas +++ b/src/sheditor/WADSTRUCT.pas @@ -1,3 +1,4 @@ +{$MODE DELPHI} unit WADSTRUCT; { diff --git a/src/sheditor/xstreams_sdl.pas b/src/sheditor/xstreams_sdl.pas index 3bc2c64..6a42968 100644 --- a/src/sheditor/xstreams_sdl.pas +++ b/src/sheditor/xstreams_sdl.pas @@ -1,5 +1,5 @@ // special stream classes -{$MODE OBJFPC} +{$MODE DELPHI} {$R+} unit xstreams_sdl; -- 2.29.2