Skip to content

Commit

Permalink
Engine update (#24)
Browse files Browse the repository at this point in the history
* Engine sync

* Engine sync
  • Loading branch information
cvet authored Feb 10, 2023
1 parent 43e5305 commit 9b45e38
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 65 deletions.
9 changes: 6 additions & 3 deletions Configs/Default.focfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RtApCostReloadWeapon = 2
RtApCostPickCritter = 1
RtApCostUseItem = 3
RtApCostUseSkill = 2
RtAlwaysRun = False
RtAlwaysRun = False
ApCostAimEyes = 1
ApCostAimHead = 1
ApCostAimGroin = 1
Expand Down Expand Up @@ -158,8 +158,8 @@ Fullscreen = False
FullscreenMouseScroll = True
WindowedMouseScroll = False
AlwaysOnTop = False
FixedFPS = 100
VSync = False
FixedFPS = 0
VSync = True
Brightness = 0
MapHexagonal = True
MapHexWidth = 32
Expand All @@ -179,3 +179,6 @@ UpdaterInfoDelay = 5000
UpdaterInfoPos = 1
DefaultSplash = art/splash/vault_boy.png
DefaultSplashPack = FOnline
WindowCentered = True
WindowResizable = False
CollapseLogOnStart = False
1 change: 1 addition & 0 deletions Configs/Mapper.focfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Anim2CombatEnd = Anim2Actions::EndCombat
SplitTilesCollection = True
ConsoleHistorySize = 100
ClientResourceEntries = Mapper CommonData FOnline FOArt BlackCombatArmor Lieutenant LongHairDude Music Video
MapsDir = ../Maps
1 change: 1 addition & 0 deletions Configs/PublicGame.focfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ $Parent = Default
ServerSleep = -1
ServerHost = 111.222.111.222
ServerPort = 9999
CollapseLogOnStart = True
2 changes: 1 addition & 1 deletion Engine
Submodule Engine updated 607 files
2 changes: 1 addition & 1 deletion Gui/Cursor.fogui
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"OnHide": null,
"OnAppear": null,
"OnDisappear": null,
"OnDraw": "if( Settings.HideCursor )\r\n return;\r\n\r\nint cursor = Settings.Cursor;\r\n// Move cursor\r\nSettings.ShowMoveCursor = ( cursor == CursorType::Move );\r\n// Game scroll\r\nbool hasMouseScroll = true;\r\nif( Settings.ScrollMouseLeft && Settings.ScrollMouseUp )\r\n CursorMoveScreen[ 7 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\nelse if( Settings.ScrollMouseRight && Settings.ScrollMouseUp )\r\n CursorMoveScreen[ 1 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 1, -1 );\r\nelse if( Settings.ScrollMouseLeft && Settings.ScrollMouseDown )\r\n CursorMoveScreen[ 5 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, 1 );\r\nelse if( Settings.ScrollMouseRight && Settings.ScrollMouseDown )\r\n CursorMoveScreen[ 3 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 1, 1 );\r\nelse if( Settings.ScrollMouseLeft )\r\n CursorMoveScreen[ 6 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, 0 );\r\nelse if( Settings.ScrollMouseRight )\r\n CursorMoveScreen[ 2 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 1, 0 );\r\nelse if( Settings.ScrollMouseUp )\r\n CursorMoveScreen[ 0 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, -1 );\r\nelse if( Settings.ScrollMouseDown )\r\n CursorMoveScreen[ 4 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 1 );\r\nelse\r\n hasMouseScroll = false;\r\nif( hasMouseScroll )\r\n return;\r\n// Attack contours\r\nint contour = ( cursor == CursorType::UseWeapon ? 3 : 0 );\r\nif( contour != CurCrittersCountour )\r\n{\r\n CurCrittersCountour = contour;\r\n Game.CustomCall( \"SetCrittersContour \" + CurCrittersCountour );\r\n}\r\n\r\n// Other cursors\r\nif( cursor == CursorType::UseWeapon )\r\n{\r\n CursorAttack.Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 0 );\r\n\r\n Critter@ chosen = Game.GetChosen();\r\n if( chosen is null )\r\n return;\r\n\r\n Critter@ cr = Game.GetCritterAtScreenPos( Settings.MouseX, Settings.MouseY );\r\n if( cr is null || cr is chosen )\r\n return;\r\n\r\n uint attackDist = Parameters::GetActiveItemAttackDistantion( chosen );\r\n if( attackDist == 0 )\r\n return;\r\n\r\n bool trace = false;\r\n Critter@[] critters = {};\r\n critters = Game.GetCrittersInPath( chosen.HexX, chosen.HexY, cr.HexX, cr.HexY, 0.0f, attackDist, CritterFindType::Any );\r\n for( uint i = 0; i < critters.length(); i++ )\r\n {\r\n if( critters[ i ].Id == cr.Id )\r\n {\r\n trace = true;\r\n break;\r\n }\r\n }\r\n if( !trace )\r\n return;\r\n\r\n Item@ item = chosen.GetItem( ItemProperty::CritterSlot, SLOT_HAND1 );\r\n int hit = ClientMain::to_hit( chosen, cr, item, item.Mode );\r\n if( hit == 0 )\r\n return;\r\n \r\n Game.DrawText( hit + \"%\", Settings.MouseX + 6, Settings.MouseY + 6, 100, 100, COLOR_RED, Fonts::Default, 0 );\r\n}\r\nelse if( cursor == CursorType::UseItem )\r\n{\r\n CursorUseItem.Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 0 );\r\n}\r\nelse if( cursor == CursorType::UseSkill )\r\n{\r\n CursorUseSkill.Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 0 );\r\n}\r\nelse if( cursor == CursorType::Move )\r\n{\r\n uint16 hx, hy;\r\n if( !Game.GetHexAtScreenPos( Settings.MouseX, Settings.MouseY, hx, hy ) )\r\n CursorDefault.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}\r\nelse if( cursor == CursorType::Default )\r\n{\r\n CursorDefault.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}\r\nelse if( cursor == CursorType::Hand )\r\n{\r\n //Game.CustomCall( \"CurDrawHand\" );\r\n CursorHand.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}\r\nelse\r\n{\r\n CursorDefault.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}",
"OnDraw": "if( Settings.HideCursor )\r\n return;\r\n\r\nint cursor = Settings.Cursor;\r\n// Move cursor\r\nSettings.ShowMoveCursor = ( cursor == CursorType::Move );\r\n// Game scroll\r\nbool hasMouseScroll = true;\r\nif( Settings.ScrollMouseLeft && Settings.ScrollMouseUp )\r\n CursorMoveScreen[ 7 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\nelse if( Settings.ScrollMouseRight && Settings.ScrollMouseUp )\r\n CursorMoveScreen[ 1 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 1, -1 );\r\nelse if( Settings.ScrollMouseLeft && Settings.ScrollMouseDown )\r\n CursorMoveScreen[ 5 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, 1 );\r\nelse if( Settings.ScrollMouseRight && Settings.ScrollMouseDown )\r\n CursorMoveScreen[ 3 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 1, 1 );\r\nelse if( Settings.ScrollMouseLeft )\r\n CursorMoveScreen[ 6 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, 0 );\r\nelse if( Settings.ScrollMouseRight )\r\n CursorMoveScreen[ 2 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 1, 0 );\r\nelse if( Settings.ScrollMouseUp )\r\n CursorMoveScreen[ 0 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, -1 );\r\nelse if( Settings.ScrollMouseDown )\r\n CursorMoveScreen[ 4 ].Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 1 );\r\nelse\r\n hasMouseScroll = false;\r\nif( hasMouseScroll )\r\n return;\r\n// Attack contours\r\nint contour = ( cursor == CursorType::UseWeapon ? 3 : 0 );\r\nif( contour != CurCrittersCountour )\r\n{\r\n CurCrittersCountour = contour;\r\n Game.CustomCall( \"SetCrittersContour \" + CurCrittersCountour );\r\n}\r\n\r\n// Other cursors\r\nif( cursor == CursorType::UseWeapon )\r\n{\r\n CursorAttack.Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 0 );\r\n\r\n Critter@ chosen = Game.GetChosen();\r\n if( chosen is null )\r\n return;\r\n\r\n Critter@ cr = CurMap.GetCritterAtScreenPos( Settings.MouseX, Settings.MouseY );\r\n if( cr is null || cr is chosen )\r\n return;\r\n\r\n uint attackDist = Parameters::GetActiveItemAttackDistantion( chosen );\r\n if( attackDist == 0 )\r\n return;\r\n\r\n bool trace = false;\r\n Critter@[] critters = {};\r\n critters = Game.GetCrittersInPath( chosen.HexX, chosen.HexY, cr.HexX, cr.HexY, 0.0f, attackDist, CritterFindType::Any );\r\n for( uint i = 0; i < critters.length(); i++ )\r\n {\r\n if( critters[ i ].Id == cr.Id )\r\n {\r\n trace = true;\r\n break;\r\n }\r\n }\r\n if( !trace )\r\n return;\r\n\r\n Item@ item = chosen.GetItem( ItemProperty::CritterSlot, SLOT_HAND1 );\r\n int hit = ClientMain::to_hit( chosen, cr, item, item.Mode );\r\n if( hit == 0 )\r\n return;\r\n \r\n Game.DrawText( hit + \"%\", Settings.MouseX + 6, Settings.MouseY + 6, 100, 100, COLOR_RED, Fonts::Default, 0 );\r\n}\r\nelse if( cursor == CursorType::UseItem )\r\n{\r\n CursorUseItem.Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 0 );\r\n}\r\nelse if( cursor == CursorType::UseSkill )\r\n{\r\n CursorUseSkill.Draw( Settings.MouseX, Settings.MouseY, 0, 0, 0, 0 );\r\n}\r\nelse if( cursor == CursorType::Move )\r\n{\r\n uint16 hx, hy;\r\n if( !CurMap.GetHexAtScreenPos( Settings.MouseX, Settings.MouseY, hx, hy ) )\r\n CursorDefault.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}\r\nelse if( cursor == CursorType::Default )\r\n{\r\n CursorDefault.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}\r\nelse if( cursor == CursorType::Hand )\r\n{\r\n //Game.CustomCall( \"CurDrawHand\" );\r\n CursorHand.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}\r\nelse\r\n{\r\n CursorDefault.Draw( Settings.MouseX, Settings.MouseY, 0, 0, -1, -1 );\r\n}",
"OnPostDraw": null,
"OnMove": null,
"OnMouseDown": null,
Expand Down
Loading

0 comments on commit 9b45e38

Please sign in to comment.