Skip to content

Commit 97f1c51

Browse files
committed
Merge branch 'hotfix/0_9_9_8a'
2 parents e46e162 + 3cf4d1d commit 97f1c51

15 files changed

+60
-24
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ All code is (C) 2003-2024 Kornel Kisielewicz
3636

3737
Code is distributed under the GPL 2.0 license (see LICENSE file in this folder)
3838

39-
All art is (C) 2003-2024 Derek Yu
39+
Original art and sprites (0.9.9.7) by Derek Yu, (C) 2003-2024, licensed under CC BY-SA 4.0. Modified version and additions (0.9.9.8+) by Łukasz Śliwiński, (C) 2024, licensed under CC BY-SA 4.0.
4040

41-
Art is distributed under the CC-BY-SA 4.0 license (see LICENSE file in the bin/graphics/ folder)
41+
All art is distributed under the CC-BY-SA 4.0 license (see LICENSE file in the bin/graphics/ folder).
4242

4343
sincerely,
44-
45-
Kornel Kisielewicz of ChaosForge
44+
Kornel Kisielewicz
45+
ChaosForge

bin/drl_console.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
mode con lines=25 cols=80
22
mode con cp select=437
3-
doomrl -console
3+
drl -console

bin/drl_gnome-terminal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
set -eu
33

4-
gnome-terminal --geometry=80x25 -e "./doomrl -console"
4+
gnome-terminal --geometry=80x25 -e "./drl -console"

bin/drl_konsole

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -eu
55
# --geometry=80x25 doesn't work at all, AFAI can see.
66
# for older konsole versions, --vt_sz 80x25 should do the trick.
77

8-
konsole --workdir=`pwd` -e ./doomrl -console
8+
konsole --workdir=`pwd` -e ./drl -console

bin/drl_xterm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
set -eu
33

4-
xterm -geometry 80x25 -e ./doomrl -console
4+
xterm -geometry 80x25 -e ./drl -console

bin/lua/beings.lua

+1-2
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ function DoomRL.loadnpcs()
576576
attackchance = 50,
577577
todam = 6,
578578
tohit = 6,
579-
speed = 115,
580579
min_lev = 30,
581580
max_lev = 60,
582581
corpse = true,
@@ -859,7 +858,7 @@ function DoomRL.loadnpcs()
859858
sframes = 2,
860859
glow = { 0.0, 0.0, 1.0, 1.0 },
861860
tohit = 1,
862-
todam = 1,
861+
todam = 5,
863862
speed = 90,
864863
hp = 25,
865864
armor = 2,

bin/version.txt

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
0.9.9.8a
2+
[fix] -- GH#---: fixed music volume adjustment issues
3+
[fix] -- GH#---: fixed loading bar size
4+
[fix] -- GH#---: fixed ASCII loading bar on Windows 11 console
5+
[fix] -- GH#---: fixed cursor behavior in ASCII (and in edit line)
6+
[fix] -- GH#---: fixed a extra crash on exiting incorrectly
7+
[fix] -- GH#---: fixed batch file executable name
8+
[fix] -- GH#---: fixed targeting line color under Invulnerability
9+
[fix] -- GH#---: fixed armor sprite/color not updating in turn it's destroyed
10+
[fix] -- GH#---: fixed nightmare imp speed and elite captain melee damage
11+
[fix] -- GH#---: fixed "Unlock all unlocks" not unlocking difficulties
12+
[fix] -- GH#---: yet another attempt to fix the OnAttacked bug
13+
114
0.9.9.8
215
[new] -- GH#086: you no longer need to be on the stairs to Save the game!
316
[new] -- GH#071: in-game settings menu, including graphics and keybinings!

src/dflevel.pas

+6
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,7 @@ procedure TLevel.Shotgun( source, target : TCoord2D; Damage : TDiceRoll; Shotgun
949949
Reduce : Single;
950950
Dir : TDirection;
951951
iNode : TNode;
952+
iItemUID: TUID;
952953
procedure SendShotgunBeam( s : TCoord2D; tcc : TCoord2D );
953954
var shb : TVisionRay;
954955
cnt : byte;
@@ -969,6 +970,9 @@ procedure TLevel.Shotgun( source, target : TCoord2D; Damage : TDiceRoll; Shotgun
969970
Spread := Shotgun.Spread;
970971
Reduce := Shotgun.Reduce;
971972

973+
iItemUID := 0;
974+
if aItem <> nil then iItemUID := aItem.uid;
975+
972976
d := Distance( source, target );
973977
if d = 0 then Exit;
974978
a := target - source;
@@ -1006,7 +1010,9 @@ procedure TLevel.Shotgun( source, target : TCoord2D; Damage : TDiceRoll; Shotgun
10061010
Knockback( dir, dmg div KnockBackValue );
10071011
end;
10081012
KnockBacked := True;
1013+
if ( aItem <> nil ) and ( UIDs[ iItemUID ] = nil ) then aItem := nil;
10091014
ApplyDamage( dmg, Target_Torso, Shotgun.DamageType, aItem );
1015+
if ( aItem <> nil ) and ( UIDs[ iItemUID ] = nil ) then aItem := nil;
10101016
end;
10111017

10121018
DamageTile( tc, dmg, Shotgun.DamageType );

src/doombase.pas

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ procedure TDoom.PreAction;
261261
FLevel.CalculateVision( Player.Position );
262262
StatusEffect := Player.FAffects.getEffect;
263263
IO.Focus( Player.Position );
264+
Player.UpdateVisual;
264265
if GraphicsVersion then
265266
(IO as TDoomGFXIO).UpdateMinimap;
266267
Player.PreAction;

src/doomio.pas

+14-7
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ type TDoomIO = class( TIO )
139139

140140
FHudEnabled : Boolean;
141141
FWaiting : Boolean;
142+
FTargeting : Boolean;
142143
FStoredHint : AnsiString;
143144
FHint : AnsiString;
144145
public
@@ -316,6 +317,7 @@ constructor TDoomIO.Create;
316317

317318
FWaiting := False;
318319
FHudEnabled := False;
320+
FTargeting := False;
319321
FStoredHint := '';
320322
FHint := '';
321323

@@ -373,6 +375,7 @@ constructor TDoomIO.Create;
373375

374376
procedure TDoomIO.PushLayer( aLayer : TInterfaceLayer );
375377
begin
378+
FConsole.HideCursor;
376379
FLayers.Push( aLayer );
377380
end;
378381

@@ -471,6 +474,7 @@ procedure TDoomIO.RenderUIBackground( aUL, aBR : TIOPoint );
471474

472475
procedure TDoomIO.FullLook( aID : Ansistring );
473476
begin
477+
FConsole.HideCursor;
474478
PushLayer( TMoreView.Create( aID ) );
475479
//IO.RunUILoop( TUIMoreViewer.Create( IO.Root, ID ) );
476480
end;
@@ -541,8 +545,9 @@ destructor TDoomIO.Destroy;
541545
FreeAndNil( FOldASCII );
542546
FreeAndNil( FNewASCII );
543547

544-
for iLayer in FLayers do
545-
iLayer.Free;
548+
if FLayers <> nil then
549+
for iLayer in FLayers do
550+
iLayer.Free;
546551
FreeAndNil( FLayers );
547552
IO := nil;
548553
inherited Destroy;
@@ -833,10 +838,8 @@ function TDoomIO.EventWaitForMore : Boolean;
833838
procedure TDoomIO.LoadStart( aAdd : DWord = 0 );
834839
begin
835840
if FLoading = nil then
836-
begin
837841
FLoading := TUILoadingScreen.Create(FUIRoot,100);
838-
FLoading.Max := FLoading.Max + aAdd;
839-
end;
842+
FLoading.Max := FLoading.Max + aAdd;
840843
end;
841844

842845
function TDoomIO.LoadCurrent : DWord;
@@ -1008,7 +1011,6 @@ function TDoomIO.CommandEventPending : Boolean;
10081011

10091012
procedure TDoomIO.Focus(aCoord: TCoord2D);
10101013
begin
1011-
FConsole.ShowCursor;
10121014
FConsole.MoveCursor(aCoord.x+1,aCoord.y+2);
10131015
end;
10141016

@@ -1036,6 +1038,7 @@ function TDoomIO.ChooseTarget( aActionName : string; aRange: byte;
10361038
Msg('You see : ');
10371039

10381040
LookDescription( iTarget );
1041+
FTargeting := True;
10391042
repeat
10401043
if iTarget <> Position then
10411044
begin
@@ -1088,7 +1091,8 @@ function TDoomIO.ChooseTarget( aActionName : string; aRange: byte;
10881091
LookDescription( iTarget );
10891092
until iInput in [INPUT_FIRE, INPUT_ALTFIRE, INPUT_MLEFT];
10901093
MsgUpDate;
1091-
1094+
FConsole.HideCursor;
1095+
FTargeting := False;
10921096
ChooseTarget := iTarget;
10931097
end;
10941098

@@ -1104,6 +1108,7 @@ procedure TDoomIO.LookMode;
11041108
Target := Player.Position;
11051109
TargetColor := NewColor( White );
11061110
LookDescription( Target );
1111+
FTargeting := True;
11071112
repeat
11081113
if SpriteMap <> nil then SpriteMap.SetTarget( Target, TargetColor, False );
11091114
TargetColor := NewColor( White );
@@ -1147,6 +1152,8 @@ procedure TDoomIO.LookMode;
11471152
end;
11481153
until False;
11491154
MsgUpDate;
1155+
FConsole.HideCursor;
1156+
FTargeting := False;
11501157
if SpriteMap <> nil then SpriteMap.ClearTarget;
11511158
end;
11521159

src/doommenuview.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ procedure TMainMenuViewer.InitDifficulty;
255255
begin
256256
iAllow := True;
257257
if (FResult.Challenge <> '') and (not GetBoolean( 'challenge' )) then iAllow := False;
258-
if GetInteger('req_skill',0) > HOF.SkillRank then iAllow := False;
259-
if GetInteger('req_exp',0) > HOF.ExpRank then iAllow := False;
258+
if GetInteger('req_skill',0) > HOF.SkillRank then iAllow := Setting_UnlockAll;
259+
if GetInteger('req_exp',0) > HOF.ExpRank then iAllow := Setting_UnlockAll;
260260
iMenu.Add(GetString('name'), iAllow );
261261
end;
262262

src/doommoreview.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ procedure TMoreView.Update( aDTime : Integer );
5555
VTIG_Text( FDesc );
5656
VTIG_End;
5757

58-
VTIG_End('{l<{!Escape},{!Enter},{!Space}> exit}');
58+
VTIG_End('{l<{!Escape},{!Enter}> exit}');
5959
if VTIG_EventCancel or VTIG_EventConfirm then
6060
FFinished := True;
6161
IO.RenderUIBackground( PointZero, FSize );

src/doomtextio.pas

+4-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ destructor TDoomTextIO.Destroy;
7979
procedure TDoomTextIO.Update( aMSec : DWord );
8080
begin
8181
FTextMap.Update( aMSec );
82+
if FTargeting and FLayers.IsEmpty
83+
then FConsole.ShowCursor;
8284
inherited Update( aMSec );
8385
end;
8486

@@ -147,8 +149,8 @@ procedure TDoomTextIO.SetTarget( aTarget : TCoord2D; aColor : Byte; aRange : Byt
147149
FTargetEnabled := True;
148150
FTarget := aTarget;
149151
FTargetRange := aRange;
150-
// TODO: this clashes with TIG
151-
IO.Console.ShowCursor;
152+
if FLayers.IsEmpty then
153+
IO.Console.ShowCursor;
152154
IO.Console.MoveCursor( aTarget.x+1, aTarget.y+2 );
153155
end;
154156

src/doomviews.pas

+8
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,14 @@ procedure TUILoadingScreen.OnUpdate ( aTime : DWord ) ;
211211
if FMax = 0 then Exit;
212212
if not GraphicsVersion then
213213
begin
214+
if FCurrent = 0 then
215+
begin
216+
// Don't ask. Simply don't ask. Either FPC video unit or Windows 11 console
217+
// is so broken that without this part, the loading screen gets printed
218+
// incorrectly. Why? No fucking clue.
219+
Sleep(100);
220+
Exit;
221+
end;
214222
iMaxChar := FAbsolute.w-1 - 20;
215223
iProgChar := Min( Round(( FCurrent / FMax ) * iMaxChar), iMaxChar );
216224
iCon.Init( TConUIRoot(FRoot).Renderer );

src/version.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Autogenerated by FPC Valkyrie lua_make.lua
2-
VERSION_STRING = '0.9.9.8';
2+
VERSION_STRING = '0.9.9.8a';
33
VERSION_ARRAY : array[1..4] of byte = (0,9,9,8);
44
VERSION_BETA = false;
5-
VERSION_REV = 117425237;
5+
VERSION_REV = 139399954;

0 commit comments

Comments
 (0)