--- a/hedgewars/hwengine.pas Tue Jun 21 15:37:08 2016 -0400
+++ b/hedgewars/hwengine.pas Tue Jun 21 22:03:09 2016 +0200
@@ -52,22 +52,6 @@
procedure freeEverything(complete:boolean); forward;
{$ENDIF}
-// TODO localization support
-procedure ShowCredits();
-var themeCredits, mapCredits: shortstring;
-begin
- if Length(cMapName) > 0 then
- begin
- mapCredits:= read1stLn(cPathz[ptMapCurrent] + '/credits.txt');
- if Length(mapCredits) > 0 then
- AddChatString(char(#11) + '© Map: ' + mapCredits);
- end;
-
- themeCredits:= read1stLn(cPathz[ptCurrTheme] + '/credits.txt');
- if Length(themeCredits) > 0 then
- AddChatString(char(#12) + '© Theme: ' + themeCredits);
-end;
-
///////////////////////////////////////////////////////////////////////////////
function DoTimer(Lag: LongInt): boolean;
var s: shortstring;
@@ -112,7 +96,6 @@
with TeamsArray[t]^ do
MaxTeamHealth:= TeamHealth;
RecountAllTeamsHealth;
- //if not cOnlyStats then ShowCredits;
GameState:= gsGame;
end;
gsConfirm, gsGame, gsChat:
--- a/hedgewars/uChat.pas Tue Jun 21 15:37:08 2016 -0400
+++ b/hedgewars/uChat.pas Tue Jun 21 22:03:09 2016 +0200
@@ -70,7 +70,7 @@
const
- colors: array[#0..#12] of TSDL_Color = (
+ colors: array[#0..#9] of TSDL_Color = (
(r:$FF; g:$FF; b:$FF; a:$FF), // #0 unused, feel free to take it for anything
(r:$FF; g:$FF; b:$FF; a:$FF), // #1 chat message [White]
(r:$FF; g:$00; b:$FF; a:$FF), // #2 action message [Purple]
@@ -80,10 +80,7 @@
(r:$00; g:$FF; b:$FF; a:$FF), // #6 input line [Light Blue]
(r:$FF; g:$80; b:$80; a:$FF), // #7 team gone [Light Red]
(r:$FF; g:$D0; b:$80; a:$FF), // #8 team back [Light Orange]
- (r:$DF; g:$DF; b:$DF; a:$FF), // #9 hog speech [Light Gray]
- (r:$FF; g:$00; b:$FF; a:$AF), // #10 music credits [Purple]
- (r:$00; g:$FF; b:$FF; a:$AF), // #11 map credits [Light Blue]
- (r:$FF; g:$D0; b:$80; a:$AF) // #12 theme credits [Light Orange]
+ (r:$DF; g:$DF; b:$DF; a:$FF) // #9 hog speech [Light Gray]
);
ChatCommandz: array [TChatCmd] of record
ChatCmd: string[31];
@@ -208,13 +205,10 @@
end;
const ClDisplayDuration = 12500;
- CreditsDisplayDur = 2500;
procedure SetLine(var cl: TChatLine; str: shortstring; isInput: boolean);
var color : TSDL_Color;
- credits: boolean;
begin
-credits:= false;
if isInput then
begin
cl.s:= str;
@@ -226,7 +220,6 @@
if str[1] <= High(colors) then
begin
color:= colors[str[1]];
- credits:= (str[1] >= #10) and (str[1] <= #12);
delete(str, 1, 1);
end
// fallback if invalid color
@@ -241,10 +234,7 @@
// set texture, note: variables cl.s and str will be different here if isInput
RenderChatLineTex(cl, str);
-if credits then
- cl.Time:= RealTicks + CreditsDisplayDur
-else
- cl.Time:= RealTicks + ClDisplayDuration;
+cl.Time:= RealTicks + ClDisplayDuration;
end;
// For uStore texture recreation
--- a/hedgewars/uSound.pas Tue Jun 21 15:37:08 2016 -0400
+++ b/hedgewars/uSound.pas Tue Jun 21 22:03:09 2016 +0200
@@ -581,20 +581,6 @@
SDLCheck(Mus <> nil, 'Mix_LoadMUS_RW', false);
WriteLnToConsole(msgOK);
- // display music credits
- s:= s + '_credits.txt';
-
- // if per-file credits not found check general music credits file
- if pfsExists(s) then
- s:= read1stLn(s)
- else if SuddenDeath and (SDMusicFN <> '') then
- s:= readValueFromINI(SDMusicFN, '/Music/credits.txt')
- else
- s:= readValueFromINI(MusicFN, '/Music/credits.txt');
-
- if Length(s) > 0 then
- AddChatString(char(#10) + '© Music: ' + s);
-
SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false)
end;