Skip to content

Commit

Permalink
Merge branch 'hotfix/0_9_9_8a'
Browse files Browse the repository at this point in the history
  • Loading branch information
epyon committed Aug 20, 2024
2 parents e46e162 + 3cf4d1d commit 97f1c51
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 24 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ All code is (C) 2003-2024 Kornel Kisielewicz

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

All art is (C) 2003-2024 Derek Yu
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.

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

sincerely,

Kornel Kisielewicz of ChaosForge
Kornel Kisielewicz
ChaosForge
2 changes: 1 addition & 1 deletion bin/drl_console.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mode con lines=25 cols=80
mode con cp select=437
doomrl -console
drl -console
2 changes: 1 addition & 1 deletion bin/drl_gnome-terminal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
set -eu

gnome-terminal --geometry=80x25 -e "./doomrl -console"
gnome-terminal --geometry=80x25 -e "./drl -console"
2 changes: 1 addition & 1 deletion bin/drl_konsole
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -eu
# --geometry=80x25 doesn't work at all, AFAI can see.
# for older konsole versions, --vt_sz 80x25 should do the trick.

konsole --workdir=`pwd` -e ./doomrl -console
konsole --workdir=`pwd` -e ./drl -console
2 changes: 1 addition & 1 deletion bin/drl_xterm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
set -eu

xterm -geometry 80x25 -e ./doomrl -console
xterm -geometry 80x25 -e ./drl -console
3 changes: 1 addition & 2 deletions bin/lua/beings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,6 @@ function DoomRL.loadnpcs()
attackchance = 50,
todam = 6,
tohit = 6,
speed = 115,
min_lev = 30,
max_lev = 60,
corpse = true,
Expand Down Expand Up @@ -859,7 +858,7 @@ function DoomRL.loadnpcs()
sframes = 2,
glow = { 0.0, 0.0, 1.0, 1.0 },
tohit = 1,
todam = 1,
todam = 5,
speed = 90,
hp = 25,
armor = 2,
Expand Down
13 changes: 13 additions & 0 deletions bin/version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
0.9.9.8a
[fix] -- GH#---: fixed music volume adjustment issues
[fix] -- GH#---: fixed loading bar size
[fix] -- GH#---: fixed ASCII loading bar on Windows 11 console
[fix] -- GH#---: fixed cursor behavior in ASCII (and in edit line)
[fix] -- GH#---: fixed a extra crash on exiting incorrectly
[fix] -- GH#---: fixed batch file executable name
[fix] -- GH#---: fixed targeting line color under Invulnerability
[fix] -- GH#---: fixed armor sprite/color not updating in turn it's destroyed
[fix] -- GH#---: fixed nightmare imp speed and elite captain melee damage
[fix] -- GH#---: fixed "Unlock all unlocks" not unlocking difficulties
[fix] -- GH#---: yet another attempt to fix the OnAttacked bug

0.9.9.8
[new] -- GH#086: you no longer need to be on the stairs to Save the game!
[new] -- GH#071: in-game settings menu, including graphics and keybinings!
Expand Down
6 changes: 6 additions & 0 deletions src/dflevel.pas
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ procedure TLevel.Shotgun( source, target : TCoord2D; Damage : TDiceRoll; Shotgun
Reduce : Single;
Dir : TDirection;
iNode : TNode;
iItemUID: TUID;
procedure SendShotgunBeam( s : TCoord2D; tcc : TCoord2D );
var shb : TVisionRay;
cnt : byte;
Expand All @@ -969,6 +970,9 @@ procedure TLevel.Shotgun( source, target : TCoord2D; Damage : TDiceRoll; Shotgun
Spread := Shotgun.Spread;
Reduce := Shotgun.Reduce;

iItemUID := 0;
if aItem <> nil then iItemUID := aItem.uid;

d := Distance( source, target );
if d = 0 then Exit;
a := target - source;
Expand Down Expand Up @@ -1006,7 +1010,9 @@ procedure TLevel.Shotgun( source, target : TCoord2D; Damage : TDiceRoll; Shotgun
Knockback( dir, dmg div KnockBackValue );
end;
KnockBacked := True;
if ( aItem <> nil ) and ( UIDs[ iItemUID ] = nil ) then aItem := nil;
ApplyDamage( dmg, Target_Torso, Shotgun.DamageType, aItem );
if ( aItem <> nil ) and ( UIDs[ iItemUID ] = nil ) then aItem := nil;
end;

DamageTile( tc, dmg, Shotgun.DamageType );
Expand Down
1 change: 1 addition & 0 deletions src/doombase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ procedure TDoom.PreAction;
FLevel.CalculateVision( Player.Position );
StatusEffect := Player.FAffects.getEffect;
IO.Focus( Player.Position );
Player.UpdateVisual;
if GraphicsVersion then
(IO as TDoomGFXIO).UpdateMinimap;
Player.PreAction;
Expand Down
21 changes: 14 additions & 7 deletions src/doomio.pas
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ type TDoomIO = class( TIO )

FHudEnabled : Boolean;
FWaiting : Boolean;
FTargeting : Boolean;
FStoredHint : AnsiString;
FHint : AnsiString;
public
Expand Down Expand Up @@ -316,6 +317,7 @@ constructor TDoomIO.Create;

FWaiting := False;
FHudEnabled := False;
FTargeting := False;
FStoredHint := '';
FHint := '';

Expand Down Expand Up @@ -373,6 +375,7 @@ constructor TDoomIO.Create;

procedure TDoomIO.PushLayer( aLayer : TInterfaceLayer );
begin
FConsole.HideCursor;
FLayers.Push( aLayer );
end;

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

procedure TDoomIO.FullLook( aID : Ansistring );
begin
FConsole.HideCursor;
PushLayer( TMoreView.Create( aID ) );
//IO.RunUILoop( TUIMoreViewer.Create( IO.Root, ID ) );
end;
Expand Down Expand Up @@ -541,8 +545,9 @@ destructor TDoomIO.Destroy;
FreeAndNil( FOldASCII );
FreeAndNil( FNewASCII );

for iLayer in FLayers do
iLayer.Free;
if FLayers <> nil then
for iLayer in FLayers do
iLayer.Free;
FreeAndNil( FLayers );
IO := nil;
inherited Destroy;
Expand Down Expand Up @@ -833,10 +838,8 @@ function TDoomIO.EventWaitForMore : Boolean;
procedure TDoomIO.LoadStart( aAdd : DWord = 0 );
begin
if FLoading = nil then
begin
FLoading := TUILoadingScreen.Create(FUIRoot,100);
FLoading.Max := FLoading.Max + aAdd;
end;
FLoading.Max := FLoading.Max + aAdd;
end;

function TDoomIO.LoadCurrent : DWord;
Expand Down Expand Up @@ -1008,7 +1011,6 @@ function TDoomIO.CommandEventPending : Boolean;

procedure TDoomIO.Focus(aCoord: TCoord2D);
begin
FConsole.ShowCursor;
FConsole.MoveCursor(aCoord.x+1,aCoord.y+2);
end;

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

LookDescription( iTarget );
FTargeting := True;
repeat
if iTarget <> Position then
begin
Expand Down Expand Up @@ -1088,7 +1091,8 @@ function TDoomIO.ChooseTarget( aActionName : string; aRange: byte;
LookDescription( iTarget );
until iInput in [INPUT_FIRE, INPUT_ALTFIRE, INPUT_MLEFT];
MsgUpDate;

FConsole.HideCursor;
FTargeting := False;
ChooseTarget := iTarget;
end;

Expand All @@ -1104,6 +1108,7 @@ procedure TDoomIO.LookMode;
Target := Player.Position;
TargetColor := NewColor( White );
LookDescription( Target );
FTargeting := True;
repeat
if SpriteMap <> nil then SpriteMap.SetTarget( Target, TargetColor, False );
TargetColor := NewColor( White );
Expand Down Expand Up @@ -1147,6 +1152,8 @@ procedure TDoomIO.LookMode;
end;
until False;
MsgUpDate;
FConsole.HideCursor;
FTargeting := False;
if SpriteMap <> nil then SpriteMap.ClearTarget;
end;

Expand Down
4 changes: 2 additions & 2 deletions src/doommenuview.pas
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ procedure TMainMenuViewer.InitDifficulty;
begin
iAllow := True;
if (FResult.Challenge <> '') and (not GetBoolean( 'challenge' )) then iAllow := False;
if GetInteger('req_skill',0) > HOF.SkillRank then iAllow := False;
if GetInteger('req_exp',0) > HOF.ExpRank then iAllow := False;
if GetInteger('req_skill',0) > HOF.SkillRank then iAllow := Setting_UnlockAll;
if GetInteger('req_exp',0) > HOF.ExpRank then iAllow := Setting_UnlockAll;
iMenu.Add(GetString('name'), iAllow );
end;

Expand Down
2 changes: 1 addition & 1 deletion src/doommoreview.pas
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ procedure TMoreView.Update( aDTime : Integer );
VTIG_Text( FDesc );
VTIG_End;

VTIG_End('{l<{!Escape},{!Enter},{!Space}> exit}');
VTIG_End('{l<{!Escape},{!Enter}> exit}');
if VTIG_EventCancel or VTIG_EventConfirm then
FFinished := True;
IO.RenderUIBackground( PointZero, FSize );
Expand Down
6 changes: 4 additions & 2 deletions src/doomtextio.pas
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ destructor TDoomTextIO.Destroy;
procedure TDoomTextIO.Update( aMSec : DWord );
begin
FTextMap.Update( aMSec );
if FTargeting and FLayers.IsEmpty
then FConsole.ShowCursor;
inherited Update( aMSec );
end;

Expand Down Expand Up @@ -147,8 +149,8 @@ procedure TDoomTextIO.SetTarget( aTarget : TCoord2D; aColor : Byte; aRange : Byt
FTargetEnabled := True;
FTarget := aTarget;
FTargetRange := aRange;
// TODO: this clashes with TIG
IO.Console.ShowCursor;
if FLayers.IsEmpty then
IO.Console.ShowCursor;
IO.Console.MoveCursor( aTarget.x+1, aTarget.y+2 );
end;

Expand Down
8 changes: 8 additions & 0 deletions src/doomviews.pas
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ procedure TUILoadingScreen.OnUpdate ( aTime : DWord ) ;
if FMax = 0 then Exit;
if not GraphicsVersion then
begin
if FCurrent = 0 then
begin
// Don't ask. Simply don't ask. Either FPC video unit or Windows 11 console
// is so broken that without this part, the loading screen gets printed
// incorrectly. Why? No fucking clue.
Sleep(100);
Exit;
end;
iMaxChar := FAbsolute.w-1 - 20;
iProgChar := Min( Round(( FCurrent / FMax ) * iMaxChar), iMaxChar );
iCon.Init( TConUIRoot(FRoot).Renderer );
Expand Down
4 changes: 2 additions & 2 deletions src/version.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Autogenerated by FPC Valkyrie lua_make.lua
VERSION_STRING = '0.9.9.8';
VERSION_STRING = '0.9.9.8a';
VERSION_ARRAY : array[1..4] of byte = (0,9,9,8);
VERSION_BETA = false;
VERSION_REV = 117425237;
VERSION_REV = 139399954;

0 comments on commit 97f1c51

Please sign in to comment.