summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 198c00b)
raw | patch | inline | side by side (parent: 198c00b)
author | binarymaster <x86corez@gmail.com> | |
Mon, 14 Aug 2017 08:56:27 +0000 (11:56 +0300) | ||
committer | binarymaster <x86corez@gmail.com> | |
Mon, 14 Aug 2017 08:56:27 +0000 (11:56 +0300) |
src/game/g_language.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history | |
src/game/g_options.pas | patch | blob | history |
index 61b46a3de377bd4babb4ae8329b386b428b5247c..aa828100dd7dbf497aeba34c62f548cd4a73226a 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
I_GAME_WEAPON7,
I_GAME_WEAPON8,
I_GAME_WEAPON9,
I_GAME_WEAPON7,
I_GAME_WEAPON8,
I_GAME_WEAPON9,
+ I_GAME_WEAPON10,
I_MENU_START_GAME,
I_MENU_MAIN_MENU,
I_MENU_START_GAME,
I_MENU_MAIN_MENU,
('GAME WEAPON4', 'Super Shotgun',
'Äâóñòâîëêà'),
('GAME WEAPON5', 'Chaingun',
('GAME WEAPON4', 'Super Shotgun',
'Äâóñòâîëêà'),
('GAME WEAPON5', 'Chaingun',
- 'Ïóëåìåò'),
+ 'Ïóëåì¸ò'),
('GAME WEAPON6', 'Rocket Launcher',
'Ðàêåòíèöà'),
('GAME WEAPON7', 'Plasma Gun',
('GAME WEAPON6', 'Rocket Launcher',
'Ðàêåòíèöà'),
('GAME WEAPON7', 'Plasma Gun',
('GAME WEAPON8', 'BFG9000',
'BFG9000'),
('GAME WEAPON9', 'Super Chaingun',
('GAME WEAPON8', 'BFG9000',
'BFG9000'),
('GAME WEAPON9', 'Super Chaingun',
- 'Ñóïåðïóëåìåò'),
+ 'Ñóïåðïóëåì¸ò'),
+ ('GAME WEAPON10', 'Flamethrower',
+ 'Îãíåì¸ò'),
('MENU START GAME', 'Start Game',
'ÍÀ×ÀÒÜ ÈÃÐÓ'),
('MENU START GAME', 'Start Game',
'ÍÀ×ÀÒÜ ÈÃÐÓ'),
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 8bd768d150d67a71881b7fc9c1299fcf3327e1c1..29817ae5f5f1c67cd97251c5de33f246d5b68de7 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
uses
g_gui, g_textures, e_graphics, g_main, g_window, g_game, g_map,
uses
g_gui, g_textures, e_graphics, g_main, g_window, g_game, g_map,
- g_basic, g_console, g_sound, g_gfx, g_player, g_options,
+ g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPSTRUCT, wadreader, Math, g_saveload,
e_textures, GL, GLExt, g_language,
e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPSTRUCT, wadreader, Math, g_saveload,
e_textures, GL, GLExt, g_language,
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP1MenuWeapons').GetControl('mOptionsControlsP1MenuWeapons'));
with menu, gGameControls.P1Control do
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP1MenuWeapons').GetControl('mOptionsControlsP1MenuWeapons'));
with menu, gGameControls.P1Control do
begin
- for i := 0 to 9 do
+ for i := WP_FIRST to WP_LAST do
begin
KeyWeapon[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0;
KeyWeapon2[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1;
begin
KeyWeapon[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0;
KeyWeapon2[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2MenuWeapons').GetControl('mOptionsControlsP2MenuWeapons'));
with menu, gGameControls.P2Control do
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2MenuWeapons').GetControl('mOptionsControlsP2MenuWeapons'));
with menu, gGameControls.P2Control do
begin
- for i := 0 to 9 do
+ for i := WP_FIRST to WP_LAST do
begin
KeyWeapon[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0;
KeyWeapon2[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1;
begin
KeyWeapon[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0;
KeyWeapon2[i] := TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1;
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP1MenuWeapons').GetControl('mOptionsControlsP1MenuWeapons'));
with menu, gGameControls.P1Control do
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP1MenuWeapons').GetControl('mOptionsControlsP1MenuWeapons'));
with menu, gGameControls.P1Control do
begin
- for i := 0 to 9 do
+ for i := WP_FIRST to WP_LAST do
begin
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0 := KeyWeapon[i];
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1 := KeyWeapon2[i];
begin
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0 := KeyWeapon[i];
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1 := KeyWeapon2[i];
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2MenuWeapons').GetControl('mOptionsControlsP2MenuWeapons'));
with menu, gGameControls.P2Control do
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsP2MenuWeapons').GetControl('mOptionsControlsP2MenuWeapons'));
with menu, gGameControls.P2Control do
begin
- for i := 0 to 9 do
+ for i := WP_FIRST to WP_LAST do
begin
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0 := KeyWeapon[i];
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1 := KeyWeapon2[i];
begin
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key0 := KeyWeapon[i];
TGUIKeyRead2(GetControl(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)])).Key1 := KeyWeapon2[i];
with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1_WEAPONS]))) do
begin
Name := 'mOptionsControlsP1MenuWeapons';
with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_1_WEAPONS]))) do
begin
Name := 'mOptionsControlsP1MenuWeapons';
- for i := 0 to 9 do
+ for i := WP_FIRST to WP_LAST do
AddKeyRead2(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)]).Name :=
_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)];
end;
AddKeyRead2(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)]).Name :=
_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)];
end;
with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2_WEAPONS]))) do
begin
Name := 'mOptionsControlsP2MenuWeapons';
with TGUIMenu(Menu.AddChild(TGUIMenu.Create(gMenuFont, gMenuSmallFont, _lc[I_MENU_PLAYER_2_WEAPONS]))) do
begin
Name := 'mOptionsControlsP2MenuWeapons';
- for i := 0 to 9 do
+ for i := WP_FIRST to WP_LAST do
AddKeyRead2(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)]).Name :=
_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)];
end;
AddKeyRead2(_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)]).Name :=
_lc[TStrings_Locale(Cardinal(I_GAME_WEAPON0) + i)];
end;
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 5caaf40f9520fe1659381f53515e480b10f11934..416f3b3c1411eb514ea33f1228b6845b957ca134 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
interface
uses
interface
uses
- g_language;
+ g_language, g_weapons;
type
TPlayerControl = record
type
TPlayerControl = record
KeyPrevWeapon: Word;
KeyOpen: Word;
KeyStrafe: Word;
KeyPrevWeapon: Word;
KeyOpen: Word;
KeyStrafe: Word;
- KeyWeapon: array [0..9] of Word;
+ KeyWeapon: array [WP_FIRST..WP_LAST] of Word;
KeyRight2: Word;
KeyLeft2: Word;
KeyRight2: Word;
KeyLeft2: Word;
KeyPrevWeapon2: Word;
KeyOpen2: Word;
KeyStrafe2: Word;
KeyPrevWeapon2: Word;
KeyOpen2: Word;
KeyStrafe2: Word;
- KeyWeapon2: array [0..9] of Word;
+ KeyWeapon2: array [WP_FIRST..WP_LAST] of Word;
end;
TGameControls = record
end;
TGameControls = record