summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c50951)
raw | patch | inline | side by side (parent: 5c50951)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 6 Apr 2016 00:11:09 +0000 (03:11 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 6 Apr 2016 00:11:52 +0000 (03:11 +0300) |
42 files changed:
index 49bdaa6b55252d2aa1edd94714294bd6db273d08..07ad1744eb81d6b089e4919486324675a1394ff3 100644 (file)
OldID: DWORD;
Pixels: Pointer;
end;
-
+
var
e_Textures: array of TTexture = nil;
e_TextureFonts: array of TTextureFont = nil;
end;
end;
end;
-
+
if e_TextureFonts <> nil then
begin
e_WriteLog(' Releasing texturefonts...', MSG_NOTIFY);
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 67e0b5d9a2201ad51cbbf4a4e310cf7f715a5f1d..40b7522c8690c3d0896fa842424fc0facccf5c30 100644 (file)
--- a/src/engine/e_input.pas
+++ b/src/engine/e_input.pas
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;
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;
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();
var
KeyBuffer: array [0..e_MaxKbdKeys] of Boolean;
- Joysticks: array of TJoystick = nil;
+ Joysticks: array of TJoystick = nil;
function OpenJoysticks(): Byte;
var
SDL_JoystickClose(Handle);
SetLength(Joysticks, 0);
end;
-
+
function PollKeyboard(): Boolean;
var
Keys: PByte;
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;
if e_KeyNames[i] = 'unknown key' then
e_KeyNames[i] := '';
end;
-
+
// joysticks
for j := 0 to e_MaxJoys-1 do
begin
end;
end;
end;
-
+
function e_InitInput(): Boolean;
begin
Result := False;
-
+
e_JoysticksAvailable := OpenJoysticks();
e_EnableInput := True;
GenerateKeyNames();
ReleaseJoysticks();
e_JoysticksAvailable := 0;
end;
-
+
procedure e_ClearInputBuffer();
var
i, j, d: Integer;
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;
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;
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);
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
Key := (Key - JOYH_BEG) mod (e_MaxJoyHats*4);
dir := Key mod 4;
Result := Joysticks[JoyI].HatBuf[Key div 4, dir];
- end;
+ end;
end;
end;
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;
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
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
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;
index 504b3fb0cb07af035fbaff8068c022066bab9d87..1c470fa6b3fe997e483e451bbaa4b9a19ab42c1e 100644 (file)
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;
glTexImage2D( GL_TEXTURE_2D, 0, 3, Width, Height,
0, GL_RGB, GL_UNSIGNED_BYTE, pData );
end;
-
+
glBindTexture(GL_TEXTURE_2D, 0);
Result := Texture;
TFmt := GL_RGB
else
TFmt := GL_RGBA;
-
+
Texture := CreateTexture( Width, Height, TFmt, Image );
FreeMem( Image );
-
+
if Fmt <> nil then Fmt^ := TFmt;
pWidth := Width;
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;
TFmt := GL_RGB
else
TFmt := GL_RGBA;
-
+
Texture := CreateTexture( Width, Height, TFmt, Image );
FreeMem( Image );
-
+
if Fmt <> nil then Fmt^ := TFmt;
pWidth := Width;
BPP: Byte;
Base: PByte;
TFmt: Word;
-
+
begin
Result := False;
end;
end.
-
diff --git a/src/game/CustomRes.rc b/src/game/CustomRes.rc
index ddff5315601019e53cb9cd182c09697089ee7831..9be3bbde648d3be5efa9dd8a47faffadd3a1deb1 100644 (file)
--- a/src/game/CustomRes.rc
+++ b/src/game/CustomRes.rc
-dficon ICON "Icon.ico"
+dficon ICON "Icon.ico"
diff --git a/src/game/MakeRes.bat b/src/game/MakeRes.bat
index 0a910e4c4244d95a154864bb679905f9547110ab..d3da9408344868b9ba9fa7d96bc30778b825b99e 100644 (file)
--- a/src/game/MakeRes.bat
+++ b/src/game/MakeRes.bat
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 4b505ab50bcd76074c76e772a25b76c9aec226f0..3807b540c996cfdc75bff917eec7d7de17ee471b 100644 (file)
--- a/src/game/g_basic.pas
+++ b/src/game/g_basic.pas
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;
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
else
Break;
end;
-
+
else {case}
Break;
end; {case}
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 13ffb1064132327dbe8d6cff0d81522af9f9fb96..70dba84c6abbe6fe6663cf7058cb9ef4e8b0937d 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_Texture_DeleteAll();
g_Frames_DeleteAll();
g_Menu_Free();
-
+
if NetInitDone then g_Net_Free;
// Íàäî óäàëèòü êàðòó ïîñëå òåñòà:
ProcessLoading();
e_PollInput();
-
+
if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then
begin
State := 0;
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;
gCoopTotalSecrets := 0;
gLastMap := False;
end;
-
+
g_Game_ExecuteEvent('onmapstart');
end;
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
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
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 82a45e3e21e8724a2c9b5c66864b394f0d508e1a..f6558892a8263b9a338cbded80607b1cee17ed2a 100644 (file)
--- a/src/game/g_gfx.pas
+++ b/src/game/g_gfx.pas
if Width < 0 then
Exit;
-
+
if y < 0 then
begin
Height := Height + y;
Green := 255;
Blue := 255;
Alpha := 255;
-
+
State := STATE_NORMAL;
Time := 0;
LiveTime := 65535;
ParticleType := PARTICLE_BUBBLES;
-
+
CorrectOffsets(CurrentParticle);
end;
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 34436a6458ed56d0239f25fb459586e591e1c41d..ba095b7a79f616613e233d541124cb00c817afd6 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
wParam: LongInt;
lParam: LongInt;
end;
-
+
TFontType = (FONT_TEXTURE, FONT_CHAR);
TFont = class(TObject)
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;
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);
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
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;
begin
inherited Create();
- FFont := TFont.Create(FontID, FONT_CHAR);
+ FFont := TFont.Create(FontID, FONT_CHAR);
FText := Text;
FFixedLen := 0;
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);
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;
w, h: Word;
begin
Result := 0;
-
+
for a := 0 to 255 do
begin
FFont.GetTextSize(e_KeyNames[a], w, h);
begin
FKey := IK_ENTER; // <Enter>
FIsQuery := False;
-
+
with FWindow do
if FDefControl <> '' then
SetActive(GetControl(FDefControl))
else
SetActive(nil);
- end;
+ end;
end;
end;
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();
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);
a := not a;
if a then Exit;
-
+
if FModel <> nil then FModel.Update;
end;
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
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;
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);
begin
if FItems <> nil then
FItems := nil;
-
+
FItems := Items;
FStartLine := 0;
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
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 e912c427e11037a5d5fc9687c3578cdf93ae42f7..c5361819ea9ef8d81e414330cd72fff31fe1a0b5 100644 (file)
--- a/src/game/g_items.pas
+++ b/src/game/g_items.pas
with gItems[i] do
begin
nxt := False;
-
+
if Live then
begin
if Fall then
index b2d5dcf67cc15a025a777811103fb9584b24c67d..b1513f1517d1e398c2f1a6406dfbf8e91da4d921 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
I_TEXTURE_ENDPIC,
- I_VERSION,
+ I_VERSION,
I_FATAL_ERROR,
I_SIMPLE_ERROR,
'Íàñòðîéêè äæîéñòèêîâ'),
('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 aa0c4cb0307de5157bec744f5942cd13eb7ceef5..90cb224e401f03ba139123567a9177b77e6c16c8 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
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
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;
ResList := WAD.GetResourcesList('');
WAD.Free();
-
+
if ResList <> nil then
for a := 0 to High(ResList) do if ResList[a] = ResName then
begin
if not (drawDoors xor panels[a].Door) then
panels[a].Draw();
end;
-
+
begin
case PanelType of
PANEL_WALL: DrawPanels(gWalls);
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
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 45413defc9f4baf4bc80a57487cb2dd838c4dbfd..21eba04fdf38c99bc261d872b2bcc502e9969b91 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
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'));
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'));
end;
end;
end;
-
+
ProcSelectMap(nil);
end;
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';
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
index 15790197f17980f45913930944a37349e8bec432..1c9040aabb0f5cf0b5f052fbaa88958827cb5530 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
(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),
gMonsters[a].Update();
end
else
- begin
+ begin
gMonsters[a].Free();
gMonsters[a] := nil;
end;
FWaitAttackAnim := False;
FChainFire := False;
FShellTimer := -1;
-
+
FState := STATE_SLEEP;
FCurAnim := ANIM_SLEEP;
// Ýòî çíà÷èò: 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;
FObj.Rect := MONSTERTABLE[FMonsterType].Rect;
FHealth := MONSTERTABLE[FMonsterType].Health;
- FAmmo := 0;
+ FAmmo := 0;
FPain := 0;
end;
else Exit;
if ForceAnim <> 255 then
Anim := ForceAnim;
-// Åñëè àíèìàöèÿ íîâàÿ - ïåðåçàïóñêàåì å¸:
+// Åñëè àíèìàöèÿ íîâàÿ - ïåðåçàïóñêàåì å¸:
if FCurAnim <> Anim then
if FAnim[Anim, FDirection] <> nil then
begin
FDirection := D_LEFT
else
FDirection := D_RIGHT;
-
+
goto _end;
end;
FWaitAttackAnim := False;
end
-
+
else // Àíèìàöèÿ àòàêè åùå èäåò (èñêëþ÷åíèå - Lost_Soul):
if (FMonsterType = MONSTER_SOUL) or
( (not FWaitAttackAnim) and
FWaitAttackAnim := False;
end
-
+
else // Àíèìàöèÿ àòàêè åùå èäåò (èñêëþ÷åíèå - Lost_Soul):
if (FMonsterType = MONSTER_SOUL) or
( (not FWaitAttackAnim) and
// Lost_Soul óêóñèë êîãî-òî => ïåðåõîäèò íà øàã:
if FMonsterType = MONSTER_SOUL then
SetState(STATE_GO);
-
+
MONSTER_FISH:
g_Weapon_Hit(@FObj, 10, FUID, HIT_SOME);
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 a1c07701018a99b84c38dcf198214d923bbd0e77..12194483511c729b73f6feaa1d6280cb12d8485d 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
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;
end;
ProcessLoading();
-
+
e_PollInput();
if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then
index 996ddad73065a6a5c18f8cdafdb1366ef7cdea4d..c25b3145f111161f870e782370254aeaef397410 100644 (file)
end;
end.
-
index 57d53c989550f8f3f53ba0b2bf255d736f5cea82..194a1eda69d89aaaa2212206c09b3f4cc2293086 100644 (file)
--- a/src/game/g_netmaster.pas
+++ b/src/game/g_netmaster.pas
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 7cc04d223065c043946347a45bc23b08497aef5c..a88513acac78c6a4f5bcb799c91af45f2588e739 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
begin
Result := 0;
if not gGameOn then Exit;
-
+
GT := e_Raw_Read_LongWord(P);
PID := C^.Player;
Pl := g_Player_Get(PID);
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 574a28beeaae652ca11f4076aa674d2de57585c4..fab30284a197d776eb4908364ff89ea9e618631c 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gDrawBackGround := True;
gShowMessages := True;
gRevertPlayers := False;
-
+
for i := 0 to e_MaxJoys-1 do
e_JoystickDeadzones[i] := 8192;
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);
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 b522ae2beb5c49b38a31e602f7227bd238f2ae3a..8a2265af842d9a546aa5eea28bd1c384875b43b1 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
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(
else
if AnimLoop = 2 then
FTextureIDs[FCurTexture].AnTex.Loop := False;
-
+
FTextureIDs[FCurTexture].AnTex.Reset();
end;
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 bb9b4149dca2a8bfcc677691bf985814fbb1b4ca..a8ddec74f3634655089671cf4a1ed81cbb018f4f 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
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;
begin
if (gShells = nil) or (Length(gShells) = 0) then
Exit;
-
+
with gShells[CurrentShell] do
begin
SpriteID := 0;
else
g_Sound_PlayExAt('SOUND_PLAYER_SHELL' + IntToStr(k), X, Y);
end;
-
+
begin
// Êóñêè ìÿñà:
if gGibs <> nil then
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);
SetLength(gShells, MaxGibs);
CurrentGib := 0;
CurrentShell := 0;
-
+
if gCorpses <> nil then
for i := 0 to High(gCorpses) do
gCorpses[i].Free();
if gTime mod (GAME_TICK*2) <> 0 then
begin
g_Obj_Move(@FObj, True, True, True);
-
+
Exit;
end;
else
begin
EnableAI := True;
-
+
// Ïðîâåðÿåì, îòêëþ÷¸í ëè AI áîòîâ
if (g_debug_BotAIOff = 1) and (Team = TEAM_RED) then
EnableAI := False;
procedure TBot.SelectWeapon(Dist: Integer);
var
a: Integer;
-
+
function HaveAmmo(weapon: Byte): Boolean;
begin
case weapon of
index a00982375150601c281aaae19232330e4405a027..a2ceab034c4c9739583be4a580241e1eeb6566ac 100644 (file)
MODELSOUND_PAIN = 0;
MODELSOUND_DIE = 1;
-
+
type
TModelInfo = record
Name: String;
WAD.Free();
Exit;
end;
-
+
config := TConfig.CreateMem(pData, len);
FreeMem(pData);
config.Free();
WAD.Free();
Exit;
- end;
+ end;
SetLength(PlayerModelsArray, Length(PlayerModelsArray)+1);
ID := High(PlayerModelsArray);
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);
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;
index dcc91b7dda3e9b1a633a57890c3e36ba7f6c0890..eb067ea38e08cbd41c6a8121d24d3bfdc3ba81ca 100644 (file)
--- a/src/game/g_textures.pas
+++ b/src/game/g_textures.pas
FWidth: Word;
FMinLength: Byte; // Îæèäàíèå ïîñëå ïðîèãðûâàíèÿ
FRevert: Boolean; // Ñìåíà êàäðîâ îáðàòíàÿ?
-
+
public
constructor Create(FramesID: DWORD; Loop: Boolean; Speed: Byte);
destructor Destroy(); override;
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);
a: DWORD;
begin
Result := False;
-
+
if TexturesArray = nil then Exit;
if TextureName = '' then Exit;
index d1b2c67a43a94a473d45d508cb898f4d0eae6ad5..1bfd1883cab4b91538bc760b0fccc9e37731ae87 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF:
begin
PressCount := PressCount + 1;
-
+
if PressTime = -1 then
PressTime := Data.Wait;
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 6f6b60be4f374bee6f2a45d9bce097425dbbfa72..0e80e5846c557f7846bc1b3f04890f3ac48ee0a1 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
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;
if Integer(find_id) >= High(Shots) then
SetLength(Shots, find_id + 64)
end;
-
+
with Shots[find_id] do
begin
g_Obj_Init(@Obj);
if Shots = nil then
Exit;
if (I > High(Shots)) or (I < 0) then Exit;
-
+
with Shots[I] do
begin
if ShotType = 0 then Exit;
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 bfc7befdaf353f6e26342e529d045b4f42c6da96..6a43f146727ff50ac9df0dace1823dadd8af5261 100644 (file)
--- a/src/lib/enet/enet.pp
+++ b/src/lib/enet/enet.pp
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,
end;
end.
-
index fafd66e05f6a764c5810fb1d1ed4e45f6314c9c8..850eaad2cded30339e6748a556a2baa6d39cf20d 100644 (file)
implementation
end.
-
index 854a1b7057ba3c5ca210b2523afcc51e994b11e8..fd368ed72cccaa53954330cf6b1a966fed8ec3eb 100644 (file)
--- a/src/lib/enet/enetlist.pp
+++ b/src/lib/enet/enetlist.pp
}
interface
-
+
type
{$PACKRECORDS C}
end;
end.
-
index 88c908a7bb6e77cd2f0faf2efbf36c8dacfbe926..cf392792d18bf740723e2093300fcfbcebd37c96 100644 (file)
@@ -105,4 +105,3 @@ function ENET_SOCKETSET_CHECK( var sockset: ENetSocketSet; socket: ENetSocket ):
end;
end.
-
index 520600e77cebcf3faa4dc819b533fa04e7b5e0e0..46ead1c999b277965130f9c4551767d29378379a 100644 (file)
implementation
end.
-
index eb1be53fd096f7a37f023deff01365cc9e38a1fe..3d4cc1ee16bd6e5477b4a8467871c60951fbc3c2 100644 (file)
--- a/src/lib/enet/enettime.pp
+++ b/src/lib/enet/enettime.pp
end;
end.
-
index 53790ce6faa21fe1b3c9d07014c602ca12f7ede4..28dad9bb40253636c25b5464671fc8bb2e8cc69e 100644 (file)
implementation
end.
-
diff --git a/src/lib/fmod/fmod.inc b/src/lib/fmod/fmod.inc
index b7642069dc394e37d71696718e91c34dd7434f7e..b0421d7c7eaf102385d15625cd11a6efdf58051d 100644 (file)
--- a/src/lib/fmod/fmod.inc
+++ b/src/lib/fmod/fmod.inc
{$ENDIF}
(* Force four-byte enums *)
-{$Z4}
\ No newline at end of file
+{$Z4}
index a27d59f1c0a7ca158fe1d7ce8410f3c97b1fc25e..26905b286d660824542551ebef4afcc7b84780b5 100644 (file)
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]
index 8402041c4582c83153b8a92bcf2a8f04ef5e747c..bdd59427f3fb717ca1c003430e3fc0dce503a443 100644 (file)
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;
*)
type PFMOD_VECTOR = ^FMOD_VECTOR;
FMOD_VECTOR = record
- x, y, z: Single;
+ x, y, z: Single;
end;
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. *)
);
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. *)
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. *)
index f59d4f3a5f2fb3c64fe748aecb963e133bf64441..8a8e5321a63e78af6c5fb0232a571d8661fc8752 100644 (file)
--- a/src/shared/BinEditor.pas
+++ b/src/shared/BinEditor.pas
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);
FreeMem(FData);
FData := nil;
end;
-
+
Inherited;
end;
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 00129f32124f2d829fb4453bb60fda82e5fd8e9b..8420d0badd01b087e39adcd1632bb4fffae98818 100644 (file)
--- a/src/shared/CONFIG.pas
+++ b/src/shared/CONFIG.pas
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);
index 05960dec815359bcb95a7319fcec45f3729531b6..31b1573acbd98d88caa8b36dcd47d751dee9be7e 100644 (file)
if cfg_data = nil then Exit;
d_len := Length(cfg_data);
-
+
for a := 0 to d_len do
begin
len := Length(cfg_data[a]);
index 868c1b0f7f5218a71e7871f74a9e33851e0a50d4..f9f5780be6d6c930212edccae1218c482f39caac 100644 (file)
--- a/src/shared/MAPREADER.pas
+++ b/src/shared/MAPREADER.pas
function LoadMap(Data: Pointer): Boolean;
procedure FreeMap();
function HandledVersion(): Byte; virtual;
-
+
property GetError: Byte read FError;
property GetVersion: Byte read FVersion;
end;
index 5b26f6513a8ee1f2776b9dd6559d876587295351..1124b25d4000701c2c2677880a2fd90ae90f1113 100644 (file)
--- a/src/shared/MAPSTRUCT.pas
+++ b/src/shared/MAPSTRUCT.pas
TexturePanel: Integer;
TriggerType: Byte;
ActivateType: Byte;
- Keys: Byte;
+ Keys: Byte;
DATA: Byte128;
end;
index 39ca417c001f98507a6dac9285f8b5a434613af7..6399330fcfb71bf08e9de22c0a92ca874d2fdd05 100644 (file)
--- a/src/shared/MAPWRITER.pas
+++ b/src/shared/MAPWRITER.pas
for a := 0 to High(Areas) do
CopyMemory(Pointer(LongWord(Data)+a*Size), @Areas[a], size);
end;
-
+
Result := True;
end;
for a := 0 to High(Items) do
CopyMemory(Pointer(LongWord(Data)+a*size), @Items[a], size);
end;
-
+
Result := True;
end;
for a := 0 to High(Monsters) do
CopyMemory(Pointer(LongWord(Data)+a*Size), @Monsters[a], size);
end;
-
+
Result := True;
end;
for a := 0 to High(Panels) do
CopyMemory(Pointer(LongWord(Data)+a*size), @Panels[a], size);
end;
-
+
Result := True;
end;
CopyMemory(Pointer(LongWord(Data)), @MapHeader, size);
end;
-
+
Result := True;
end;
index d7d7b06e484aafb55a1884e9a33797b806819899..7c2546c63ac88c398ff5bfb398c92c5bd092be23 100644 (file)
--- a/src/shared/WADSTRUCT.pas
+++ b/src/shared/WADSTRUCT.pas
type
Char16 = packed array[0..15] of Char;
-
+
TWADHeaderRec_1 = packed record
RecordsCount: Word;
end;