From: Ketmar Dark Date: Wed, 6 Apr 2016 00:11:09 +0000 (+0300) Subject: removed trailing spaces all over the source X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=ff104a8cdc79693b7546d839605ec73ae135d904;p=d2df-sdl.git removed trailing spaces all over the source --- diff --git a/src/engine/e_graphics.pas b/src/engine/e_graphics.pas index 49bdaa6..07ad174 100644 --- a/src/engine/e_graphics.pas +++ b/src/engine/e_graphics.pas @@ -154,7 +154,7 @@ type OldID: DWORD; Pixels: Pointer; end; - + var e_Textures: array of TTexture = nil; e_TextureFonts: array of TTextureFont = nil; @@ -1675,7 +1675,7 @@ begin end; end; end; - + if e_TextureFonts <> nil then begin e_WriteLog(' Releasing texturefonts...', MSG_NOTIFY); @@ -1725,7 +1725,7 @@ begin e_TextureFontBuildInPlace(i); end; end; - + SetLength(e_SavedTextures, 0); end; diff --git a/src/engine/e_input.pas b/src/engine/e_input.pas index 67e0b5d..40b7522 100644 --- a/src/engine/e_input.pas +++ b/src/engine/e_input.pas @@ -13,15 +13,15 @@ const e_MaxJoyBtns = 32; e_MaxJoyAxes = 4; e_MaxJoyHats = 4; - + e_MaxJoyKeys = e_MaxJoyBtns + e_MaxJoyAxes*2 + e_MaxJoyHats*4; - + e_MaxInputKeys = e_MaxKbdKeys + e_MaxJoys*e_MaxJoyKeys - 1; // $$$..$$$ - 321 Keyboard buttons/keys // $$$..$$$ - 4*32 Joystick buttons // $$$..$$$ - 4*4 Joystick axes (- and +) // $$$..$$$ - 4*4 Joystick hats (L U R D) - + // these are apparently used in g_gui and g_game and elsewhere IK_UNKNOWN = SDLK_UNKNOWN; IK_INVALID = 65535; @@ -40,7 +40,7 @@ const IK_SHIFT = SDLK_LSHIFT; IK_TAB = SDLK_TAB; IK_PAGEUP = SDLK_PAGEUP; - IK_PAGEDN = SDLK_PAGEDOWN; + IK_PAGEDN = SDLK_PAGEDOWN; IK_F2 = SDLK_F2; IK_F3 = SDLK_F3; IK_F4 = SDLK_F4; @@ -56,14 +56,14 @@ const IK_PAUSE = SDLK_PAUSE; // TODO: think of something better than this shit IK_LASTKEY = 320; - + AX_MINUS = 0; AX_PLUS = 1; HAT_LEFT = 0; HAT_UP = 1; HAT_RIGHT = 2; HAT_DOWN = 3; - + function e_InitInput(): Boolean; procedure e_ReleaseInput(); procedure e_ClearInputBuffer(); @@ -112,7 +112,7 @@ type var KeyBuffer: array [0..e_MaxKbdKeys] of Boolean; - Joysticks: array of TJoystick = nil; + Joysticks: array of TJoystick = nil; function OpenJoysticks(): Byte; var @@ -156,7 +156,7 @@ begin SDL_JoystickClose(Handle); SetLength(Joysticks, 0); end; - + function PollKeyboard(): Boolean; var Keys: PByte; @@ -171,8 +171,8 @@ begin KeyBuffer[i] := ((PByte(Cardinal(Keys) + i)^) <> 0); for i := NKeys to High(KeyBuffer) do KeyBuffer[i] := False; -end; - +end; + function PollJoysticks(): Boolean; var i, j: Word; @@ -210,7 +210,7 @@ begin if e_KeyNames[i] = 'unknown key' then e_KeyNames[i] := ''; end; - + // joysticks for j := 0 to e_MaxJoys-1 do begin @@ -236,11 +236,11 @@ begin end; end; end; - + function e_InitInput(): Boolean; begin Result := False; - + e_JoysticksAvailable := OpenJoysticks(); e_EnableInput := True; GenerateKeyNames(); @@ -253,7 +253,7 @@ begin ReleaseJoysticks(); e_JoysticksAvailable := 0; end; - + procedure e_ClearInputBuffer(); var i, j, d: Integer; @@ -270,7 +270,7 @@ begin for j := Low(Joysticks[i].HatBuf) to High(Joysticks[i].HatBuf) do for d := Low(Joysticks[i].HatBuf[j]) to High(Joysticks[i].HatBuf[j]) do Joysticks[i].HatBuf[j, d] := False; - end; + end; end; function e_PollInput(): Boolean; @@ -289,12 +289,12 @@ var begin Result := False; if (Key = IK_INVALID) or (Key = 0) then Exit; - + if (Key < KBRD_END) then begin // Keyboard buttons/keys Result := KeyBuffer[Key]; end - + else if (Key >= JOYK_BEG) and (Key < JOYK_END) then begin // Joystick buttons JoyI := (Key - JOYK_BEG) div e_MaxJoyBtns; @@ -306,7 +306,7 @@ begin Result := Joysticks[JoyI].ButtBuf[Key]; end; end - + else if (Key >= JOYA_BEG) and (Key < JOYA_END) then begin // Joystick axes JoyI := (Key - JOYA_BEG) div (e_MaxJoyAxes*2); @@ -318,13 +318,13 @@ begin dir := Key mod 2; if dir = AX_MINUS then Result := Joysticks[JoyI].AxisBuf[Key div 2] < -e_JoystickDeadzones[JoyI] - else + else Result := Joysticks[JoyI].AxisBuf[Key div 2] > e_JoystickDeadzones[JoyI] - end; + end; end - + else if (Key >= JOYH_BEG) and (Key < JOYH_END) then - begin // Joystick hats + begin // Joystick hats JoyI := (Key - JOYH_BEG) div (e_MaxJoyHats*4); if JoyI >= e_JoysticksAvailable then Result := False @@ -333,7 +333,7 @@ begin Key := (Key - JOYH_BEG) mod (e_MaxJoyHats*4); dir := Key mod 4; Result := Joysticks[JoyI].HatBuf[Key div 4, dir]; - end; + end; end; end; @@ -342,12 +342,12 @@ var JoyI, dir: Integer; begin if (Key = IK_INVALID) or (Key = 0) then Exit; - + if (Key < KBRD_END) then begin // Keyboard buttons/keys keyBuffer[key] := (state <> 0); end - + else if (Key >= JOYK_BEG) and (Key < JOYK_END) then begin // Joystick buttons JoyI := (Key - JOYK_BEG) div e_MaxJoyBtns; @@ -359,9 +359,9 @@ begin Joysticks[JoyI].ButtBuf[Key] := (state <> 0); end; end - + else if (Key >= JOYA_BEG) and (Key < JOYA_END) then - begin // Joystick axes + begin // Joystick axes JoyI := (Key - JOYA_BEG) div (e_MaxJoyAxes*2); if JoyI >= e_JoysticksAvailable then Exit @@ -369,11 +369,11 @@ begin begin Key := (Key - JOYA_BEG) mod (e_MaxJoyAxes*2); Joysticks[JoyI].AxisBuf[Key div 2] := state; - end; + end; end - + else if (Key >= JOYH_BEG) and (Key < JOYH_END) then - begin // Joystick hats + begin // Joystick hats JoyI := (Key - JOYH_BEG) div (e_MaxJoyHats*4); if JoyI >= e_JoysticksAvailable then Exit @@ -382,7 +382,7 @@ begin Key := (Key - JOYH_BEG) mod (e_MaxJoyHats*4); dir := Key mod 4; Joysticks[JoyI].HatBuf[Key div 4, dir] := (state <> 0); - end; + end; end; end; diff --git a/src/engine/e_textures.pas b/src/engine/e_textures.pas index 504b3fb..1c470fa 100644 --- a/src/engine/e_textures.pas +++ b/src/engine/e_textures.pas @@ -13,8 +13,8 @@ var fUseMipmaps: Boolean = False; TEXTUREFILTER: Integer = GL_NEAREST; -function CreateTexture( Width, Height, Format: Word; pData: Pointer ): Integer; - +function CreateTexture( Width, Height, Format: Word; pData: Pointer ): Integer; + // Standard set of images loading functions function LoadTexture( Filename: String; var Texture: GLuint; var pWidth, pHeight: Word; Fmt: PWord = nil ): Boolean; @@ -83,7 +83,7 @@ begin glTexImage2D( GL_TEXTURE_2D, 0, 3, Width, Height, 0, GL_RGB, GL_UNSIGNED_BYTE, pData ); end; - + glBindTexture(GL_TEXTURE_2D, 0); Result := Texture; @@ -150,11 +150,11 @@ begin TFmt := GL_RGB else TFmt := GL_RGBA; - + Texture := CreateTexture( Width, Height, TFmt, Image ); FreeMem( Image ); - + if Fmt <> nil then Fmt^ := TFmt; pWidth := Width; @@ -241,12 +241,12 @@ begin TFmt := GL_RGB else TFmt := GL_RGBA; - + Texture := CreateTexture( fWidth, fHeight, TFmt, Image ); FreeMem( Image ); FreeMem( Image2 ); - + if Fmt <> nil then Fmt^ := TFmt; Result := True; @@ -334,11 +334,11 @@ begin TFmt := GL_RGB else TFmt := GL_RGBA; - + Texture := CreateTexture( Width, Height, TFmt, Image ); FreeMem( Image ); - + if Fmt <> nil then Fmt^ := TFmt; pWidth := Width; @@ -362,7 +362,7 @@ var BPP: Byte; Base: PByte; TFmt: Word; - + begin Result := False; @@ -450,4 +450,3 @@ begin end; end. - diff --git a/src/game/CustomRes.rc b/src/game/CustomRes.rc index ddff531..9be3bbd 100644 --- a/src/game/CustomRes.rc +++ b/src/game/CustomRes.rc @@ -1 +1 @@ -dficon ICON "Icon.ico" +dficon ICON "Icon.ico" diff --git a/src/game/MakeRes.bat b/src/game/MakeRes.bat index 0a910e4..d3da940 100644 --- a/src/game/MakeRes.bat +++ b/src/game/MakeRes.bat @@ -1,3 +1,3 @@ gorc.exe CustomRes.rc "C:\Program Files (x86)\Borland\Delphi7\Bin\brcc32.exe" Doom2DF.rc -pause \ No newline at end of file +pause diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas index 4b505ab..3807b54 100644 --- a/src/game/g_basic.pas +++ b/src/game/g_basic.pas @@ -496,14 +496,14 @@ begin a := abs(vx); b := abs(vy); - if a = 0 then + if a = 0 then c := 0 - else + else c := RadToDeg(ArcTan(b/a)); - if vy < 0 then + if vy < 0 then c := -c; - if vx > 0 then + if vx > 0 then c := 180 - c; c := c + 180; @@ -828,7 +828,7 @@ var begin while (fmt[m] = ' ') and (m < Length(fmt)) do Inc(m); - if (m >= Length(fmt)) then + if (m >= Length(fmt)) then Break; if (fmt[m] = '%') then @@ -894,7 +894,7 @@ begin else Break; end; - + else {case} Break; end; {case} @@ -967,7 +967,7 @@ begin o^ := p.Obj; end; - + UID_MONSTER: begin m := g_Monsters_Get(UID); diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 13ffb10..70dba84 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -2985,7 +2985,7 @@ begin g_Texture_DeleteAll(); g_Frames_DeleteAll(); g_Menu_Free(); - + if NetInitDone then g_Net_Free; // Íàäî óäàëèòü êàðòó ïîñëå òåñòà: @@ -3588,7 +3588,7 @@ begin ProcessLoading(); e_PollInput(); - + if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then begin State := 0; @@ -3677,7 +3677,7 @@ begin gWADHash := MD5File(MapsDir + NewWAD); g_Game_LoadWAD(NewWAD); end else - // hash recieved in MC_RECV_GameEvent -> NET_EV_MAPSTART + // hash recieved in MC_RECV_GameEvent -> NET_EV_MAPSTART g_Game_ClientWAD(NewWAD, gWADHash); end else ResName := Map; @@ -3782,7 +3782,7 @@ begin gCoopTotalSecrets := 0; gLastMap := False; end; - + g_Game_ExecuteEvent('onmapstart'); end; @@ -4193,7 +4193,7 @@ begin else Options := Options and (not GAME_OPTION_ALLOWEXIT); end; - + if (LongBool(Options and GAME_OPTION_ALLOWEXIT)) then g_Console_Add(_lc[I_MSG_ALLOWEXIT_ON]) else @@ -4237,7 +4237,7 @@ begin else Options := Options and (not GAME_OPTION_BOTVSPLAYER); end; - + if (LongBool(Options and GAME_OPTION_BOTVSPLAYER)) then g_Console_Add(_lc[I_MSG_BOTSVSPLAYERS_ON]) else @@ -6068,7 +6068,7 @@ begin MapList := nil; MapIndex := -1; - if not FileExists(FileName) then Exit; + if not FileExists(FileName) then Exit; AssignFile(ListFile, FileName); Reset(ListFile); diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas index 82a45e3..f655889 100644 --- a/src/game/g_gfx.pas +++ b/src/game/g_gfx.pas @@ -98,7 +98,7 @@ begin if Width < 0 then Exit; - + if y < 0 then begin Height := Height + y; @@ -674,12 +674,12 @@ begin Green := 255; Blue := 255; Alpha := 255; - + State := STATE_NORMAL; Time := 0; LiveTime := 65535; ParticleType := PARTICLE_BUBBLES; - + CorrectOffsets(CurrentParticle); end; @@ -1254,7 +1254,7 @@ begin begin glDisable(GL_TEXTURE_2D); glPointSize(2); - + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas index 34436a6..ba095b7 100644 --- a/src/game/g_gui.pas +++ b/src/game/g_gui.pas @@ -65,7 +65,7 @@ type wParam: LongInt; lParam: LongInt; end; - + TFontType = (FONT_TEXTURE, FONT_CHAR); TFont = class(TObject) @@ -102,7 +102,7 @@ type constructor Create; procedure OnMessage(var Msg: TMessage); virtual; procedure Update; virtual; - procedure Draw; virtual; + procedure Draw; virtual; property X: Integer read FX write FX; property Y: Integer read FY write FY; property Enabled: Boolean read FEnabled write FEnabled; @@ -912,7 +912,7 @@ end; procedure TFont.Draw(X, Y: Integer; Text: string; R, G, B: Byte); begin if FFontType = FONT_CHAR then e_CharFont_PrintEx(ID, X, Y, Text, _RGB(R, G, B), FScale) - else e_TextureFontPrintEx(X, Y, Text, ID, R, G, B, FScale); + else e_TextureFontPrintEx(X, Y, Text, ID, R, G, B, FScale); end; procedure TFont.GetTextSize(Text: string; var w, h: Word); @@ -999,7 +999,7 @@ begin FCounter := MAINMENU_MARKERDELAY; g_Texture_Get(MAINMENU_MARKER1, FMarkerID1); - g_Texture_Get(MAINMENU_MARKER2, FMarkerID2); + g_Texture_Get(MAINMENU_MARKER2, FMarkerID2); FHeader := TGUILabel.Create(Header, FFontID); with FHeader do @@ -1037,7 +1037,7 @@ begin if FButtons[a] <> nil then FButtons[a].Draw; if FIndex <> -1 then - e_Draw(FMarkerID1, FButtons[FIndex].FX-48, FButtons[FIndex].FY, 0, True, False); + e_Draw(FMarkerID1, FButtons[FIndex].FX-48, FButtons[FIndex].FY, 0, True, False); end; end; @@ -1142,7 +1142,7 @@ constructor TGUILabel.Create(Text: string; FontID: DWORD); begin inherited Create(); - FFont := TFont.Create(FontID, FONT_CHAR); + FFont := TFont.Create(FontID, FONT_CHAR); FText := Text; FFixedLen := 0; @@ -1169,8 +1169,8 @@ begin if FFixedLen = 0 then FFont.GetTextSize(FText, w, h) else - w := e_CharFont_GetMaxWidth(FFont.ID)*FFixedLen; - Result := w; + w := e_CharFont_GetMaxWidth(FFont.ID)*FFixedLen; + Result := w; end; procedure TGUILabel.OnMessage(var Msg: TMessage); @@ -1343,9 +1343,9 @@ begin y := FItems[FIndex].Control.FY; end; - x := x-e_CharFont_GetMaxWidth(FFontID); + x := x-e_CharFont_GetMaxWidth(FFontID); - e_CharFont_PrintEx(FFontID, x, y, #16, _RGB(255, 0, 0)); + e_CharFont_PrintEx(FFontID, x, y, #16, _RGB(255, 0, 0)); end; end; @@ -2155,7 +2155,7 @@ var w, h: Word; begin Result := 0; - + for a := 0 to 255 do begin FFont.GetTextSize(e_KeyNames[a], w, h); @@ -2205,13 +2205,13 @@ begin begin FKey := IK_ENTER; // FIsQuery := False; - + with FWindow do if FDefControl <> '' then SetActive(GetControl(FDefControl)) else SetActive(nil); - end; + end; end; end; @@ -2253,7 +2253,7 @@ begin DrawBox(FX, FY, 4, 4); - if FModel <> nil then FModel.Draw(FX+4, FY+4); + if FModel <> nil then FModel.Draw(FX+4, FY+4); end; procedure TGUIModelView.NextAnim(); @@ -2286,7 +2286,7 @@ end; procedure TGUIModelView.SetColor(Red, Green, Blue: Byte); begin - if FModel <> nil then FModel.SetColor(Red, Green, Blue); + if FModel <> nil then FModel.SetColor(Red, Green, Blue); end; procedure TGUIModelView.SetModel(ModelName: string); @@ -2302,7 +2302,7 @@ begin a := not a; if a then Exit; - + if FModel <> nil then FModel.Update; end; @@ -2335,7 +2335,7 @@ begin e_DrawFillQuad(FX+4, FY+4, FX+4 + Trunc(FMapSize.X / FScale) - 1, FY+4 + Trunc(FMapSize.Y / FScale) - 1, - 32, 32, 32, 0); + 32, 32, 32, 0); if FMapData <> nil then for a := 0 to High(FMapData) do @@ -2346,7 +2346,7 @@ begin if X2 < 0 then Continue; if Y2 < 0 then Continue; - + if X2 > MAPPREVIEW_WIDTH*16 then X2 := MAPPREVIEW_WIDTH*16; if Y2 > MAPPREVIEW_HEIGHT*16 then Y2 := MAPPREVIEW_HEIGHT*16; @@ -2593,12 +2593,12 @@ end; function TGUIListBox.GetHeight: Word; begin - Result := 8+FHeight*16; + Result := 8+FHeight*16; end; function TGUIListBox.GetWidth: Word; begin - Result := 8+(FWidth+1)*16; + Result := 8+(FWidth+1)*16; end; procedure TGUIListBox.OnMessage(var Msg: TMessage); @@ -2675,7 +2675,7 @@ procedure TGUIListBox.FSetItems(Items: SArray); begin if FItems <> nil then FItems := nil; - + FItems := Items; FStartLine := 0; @@ -2907,7 +2907,7 @@ var begin if (FIndex = -1) or (FItems = nil) or (FIndex > High(FItems)) or - (FItems[FIndex][1] = '/') or + (FItems[FIndex][1] = '/') or (FItems[FIndex][1] = '\') then fn := '' else @@ -3034,7 +3034,7 @@ begin inherited; if FImageRes = '' then - begin + begin if g_Texture_Get(FDefaultRes, ID) then e_Draw(ID, FX, FY, 0, True, False); end else diff --git a/src/game/g_items.pas b/src/game/g_items.pas index e912c42..c536181 100644 --- a/src/game/g_items.pas +++ b/src/game/g_items.pas @@ -370,7 +370,7 @@ begin with gItems[i] do begin nxt := False; - + if Live then begin if Fall then diff --git a/src/game/g_language.pas b/src/game/g_language.pas index b2d5dcf..b1513f1 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -36,14 +36,14 @@ type I_GAME_ERROR_TR_SOUND, I_GAME_ERROR_SWITCH_TEXTURE, - I_GAME_PLAYER_NAME, + I_GAME_PLAYER_NAME, I_GAME_GAME_TIME, I_GAME_PING, I_GAME_PING_MS, I_GAME_PING_HUD, I_GAME_FRAGS, I_GAME_DEATHS, - I_GAME_DM, + I_GAME_DM, I_GAME_CTF, I_GAME_TDM, I_GAME_COOP, @@ -52,13 +52,13 @@ type I_GAME_SURV, I_GAME_FRAG_LIMIT, I_GAME_SCORE_LIMIT, - I_GAME_TIME_LIMIT, + I_GAME_TIME_LIMIT, I_GAME_TEAM_SCORE_RED, I_GAME_TEAM_SCORE_BLUE, - I_GAME_TEAM_RED, - I_GAME_TEAM_BLUE, + I_GAME_TEAM_RED, + I_GAME_TEAM_BLUE, I_GAME_WIN_RED, - I_GAME_WIN_BLUE, + I_GAME_WIN_BLUE, I_GAME_WIN_DRAW, I_GAME_MONSTERS, I_GAME_SECRETS, @@ -87,12 +87,12 @@ type I_MENU_START_GAME, I_MENU_MAIN_MENU, - I_MENU_NEW_GAME, - I_MENU_MULTIPLAYER, + I_MENU_NEW_GAME, + I_MENU_MULTIPLAYER, I_MENU_OPTIONS, - I_MENU_AUTHORS, - I_MENU_EXIT, - I_MENU_1_PLAYER, + I_MENU_AUTHORS, + I_MENU_EXIT, + I_MENU_1_PLAYER, I_MENU_2_PLAYERS, I_MENU_CUSTOM_GAME, I_MENU_CAMPAIGN, @@ -100,19 +100,19 @@ type I_MENU_START_CLIENT, I_MENU_CLIENT_CONNECT, I_MENU_SELECT_MAP, - I_MENU_VIDEO_OPTIONS, - I_MENU_SOUND_OPTIONS, - I_MENU_SAVED_OPTIONS, + I_MENU_VIDEO_OPTIONS, + I_MENU_SOUND_OPTIONS, + I_MENU_SAVED_OPTIONS, I_MENU_DEFAULT_OPTIONS, - I_MENU_GAME_OPTIONS, - I_MENU_CONTROLS_OPTIONS, + I_MENU_GAME_OPTIONS, + I_MENU_CONTROLS_OPTIONS, I_MENU_PLAYER_OPTIONS, I_MENU_LANGUAGE_OPTIONS, I_MENU_CHANGE_PLAYERS, I_MENU_LOAD_GAME, I_MENU_SAVE_GAME, - I_MENU_END_GAME, - I_MENU_RESTART, + I_MENU_END_GAME, + I_MENU_RESTART, I_MENU_SET_GAME, I_MENU_JOIN_RED, @@ -123,29 +123,29 @@ type I_MENU_SPECTATE, I_MENU_STATISTICS, - I_MENU_MAP, - I_MENU_GAME_TYPE, - I_MENU_GAME_TYPE_DM, + I_MENU_MAP, + I_MENU_GAME_TYPE, + I_MENU_GAME_TYPE_DM, I_MENU_GAME_TYPE_CTF, - I_MENU_GAME_TYPE_TDM, + I_MENU_GAME_TYPE_TDM, I_MENU_GAME_TYPE_COOP, I_MENU_GAME_TYPE_SINGLE, I_MENU_TIME_LIMIT, I_MENU_GOAL_LIMIT, - I_MENU_MAX_LIVES, - I_MENU_TEAM_DAMAGE, + I_MENU_MAX_LIVES, + I_MENU_TEAM_DAMAGE, I_MENU_ENABLE_EXITS, I_MENU_WEAPONS_STAY, - I_MENU_ENABLE_MONSTERS, - I_MENU_BOTS_VS, - I_MENU_BOTS_VS_PLAYERS, - I_MENU_BOTS_VS_MONSTERS, - I_MENU_BOTS_VS_ALL, + I_MENU_ENABLE_MONSTERS, + I_MENU_BOTS_VS, + I_MENU_BOTS_VS_PLAYERS, + I_MENU_BOTS_VS_MONSTERS, + I_MENU_BOTS_VS_ALL, I_MENU_MAP_WAD, - I_MENU_MAP_RESOURCE, - I_MENU_MAP_NAME, - I_MENU_MAP_AUTHOR, + I_MENU_MAP_RESOURCE, + I_MENU_MAP_NAME, + I_MENU_MAP_AUTHOR, I_MENU_MAP_DESCRIPTION, I_MENU_MAP_SIZE, I_MENU_PLAYERS, @@ -170,38 +170,38 @@ type I_MENU_CONTROL_JOYSTICKS, I_MENU_CONTROL_DEADZONE, - - I_MENU_CONTROL_GLOBAL, - I_MENU_CONTROL_SCREENSHOT, + + I_MENU_CONTROL_GLOBAL, + I_MENU_CONTROL_SCREENSHOT, I_MENU_CONTROL_STAT, I_MENU_CONTROL_CHAT, - I_MENU_CONTROL_TEAMCHAT, - I_MENU_CONTROL_LEFT, + I_MENU_CONTROL_TEAMCHAT, + I_MENU_CONTROL_LEFT, I_MENU_CONTROL_RIGHT, - I_MENU_CONTROL_UP, + I_MENU_CONTROL_UP, I_MENU_CONTROL_DOWN, - I_MENU_CONTROL_JUMP, + I_MENU_CONTROL_JUMP, I_MENU_CONTROL_FIRE, - I_MENU_CONTROL_USE, + I_MENU_CONTROL_USE, I_MENU_CONTROL_NEXT_WEAPON, I_MENU_CONTROL_PREV_WEAPON, I_MENU_COUNT_NONE, - I_MENU_COUNT_SMALL, - I_MENU_COUNT_NORMAL, - I_MENU_COUNT_BIG, - I_MENU_COUNT_VERYBIG, + I_MENU_COUNT_SMALL, + I_MENU_COUNT_NORMAL, + I_MENU_COUNT_BIG, + I_MENU_COUNT_VERYBIG, I_MENU_GAME_BLOOD_COUNT, I_MENU_GAME_MAX_GIBS, - I_MENU_GAME_MAX_CORPSES, + I_MENU_GAME_MAX_CORPSES, I_MENU_GAME_GIBS_COUNT, I_MENU_GAME_MAX_SHELLS, I_MENU_GAME_BLOOD_TYPE, - I_MENU_GAME_BLOOD_TYPE_SIMPLE, - I_MENU_GAME_BLOOD_TYPE_ADV, - I_MENU_GAME_CORPSE_TYPE, - I_MENU_GAME_CORPSE_TYPE_SIMPLE, + I_MENU_GAME_BLOOD_TYPE_SIMPLE, + I_MENU_GAME_BLOOD_TYPE_ADV, + I_MENU_GAME_CORPSE_TYPE, + I_MENU_GAME_CORPSE_TYPE_SIMPLE, I_MENU_GAME_CORPSE_TYPE_ADV, I_MENU_GAME_GIBS_TYPE, I_MENU_GAME_GIBS_TYPE_SIMPLE, @@ -220,8 +220,8 @@ type I_MENU_VIDEO_RESOLUTION, I_MENU_VIDEO_BPP, - I_MENU_VIDEO_VSYNC, - I_MENU_VIDEO_FILTER_SKY, + I_MENU_VIDEO_VSYNC, + I_MENU_VIDEO_FILTER_SKY, I_MENU_VIDEO_NEED_RESTART, I_MENU_RESOLUTION_SELECT, @@ -230,11 +230,11 @@ type I_MENU_RESOLUTION_FULLSCREEN, I_MENU_RESOLUTION_APPLY, - I_MENU_SOUND_MUSIC_LEVEL, + I_MENU_SOUND_MUSIC_LEVEL, I_MENU_SOUND_SOUND_LEVEL, - I_MENU_SOUND_MAX_SIM_SOUNDS, - I_MENU_SOUND_INACTIVE_SOUNDS, - I_MENU_SOUND_INACTIVE_SOUNDS_ON, + I_MENU_SOUND_MAX_SIM_SOUNDS, + I_MENU_SOUND_INACTIVE_SOUNDS, + I_MENU_SOUND_INACTIVE_SOUNDS_ON, I_MENU_SOUND_INACTIVE_SOUNDS_OFF, I_MENU_SOUND_ANNOUNCE, I_MENU_SOUND_COMPAT, @@ -246,37 +246,37 @@ type I_MENU_COMPAT_DOOM2, I_MENU_PLAYER_NAME, - I_MENU_PLAYER_TEAM, - I_MENU_PLAYER_TEAM_RED, + I_MENU_PLAYER_TEAM, + I_MENU_PLAYER_TEAM_RED, I_MENU_PLAYER_TEAM_BLUE, - I_MENU_PLAYER_MODEL, - I_MENU_PLAYER_RED, - I_MENU_PLAYER_GREEN, + I_MENU_PLAYER_MODEL, + I_MENU_PLAYER_RED, + I_MENU_PLAYER_GREEN, I_MENU_PLAYER_BLUE, - - I_MENU_MODEL_INFO, + + I_MENU_MODEL_INFO, I_MENU_MODEL_ANIMATION, - I_MENU_MODEL_CHANGE_WEAPON, - I_MENU_MODEL_ROTATE, + I_MENU_MODEL_CHANGE_WEAPON, + I_MENU_MODEL_ROTATE, I_MENU_MODEL_NAME, I_MENU_MODEL_AUTHOR, - I_MENU_MODEL_COMMENT, - I_MENU_MODEL_OPTIONS, + I_MENU_MODEL_COMMENT, + I_MENU_MODEL_OPTIONS, I_MENU_MODEL_WEAPON, I_MENU_LANGUAGE_RUSSIAN, I_MENU_LANGUAGE_ENGLISH, - I_MENU_PAUSE, - I_MENU_YES, - I_MENU_NO, - I_MENU_OK, + I_MENU_PAUSE, + I_MENU_YES, + I_MENU_NO, + I_MENU_OK, I_MENU_FINISH, - I_MENU_END_GAME_PROMT, - I_MENU_RESTART_GAME_PROMT, + I_MENU_END_GAME_PROMT, + I_MENU_RESTART_GAME_PROMT, I_MENU_EXIT_PROMT, - I_MENU_SET_DEFAULT_PROMT, + I_MENU_SET_DEFAULT_PROMT, I_MENU_LOAD_SAVED_PROMT, I_MENU_ENTERPASSWORD, @@ -377,10 +377,10 @@ type I_PLAYER_SPECT4, I_PLAYER_FLAG_GET, - I_PLAYER_FLAG_RETURN, - I_PLAYER_FLAG_CAPTURE, + I_PLAYER_FLAG_RETURN, + I_PLAYER_FLAG_CAPTURE, I_PLAYER_FLAG_DROP, - I_PLAYER_FLAG_RED, + I_PLAYER_FLAG_RED, I_PLAYER_FLAG_BLUE, I_PLAYER_SCORE_RED, @@ -418,8 +418,8 @@ type I_MESSAGE_VOTE_REVOKED, I_KEY_UP, - I_KEY_DOWN, - I_KEY_LEFT, + I_KEY_DOWN, + I_KEY_LEFT, I_KEY_RIGHT, I_MONSTER_DEMON, @@ -444,44 +444,44 @@ type I_MONSTER_PRIKOLIST, I_LOAD_MUSIC, - I_LOAD_MODELS, - I_LOAD_MENUS, - I_LOAD_CONSOLE, - I_LOAD_ITEMS_DATA, + I_LOAD_MODELS, + I_LOAD_MENUS, + I_LOAD_CONSOLE, + I_LOAD_ITEMS_DATA, I_LOAD_WEAPONS_DATA, - I_LOAD_GAME_DATA, - I_LOAD_COLLIDE_MAP, + I_LOAD_GAME_DATA, + I_LOAD_COLLIDE_MAP, I_LOAD_DOOR_MAP, I_LOAD_LIFT_MAP, - I_LOAD_WATER_MAP, - I_LOAD_WAD_FILE, + I_LOAD_WATER_MAP, + I_LOAD_WAD_FILE, I_LOAD_MAP, - I_LOAD_TEXTURES, - I_LOAD_TRIGGERS, - I_LOAD_PANELS, + I_LOAD_TEXTURES, + I_LOAD_TRIGGERS, + I_LOAD_PANELS, I_LOAD_TRIGGERS_TABLE, - I_LOAD_LINK_TRIGGERS, - I_LOAD_CREATE_TRIGGERS, - I_LOAD_ITEMS, - I_LOAD_CREATE_ITEMS, + I_LOAD_LINK_TRIGGERS, + I_LOAD_CREATE_TRIGGERS, + I_LOAD_ITEMS, + I_LOAD_CREATE_ITEMS, I_LOAD_AREAS, - I_LOAD_CREATE_AREAS, - I_LOAD_MONSTERS, - I_LOAD_CREATE_MONSTERS, - I_LOAD_MAP_HEADER, + I_LOAD_CREATE_AREAS, + I_LOAD_MONSTERS, + I_LOAD_CREATE_MONSTERS, + I_LOAD_MAP_HEADER, I_LOAD_SKY, I_LOAD_MONSTER_TEXTURES, I_LOAD_MONSTER_SOUNDS, - I_LOAD_SAVE_FILE, - I_LOAD_MAP_STATE, - I_LOAD_ITEMS_STATE, + I_LOAD_SAVE_FILE, + I_LOAD_MAP_STATE, + I_LOAD_ITEMS_STATE, I_LOAD_TRIGGERS_STATE, - I_LOAD_WEAPONS_STATE, + I_LOAD_WEAPONS_STATE, I_LOAD_MONSTERS_STATE, I_LOAD_CONNECT, I_LOAD_SEND_INFO, I_LOAD_WAIT_INFO, - I_LOAD_DL_RES, + I_LOAD_DL_RES, I_CREDITS_CAP_1, I_CREDITS_CAP_2, @@ -493,7 +493,7 @@ type I_CREDITS_A_3_1, I_CREDITS_A_4, I_CREDITS_A_4_1, - I_CREDITS_CAP_3, + I_CREDITS_CAP_3, I_CREDITS_CLO_1, I_CREDITS_CLO_2, I_CREDITS_CLO_3, @@ -551,7 +551,7 @@ type I_TEXTURE_ENDPIC, - I_VERSION, + I_VERSION, I_FATAL_ERROR, I_SIMPLE_ERROR, @@ -900,7 +900,7 @@ const 'Íàñòðîéêè äæîéñòèêîâ'), ('MENU CONTROL DEADZONE', 'Joystick %d Deadzone', 'Ìåðòâàÿ çîíà äæîéñòèêà %d'), - + ('MENU CONTROL GLOBAL', 'Global Controls', 'ÎÁÙÅÅ ÓÏÐÀÂËÅÍÈÅ'), ('MENU CONTROL SCREENSHOT', 'Screenshot:', diff --git a/src/game/g_map.pas b/src/game/g_map.pas index aa0c4cb..90cb224 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -1148,7 +1148,7 @@ begin e_WriteLog(' Loading sky: ' + gMapInfo.SkyName, MSG_NOTIFY); g_Game_SetLoadingText(_lc[I_LOAD_SKY], 0, False); g_ProcessResourceStr(gMapInfo.SkyName, FileName, SectionName, ResName); - + if FileName <> '' then FileName := GameDir+'/wads/'+FileName else @@ -1301,13 +1301,13 @@ begin if not WAD.GetResource('', ResList[a], Data, Len) then Continue; CopyMemory(@Sign[0], Data, 3); FreeMem(Data); - + if Sign = MAP_SIGNATURE then begin SetLength(Result, Length(Result)+1); Result[High(Result)] := ResList[a]; end; - + Sign := ''; end; @@ -1336,7 +1336,7 @@ begin ResList := WAD.GetResourcesList(''); WAD.Free(); - + if ResList <> nil then for a := 0 to High(ResList) do if ResList[a] = ResName then begin @@ -1527,7 +1527,7 @@ procedure g_Map_DrawPanels(PanelType: Word); if not (drawDoors xor panels[a].Door) then panels[a].Draw(); end; - + begin case PanelType of PANEL_WALL: DrawPanels(gWalls); @@ -1658,7 +1658,7 @@ begin for a := 0 to h do if ( (not b1x3) or - ((gBlockMon[a].Width + gBlockMon[a].Height) >= 64) ) and + ((gBlockMon[a].Width + gBlockMon[a].Height) >= 64) ) and g_Collide(X, Y, Width, Height, gBlockMon[a].X, gBlockMon[a].Y, gBlockMon[a].Width, gBlockMon[a].Height) then @@ -1743,7 +1743,7 @@ end; procedure g_Map_SwitchTexture(PanelType: Word; ID: DWORD; AnimLoop: Byte = 0); var tp: TPanel; -begin +begin case PanelType of PANEL_WALL, PANEL_OPENDOOR, PANEL_CLOSEDOOR: tp := gWalls[ID]; diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 45413de..21eba04 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -126,7 +126,7 @@ begin KeyPrevWeapon := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_PREV_WEAPON])).Key; KeyOpen := TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_USE])).Key; end; - + if e_JoysticksAvailable > 0 then begin menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsJoystickMenu').GetControl('mOptionsControlsJoystickMenu')); @@ -263,7 +263,7 @@ begin TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_PREV_WEAPON])).Key := KeyPrevWeapon; TGUIKeyRead(GetControl(_lc[I_MENU_CONTROL_USE])).Key := KeyOpen; end; - + if e_JoysticksAvailable > 0 then begin menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsJoystickMenu').GetControl('mOptionsControlsJoystickMenu')); @@ -640,7 +640,7 @@ begin end; end; end; - + ProcSelectMap(nil); end; @@ -1729,7 +1729,7 @@ begin AddButton(@ProcOptionsPlayersAnim, _lc[I_MENU_MODEL_ANIMATION]); AddButton(@ProcOptionsPlayersWeap, _lc[I_MENU_MODEL_CHANGE_WEAPON]); AddButton(@ProcOptionsPlayersRot, _lc[I_MENU_MODEL_ROTATE]); - + with TGUIModelView(Menu.AddChild(TGUIModelView.Create)) do begin Name := 'mv'+s+'Model'; @@ -2566,7 +2566,7 @@ begin end; Menu.DefControl := 'mOptionsControlsP2Menu'; g_GUI_AddWindow(Menu); - + Menu := TGUIWindow.Create('OptionsControlsJoystickMenu'); with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_CONTROL_JOYSTICKS]))) do begin diff --git a/src/game/g_monsters.pas b/src/game/g_monsters.pas index 1579019..1c9040a 100644 --- a/src/game/g_monsters.pas +++ b/src/game/g_monsters.pas @@ -220,7 +220,7 @@ const (Name:'SERG'; Rect:(X:15; Y:8; Width:34; Height:52); Health:20; RunVel: 3; MinPain: 0; Pain: 10; Jump: 10), - + (Name:'CYBER'; Rect:(X:24; Y:9; Width:80; Height:110); Health:500; RunVel: 5; MinPain: 50; Pain: 70; Jump: 10), @@ -1051,7 +1051,7 @@ begin gMonsters[a].Update(); end else - begin + begin gMonsters[a].Free(); gMonsters[a] := nil; end; @@ -1416,7 +1416,7 @@ begin FWaitAttackAnim := False; FChainFire := False; FShellTimer := -1; - + FState := STATE_SLEEP; FCurAnim := ANIM_SLEEP; @@ -1790,7 +1790,7 @@ begin // Ýòî çíà÷èò: dX := -frameWidth - animDeltaX + hitX + hitWidth + hitX end; end - else // Ïðàâàÿ àíèìàöèÿ + else // Ïðàâàÿ àíèìàöèÿ begin dx := MONSTER_ANIMTABLE[FMonsterType].AnimDeltaRight[FCurAnim].X; dy := MONSTER_ANIMTABLE[FMonsterType].AnimDeltaRight[FCurAnim].Y; @@ -1876,7 +1876,7 @@ begin FObj.Rect := MONSTERTABLE[FMonsterType].Rect; FHealth := MONSTERTABLE[FMonsterType].Health; - FAmmo := 0; + FAmmo := 0; FPain := 0; end; else Exit; @@ -1886,7 +1886,7 @@ begin if ForceAnim <> 255 then Anim := ForceAnim; -// Åñëè àíèìàöèÿ íîâàÿ - ïåðåçàïóñêàåì å¸: +// Åñëè àíèìàöèÿ íîâàÿ - ïåðåçàïóñêàåì å¸: if FCurAnim <> Anim then if FAnim[Anim, FDirection] <> nil then begin @@ -2272,7 +2272,7 @@ begin FDirection := D_LEFT else FDirection := D_RIGHT; - + goto _end; end; @@ -2675,7 +2675,7 @@ _end: FWaitAttackAnim := False; end - + else // Àíèìàöèÿ àòàêè åùå èäåò (èñêëþ÷åíèå - Lost_Soul): if (FMonsterType = MONSTER_SOUL) or ( (not FWaitAttackAnim) and @@ -3430,7 +3430,7 @@ _end: FWaitAttackAnim := False; end - + else // Àíèìàöèÿ àòàêè åùå èäåò (èñêëþ÷åíèå - Lost_Soul): if (FMonsterType = MONSTER_SOUL) or ( (not FWaitAttackAnim) and @@ -3451,7 +3451,7 @@ _end: // Lost_Soul óêóñèë êîãî-òî => ïåðåõîäèò íà øàã: if FMonsterType = MONSTER_SOUL then SetState(STATE_GO); - + MONSTER_FISH: g_Weapon_Hit(@FObj, 10, FUID, HIT_SOME); @@ -3528,7 +3528,7 @@ _end: if g_Obj_CollidePanel(@FObj, 0, 0, PANEL_LIFTLEFT or PANEL_LIFTRIGHT) and not ((FState = STATE_DEAD) or (FState = STATE_DIE)) then FObj.Vel.X := oldvelx; - + // Åñëè åñòü àíèìàöèÿ, òî ïóñòü îíà èäåò: if FAnim[FCurAnim, FDirection] <> nil then FAnim[FCurAnim, FDirection].Update(); diff --git a/src/game/g_net.pas b/src/game/g_net.pas index a1c0770..1219448 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -535,7 +535,7 @@ begin ENET_EVENT_TYPE_DISCONNECT: begin ID := Byte(NetEvent.peer^.data^); - if ID > High(NetClients) then Exit; + if ID > High(NetClients) then Exit; TC := @NetClients[ID]; if TC = nil then Exit; @@ -745,7 +745,7 @@ begin end; ProcessLoading(); - + e_PollInput(); if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then diff --git a/src/game/g_nethandler.pas b/src/game/g_nethandler.pas index 996ddad..c25b314 100644 --- a/src/game/g_nethandler.pas +++ b/src/game/g_nethandler.pas @@ -126,4 +126,3 @@ begin end; end. - diff --git a/src/game/g_netmaster.pas b/src/game/g_netmaster.pas index 57d53c9..194a1ed 100644 --- a/src/game/g_netmaster.pas +++ b/src/game/g_netmaster.pas @@ -559,7 +559,7 @@ begin slDirPressed := True; end; end; - + if e_KeyPressed(IK_UP) then begin if not slDirPressed then diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 7cc04d2..a88513a 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -423,7 +423,7 @@ var begin Result := 0; if not gGameOn then Exit; - + GT := e_Raw_Read_LongWord(P); PID := C^.Player; Pl := g_Player_Get(PID); @@ -566,7 +566,7 @@ begin Pl := g_Player_Get(C^.Player); if Pl = nil then Exit; Name := Pl.Name; - + if Start then begin if not g_Console_CommandBlacklisted(Command) then diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 574a28b..fab3028 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -121,7 +121,7 @@ begin gDrawBackGround := True; gShowMessages := True; gRevertPlayers := False; - + for i := 0 to e_MaxJoys-1 do e_JoystickDeadzones[i] := 8192; @@ -299,7 +299,7 @@ begin if (Team < TEAM_RED) or (Team > TEAM_BLUE) then Team := TEAM_RED; end; - + for i := 0 to e_MaxJoys-1 do e_JoystickDeadzones[i] := config.ReadInt('Joysticks', 'Deadzone' + IntToStr(i), 8192); @@ -498,7 +498,7 @@ begin WriteInt('Player2', 'blue', Color.B); WriteInt('Player2', 'team', Team); end; - + for i := 0 to e_MaxJoys-1 do config.WriteInt('Joysticks', 'Deadzone' + IntToStr(i), e_JoystickDeadzones[i]); diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index b522ae2..8a2265a 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -233,7 +233,7 @@ begin begin // Àíèìèðîâàííàÿ òåêñòóðà if FTextureIDs[FCurTexture].AnTex = nil then Exit; - + for xx := 0 to (Width div FTextureWidth)-1 do for yy := 0 to (Height div FTextureHeight)-1 do FTextureIDs[FCurTexture].AnTex.Draw( @@ -356,7 +356,7 @@ begin else if AnimLoop = 2 then FTextureIDs[FCurTexture].AnTex.Loop := False; - + FTextureIDs[FCurTexture].AnTex.Reset(); end; @@ -396,7 +396,7 @@ begin else if AnimLoop = 2 then FTextureIDs[FCurTexture].AnTex.Loop := False; - + FTextureIDs[FCurTexture].AnTex.Reset(); end; diff --git a/src/game/g_player.pas b/src/game/g_player.pas index bb9b414..a8ddec7 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -399,7 +399,7 @@ type procedure Draw(); procedure SaveState(var Mem: TBinMemoryWriter); procedure LoadState(var Mem: TBinMemoryReader); - + property Obj: TObj read FObj; property State: Byte read FState; property Mess: Boolean read FMess; @@ -1429,7 +1429,7 @@ var begin if (gShells = nil) or (Length(gShells) = 0) then Exit; - + with gShells[CurrentShell] do begin SpriteID := 0; @@ -1520,7 +1520,7 @@ var else g_Sound_PlayExAt('SOUND_PLAYER_SHELL' + IntToStr(k), X, Y); end; - + begin // Êóñêè ìÿñà: if gGibs <> nil then @@ -1542,7 +1542,7 @@ begin Obj.Vel.X := -(vel.X div 2); if WordBool(mr and (MOVE_HITCEIL or MOVE_HITLAND)) then Obj.Vel.Y := -(vel.Y div 2); - + if (Obj.Vel.X >= 0) then begin // Clockwise RAngle := RAngle + Abs(Obj.Vel.X)*6 + Abs(Obj.Vel.Y); @@ -1680,7 +1680,7 @@ begin SetLength(gShells, MaxGibs); CurrentGib := 0; CurrentShell := 0; - + if gCorpses <> nil then for i := 0 to High(gCorpses) do gCorpses[i].Free(); @@ -5686,7 +5686,7 @@ begin if gTime mod (GAME_TICK*2) <> 0 then begin g_Obj_Move(@FObj, True, True, True); - + Exit; end; @@ -6344,7 +6344,7 @@ begin else begin EnableAI := True; - + // Ïðîâåðÿåì, îòêëþ÷¸í ëè AI áîòîâ if (g_debug_BotAIOff = 1) and (Team = TEAM_RED) then EnableAI := False; @@ -6843,7 +6843,7 @@ end;} procedure TBot.SelectWeapon(Dist: Integer); var a: Integer; - + function HaveAmmo(weapon: Byte): Boolean; begin case weapon of diff --git a/src/game/g_playermodel.pas b/src/game/g_playermodel.pas index a009823..a2ceab0 100644 --- a/src/game/g_playermodel.pas +++ b/src/game/g_playermodel.pas @@ -20,7 +20,7 @@ const MODELSOUND_PAIN = 0; MODELSOUND_DIE = 1; - + type TModelInfo = record Name: String; @@ -258,7 +258,7 @@ begin WAD.Free(); Exit; end; - + config := TConfig.CreateMem(pData, len); FreeMem(pData); @@ -268,7 +268,7 @@ begin config.Free(); WAD.Free(); Exit; - end; + end; SetLength(PlayerModelsArray, Length(PlayerModelsArray)+1); ID := High(PlayerModelsArray); @@ -582,7 +582,7 @@ begin for a := WEAPON_SAW to WEAPON_SUPERPULEMET do for b := W_POS_NORMAL to W_POS_DOWN do for c := W_ACT_NORMAL to W_ACT_FIRE do - e_DeleteTexture(WeaponID[a][b][c]); + e_DeleteTexture(WeaponID[a][b][c]); e_WriteLog('Releasing models...', MSG_NOTIFY); @@ -611,7 +611,7 @@ begin for b := 0 to High(Gibs) do begin e_DeleteTexture(Gibs[b].ID); - e_DeleteTexture(Gibs[b].MaskID); + e_DeleteTexture(Gibs[b].MaskID); end; end; diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index dcc91b7..eb067ea 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -34,7 +34,7 @@ Type FWidth: Word; FMinLength: Byte; // Îæèäàíèå ïîñëå ïðîèãðûâàíèÿ FRevert: Boolean; // Ñìåíà êàäðîâ îáðàòíàÿ? - + public constructor Create(FramesID: DWORD; Loop: Boolean; Speed: Byte); destructor Destroy(); override; @@ -158,7 +158,7 @@ begin if WAD.GetResource(SectionName, ResourceName, TextureData, ResourceLength) then begin - if e_CreateTextureMem(TextureData, ID) then + if e_CreateTextureMem(TextureData, ID) then Result := True else FreeMem(TextureData); @@ -240,7 +240,7 @@ var a: DWORD; begin Result := False; - + if TexturesArray = nil then Exit; if TextureName = '' then Exit; diff --git a/src/game/g_triggers.pas b/src/game/g_triggers.pas index d1b2c67..1bfd188 100644 --- a/src/game/g_triggers.pas +++ b/src/game/g_triggers.pas @@ -805,7 +805,7 @@ begin TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF: begin PressCount := PressCount + 1; - + if PressTime = -1 then PressTime := Data.Wait; @@ -1166,7 +1166,7 @@ begin p := g_Player_Get(ActivateUID); if p = nil then Exit; - + if Data.ResetVel then begin p.GameVelX := 0; diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index 6f6b60b..0e80e58 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -1462,7 +1462,7 @@ begin triggers := nil; ShotType := WEAPON_MANCUB_FIRE; - g_Frames_Get(FramesID, 'FRAMES_WEAPON_MANCUBFIRE'); + g_Frames_Get(FramesID, 'FRAMES_WEAPON_MANCUBFIRE'); Animation := TAnimation.Create(FramesID, True, 4); end; @@ -1486,7 +1486,7 @@ begin if Integer(find_id) >= High(Shots) then SetLength(Shots, find_id + 64) end; - + with Shots[find_id] do begin g_Obj_Init(@Obj); @@ -2097,7 +2097,7 @@ begin if Shots = nil then Exit; if (I > High(Shots)) or (I < 0) then Exit; - + with Shots[I] do begin if ShotType = 0 then Exit; @@ -2141,7 +2141,7 @@ begin s := 'FRAMES_EXPLODE_PLASMA' else s := 'FRAMES_EXPLODE_BSPFIRE'; - + if g_Frames_Get(TextureID, s) and loud then begin Anim := TAnimation.Create(TextureID, False, 3); diff --git a/src/lib/enet/enet.pp b/src/lib/enet/enet.pp index bfc7bef..6a43f14 100644 --- a/src/lib/enet/enet.pp +++ b/src/lib/enet/enet.pp @@ -102,7 +102,7 @@ Const ENET_PACKET_FLAG_UNSEQUENCED = 2; ENET_PACKET_FLAG_NO_ALLOCATE = 4; ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = 8; - ENET_PACKET_FLAG_SENT = 256; + ENET_PACKET_FLAG_SENT = 256; Type ENetPeerState = ( ENET_PEER_STATE_DISCONNECTED, @@ -404,4 +404,3 @@ function ENET_VERSION(): ENetVersion; inline; end; end. - diff --git a/src/lib/enet/enetcallbacks.pp b/src/lib/enet/enetcallbacks.pp index fafd66e..850eaad 100644 --- a/src/lib/enet/enetcallbacks.pp +++ b/src/lib/enet/enetcallbacks.pp @@ -51,4 +51,3 @@ type implementation end. - diff --git a/src/lib/enet/enetlist.pp b/src/lib/enet/enetlist.pp index 854a1b7..fd368ed 100644 --- a/src/lib/enet/enetlist.pp +++ b/src/lib/enet/enetlist.pp @@ -32,7 +32,7 @@ unit enetlist; } interface - + type {$PACKRECORDS C} @@ -92,4 +92,3 @@ function enet_list_back( list: pENetList ): Pointer; inline; end; end. - diff --git a/src/lib/enet/enetplatform.pp b/src/lib/enet/enetplatform.pp index 88c908a..cf39279 100644 --- a/src/lib/enet/enetplatform.pp +++ b/src/lib/enet/enetplatform.pp @@ -105,4 +105,3 @@ function ENET_SOCKETSET_CHECK( var sockset: ENetSocketSet; socket: ENetSocket ): end; end. - diff --git a/src/lib/enet/enetprotocol.pp b/src/lib/enet/enetprotocol.pp index 520600e..46ead1c 100644 --- a/src/lib/enet/enetprotocol.pp +++ b/src/lib/enet/enetprotocol.pp @@ -211,4 +211,3 @@ type implementation end. - diff --git a/src/lib/enet/enettime.pp b/src/lib/enet/enettime.pp index eb1be53..3d4cc1e 100644 --- a/src/lib/enet/enettime.pp +++ b/src/lib/enet/enettime.pp @@ -66,4 +66,3 @@ function ENET_TIME_DIFFERENCE( const a, b: LongInt ): LongInt; inline; end; end. - diff --git a/src/lib/enet/enettypes.pp b/src/lib/enet/enettypes.pp index 53790ce..28dad9b 100644 --- a/src/lib/enet/enettypes.pp +++ b/src/lib/enet/enettypes.pp @@ -52,4 +52,3 @@ type implementation end. - diff --git a/src/lib/fmod/fmod.inc b/src/lib/fmod/fmod.inc index b764206..b0421d7 100644 --- a/src/lib/fmod/fmod.inc +++ b/src/lib/fmod/fmod.inc @@ -20,4 +20,4 @@ {$ENDIF} (* Force four-byte enums *) -{$Z4} \ No newline at end of file +{$Z4} diff --git a/src/lib/fmod/fmodpresets.pas b/src/lib/fmod/fmodpresets.pas index a27d59f..26905b2 100644 --- a/src/lib/fmod/fmodpresets.pas +++ b/src/lib/fmod/fmodpresets.pas @@ -16,15 +16,15 @@ uses fmodtypes; (* -[DEFINE] +[DEFINE] [ - [NAME] + [NAME] FMOD_REVERB_PRESETS - [DESCRIPTION] + [DESCRIPTION] A set of predefined environment PARAMETERS, created by Creative Labs These are used to initialize an FMOD_REVERB_PROPERTIES structure statically. - ie + ie FMOD_REVERB_PROPERTIES prop = FMOD_PRESET_GENERIC; [PLATFORMS] diff --git a/src/lib/fmod/fmodtypes.pas b/src/lib/fmod/fmodtypes.pas index 8402041..bdd5942 100644 --- a/src/lib/fmod/fmodtypes.pas +++ b/src/lib/fmod/fmodtypes.pas @@ -30,9 +30,9 @@ type FMOD_CHANNELGROUP = Pointer; FMOD_DSP = Pointer; FMOD_BOOL = LongBool; - FMOD_POLYGON = Pointer; + FMOD_POLYGON = Pointer; FMOD_GEOMETRY = Pointer; - FMOD_SYNCPOINT = Pointer; + FMOD_SYNCPOINT = Pointer; FMOD_TIMEUNIT = Cardinal; fmod_mode=cardinal; @@ -69,7 +69,7 @@ type *) type PFMOD_VECTOR = ^FMOD_VECTOR; FMOD_VECTOR = record - x, y, z: Single; + x, y, z: Single; end; @@ -253,7 +253,7 @@ type FMOD_OUTPUTTYPE_GC, (* GameCube - Native hardware output. (Default on GameCube) *) FMOD_OUTPUTTYPE_XBOX360, (* Xbox 360 - Native hardware output. (Default on Xbox 360) *) FMOD_OUTPUTTYPE_PSP, (* PSP - Native hardware output. (Default on PSP) *) - FMOD_OUTPUTTYPE_WII, (* Wii - Native hardware output. (Default on Wii) *) + FMOD_OUTPUTTYPE_WII, (* Wii - Native hardware output. (Default on Wii) *) FMOD_OUTPUTTYPE_MAX (* Maximum number of output types supported. *) ); @@ -287,7 +287,7 @@ const FMOD_CAPS_REVERB_EAX2 = $00000100; (* Device supports EAX2 reverb. *) FMOD_CAPS_REVERB_EAX3 = $00000200; (* Device supports EAX3 reverb. *) FMOD_CAPS_REVERB_EAX4 = $00000400; (* Device supports EAX4 reverb *) - FMOD_CAPS_REVERB_EAX5 = $00000800; (* Device supports EAX5 reverb *) + FMOD_CAPS_REVERB_EAX5 = $00000800; (* Device supports EAX5 reverb *) FMOD_CAPS_REVERB_I3DL2 = $00001000; (* Device supports I3DL2 reverb. *) FMOD_CAPS_REVERB_LIMITED = $00002000; (* Device supports some form of limited hardware reverb, maybe parameterless and only selectable by environment. *) @@ -707,9 +707,9 @@ type type FMOD_CHANNEL_CALLBACKTYPE = ( - FMOD_CHANNEL_CALLBACKTYPE_END, (* Called when a sound ends. *) - FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE, (* Called when a voice is swapped out or swapped in. *) - FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT, (* Called when a syncpoint is encountered. Can be from wav file markers. *) + FMOD_CHANNEL_CALLBACKTYPE_END, (* Called when a sound ends. *) + FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE, (* Called when a voice is swapped out or swapped in. *) + FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT, (* Called when a syncpoint is encountered. Can be from wav file markers. *) FMOD_CHANNEL_CALLBACKTYPE_OCCLUSION, (* Called when the channel has its geometry occlusion value calculated. Can be used to clamp or change the value. *) FMOD_CHANNEL_CALLBACKTYPE_MAX , (* Maximum number of callback types supported. *) diff --git a/src/shared/BinEditor.pas b/src/shared/BinEditor.pas index f59d4f3..8a8e532 100644 --- a/src/shared/BinEditor.pas +++ b/src/shared/BinEditor.pas @@ -118,7 +118,7 @@ procedure ZeroMemory(Dest: Pointer; Len: Cardinal); begin FillChar(Dest^, Len, 0); end; - + { T B i n M e m o r y W r i t e r : } Constructor TBinMemoryWriter.Create(aSize: Cardinal); @@ -141,7 +141,7 @@ begin FreeMem(FData); FData := nil; end; - + Inherited; end; @@ -405,7 +405,7 @@ begin CopyMemory(@len, Pointer(Cardinal(FData) + FPosition), SizeOf(Byte)); - + if (FPosition + SizeOf(Byte) + len) <= FSize then begin FPosition := FPosition + SizeOf(Byte); diff --git a/src/shared/CONFIG.pas b/src/shared/CONFIG.pas index 00129f3..8420d0b 100644 --- a/src/shared/CONFIG.pas +++ b/src/shared/CONFIG.pas @@ -245,7 +245,7 @@ end; procedure TConfig.WriteBool(Section, Param: string; Value: Boolean); begin - WriteParam(Section, Param, BoolToStr(Value)); + WriteParam(Section, Param, BoolToStr(Value)); end; procedure TConfig.WriteInt(Section, Param: string; Value: Integer); diff --git a/src/shared/CONFIGSIMPLE.pas b/src/shared/CONFIGSIMPLE.pas index 05960de..31b1573 100644 --- a/src/shared/CONFIGSIMPLE.pas +++ b/src/shared/CONFIGSIMPLE.pas @@ -38,7 +38,7 @@ begin if cfg_data = nil then Exit; d_len := Length(cfg_data); - + for a := 0 to d_len do begin len := Length(cfg_data[a]); diff --git a/src/shared/MAPREADER.pas b/src/shared/MAPREADER.pas index 868c1b0..f9f5780 100644 --- a/src/shared/MAPREADER.pas +++ b/src/shared/MAPREADER.pas @@ -33,7 +33,7 @@ type function LoadMap(Data: Pointer): Boolean; procedure FreeMap(); function HandledVersion(): Byte; virtual; - + property GetError: Byte read FError; property GetVersion: Byte read FVersion; end; diff --git a/src/shared/MAPSTRUCT.pas b/src/shared/MAPSTRUCT.pas index 5b26f65..1124b25 100644 --- a/src/shared/MAPSTRUCT.pas +++ b/src/shared/MAPSTRUCT.pas @@ -105,7 +105,7 @@ type TexturePanel: Integer; TriggerType: Byte; ActivateType: Byte; - Keys: Byte; + Keys: Byte; DATA: Byte128; end; diff --git a/src/shared/MAPWRITER.pas b/src/shared/MAPWRITER.pas index 39ca417..6399330 100644 --- a/src/shared/MAPWRITER.pas +++ b/src/shared/MAPWRITER.pas @@ -144,7 +144,7 @@ begin for a := 0 to High(Areas) do CopyMemory(Pointer(LongWord(Data)+a*Size), @Areas[a], size); end; - + Result := True; end; @@ -173,7 +173,7 @@ begin for a := 0 to High(Items) do CopyMemory(Pointer(LongWord(Data)+a*size), @Items[a], size); end; - + Result := True; end; @@ -202,7 +202,7 @@ begin for a := 0 to High(Monsters) do CopyMemory(Pointer(LongWord(Data)+a*Size), @Monsters[a], size); end; - + Result := True; end; @@ -231,7 +231,7 @@ begin for a := 0 to High(Panels) do CopyMemory(Pointer(LongWord(Data)+a*size), @Panels[a], size); end; - + Result := True; end; @@ -311,7 +311,7 @@ begin CopyMemory(Pointer(LongWord(Data)), @MapHeader, size); end; - + Result := True; end; diff --git a/src/shared/WADSTRUCT.pas b/src/shared/WADSTRUCT.pas index d7d7b06..7c2546c 100644 --- a/src/shared/WADSTRUCT.pas +++ b/src/shared/WADSTRUCT.pas @@ -23,7 +23,7 @@ interface type Char16 = packed array[0..15] of Char; - + TWADHeaderRec_1 = packed record RecordsCount: Word; end;