Skip to content

Commit

Permalink
Fix for the issue #60 and #73
Browse files Browse the repository at this point in the history
  • Loading branch information
rajko-horvat committed Aug 30, 2024
1 parent 2ae8d81 commit 2c14411
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Currently, you can contribute to this repository in one of the following ways:
</ul>

## Frequently asked questions
<p><b>Q:</b> Why did you use C#, instead of C in which the original game is written?</p>
<p><b>Q:</b> Why did you use C#, instead of C and x86 assembly in which the original game is written?</p>
<b>A:</b> I have chosen C# becase it's platform independent, secure, flexible, managed, popular, modern and API rich language.

***
Expand All @@ -46,6 +46,12 @@ Currently, you can contribute to this repository in one of the following ways:
<li>To make OpenCiv1 platform independent, popular, appealing and easy to play, to the older, as well as to the younger public, as was original Civilization 1 game popular back in the day.</li>
</ul>

***
<p><b>Q:</b> Will OpenCiv1 source code be indentical to the Original Civilization 1 game source code?</p>
<p><b>A:</b> No. The OpenCiv1 source code does not contain any original Civilization 1 source code.
The rewritten code performs the same function (as the original code does), but the code is completely different and under MIT license.
The Microprose and its successors never released the original source code which remains protected under copyright laws to this day.</p>

***
<p><b>Q:</b> Does that mean that the OpenCiv1 will be completely different from original Civilization 1 game, like, for example FreeCiv?</p>
<b>A:</b> Absolutely not, the goal is to keep all of the original rules and functionalities, as well as much as possible of the original Visual and Audio appearance.
Expand All @@ -55,14 +61,15 @@ Currently, you can contribute to this repository in one of the following ways:
<b>A:</b> Based on some stats, many people think that the first Civilization offers as much fun as the other sequels do.

***
<p><b>Q:</b> Are there any additional keyboard shorcuts (apart from the default ones)?</p>
<p><b>Q:</b> Are there any additional or different keyboard shorcuts (apart from the default ones)?</p>
<b>A:</b> Yes, these are additional keyboard shorcuts that you can use during the game:
<ul>
<li>Alt + D - Enable / Disable the <b>Debug mode<7b> (previously, Shift-56)</li>
<li>Alt + D - Enable / Disable the <b>Debug mode</b> (previously, Shift-56)</li>
<li>Alt + P - Pause / Resume game</li>
<li>Alt + 1 - Show / Hide Screen 1</li>
<li>Alt + 2 - Show / Hide Screen 2</li>
<li>Alt + 3 - Show / Hide Screen 3</li>
<li>You can't scroll the map with Shift + NumPad keys, instead use Shift + Navigation Keys (Up, Down, Left, Right, Home, End, PageUp and PageDown)</li>
</ul>

## Dependencies
Expand All @@ -84,7 +91,7 @@ You can also compile with CLI method:
<ul>
<li>git clone https://github.com/rajko-horvat/OpenCiv1 (To clone a specific branch use: git clone -b [branch] https://github.com/rajko-horvat/OpenCiv1)</li>
<li>cd OpenCiv1</li>
<li>dotnet build -c Release</li>
<li>dotnet build -c Debug</li>
</ul>

## Project milestones
Expand Down
4 changes: 2 additions & 2 deletions src/CivGame/Game/CityWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ public ushort F0_1d12_0045_ProcessCityState(short cityID, short flag)
0, this.oParent.CivState.Players[this.Var_6548_PlayerID].Coins / 3);
}

if (city.StatusFlag == 0x19 && this.oParent.CivState.Players[this.Var_6548_PlayerID].ActiveUnits[25] == 0 && city.ShieldsCount != 0)
if (city.CurrentProductionID >= 0 && city.StatusFlag == 0x19 && this.oParent.CivState.Players[this.Var_6548_PlayerID].ActiveUnits[25] == 0 && city.ShieldsCount != 0)
{
// Instruction address 0x1d12:0x260d, size: 5
local_cc = this.oParent.Segment_2dc4.F0_2dc4_007c_CheckValueRange(
Expand Down Expand Up @@ -4743,7 +4743,7 @@ private void F0_1d12_6dfe(short cityID, int size)
// Instruction address 0x1d12:0x6ebb, size: 5
while ((this.oParent.Var_70e2 + this.oParent.Var_70e4) > this.oParent.Segment_2dc4.F0_2dc4_007c_CheckValueRange(this.oParent.CivState.Cities[cityID].ActualSize - size, 0, 99))
{
if (this.Var_6542 != 0)
if (this.Var_6542 > 0)
{
this.Var_6542--;
}
Expand Down

0 comments on commit 2c14411

Please sign in to comment.