Skip to content

Commit

Permalink
Merge branch 'the3dfxdude:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
woodgreat authored Feb 24, 2023
2 parents 11b40e0 + a46e218 commit 406e6a5
Show file tree
Hide file tree
Showing 49 changed files with 709 additions and 200 deletions.
47 changes: 19 additions & 28 deletions README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Seven Kingdoms: Ancient Adversaries
-----------------------------------

Release version 2.15.5
Release version 2.15.6
Project website: www.7kfans.com

This is a GPL release of the Seven Kingdoms: Ancient Adversaries thanks to
Expand All @@ -11,33 +11,8 @@ details of the license. We are indebted to Enlight for making the 7kfans
project possible and giving a new chance to build a community for fans
of the game.

Summary of changes from 2.15.4 to 2.15.5
Summary of changes from 2.15.5 to 2.15.6
---------
* Fixed UI regression in setting auto taxing
* Improved stability of starting a multiplayer game
* Reduced load of crc checking in multiplayer
* Improved formatting of the game manual
* Fixed wrongly applied leadership gain when the leader was not in range
* Fixed more crashes
* Improved AI's handling of combat mission at sea
* Reset powered attack type when line-of-sight is broken
* Improved idle-attack detection when there are many units in the game
* Fixed incorrect pathing when unit is in a building or on a ship
* Do not cycle powered attack when the target moves, correcting the usage behavior of Egyptian fire arrows
* Added Esperanto translation
* Added support for copying trade routes for trade ships
* Added a copy trade route button when hovering the mouse over units in the trade report
* More trade report improvements
* Added a request builder button when a building is selected
* Set the default for mobilizing civilians to non-aggressive mode to prevent inadvertantly sending them to their death
* Corrected building linkage when buildings are densely placed
* Corrected AI related bugs
* Improved the AI's ability to send help to an ally
* Improved Fryhtan AI to help an Ordo under attack
* Fixed crashes related to bullets
* Fixed spy vision of a spy on a ship
* Fixed spy vision of a spy assigned to building for construction or repair
* Added a credits screen


System Requirements
Expand All @@ -55,20 +30,36 @@ Supported architectures for multiplayer
Building the game
---------

The build process is based on autotools, as this easily runs on all typical
Windows, Linux and Unix-like systems with minimal requirements. Below are the
additional things that you are expected to provide in your build environment.

For building for Windows, the environment we use is mingw-w64 with a cross-
compiler under Linux. The same mingw-w64 is available from MSYS native to
Windows. There are other similar environments, but we cannot help people
configure their system -- you are expected to know how to use your tools.

Required dependencies
* GCC 4.6+ C++11 compliant compiler
* SDL 2.0.8
* enet 1.3.xx Reliable UDP networking library
* OpenAL-soft or equivalent driver

Optional dependencies
* Autoconf 2.65 (when using git snapshot)
* libcurl for full 7kfans multiplayer integration (website requires TLS1.2)
* gettext 0.19
* Game music: 7kaa-music-2.15
-> Packagers: Copy music into program data folder or PACKAGE_DATA_DIR
-> Make sure the file names are in upper-case
* NSIS for building a Windows installer
* TeX Live with latexmk, fontaxes, accanthis, universalis, and yfonts for
generating the game manual in pdf

Autoconf 2.65+ and autoconf-archive is required when generating a configure
script. You do not need to generate a configure script when you are building
an officially released version of the game as it is already provided in the
source archive. Compiling and using git snapshots for general use is dis-
couraged and instead use the latest officially released version of the game.


Running locally from source build
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.65])
AC_INIT([7kaa], [2.15.5], [[email protected]], [],
AC_INIT([7kaa], [2.15.6], [[email protected]], [],
[http://7kfans.com/])
AC_CONFIG_SRCDIR([src/AM.cpp])
AC_CONFIG_HEADERS([include/config.h])
Expand Down
6 changes: 6 additions & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,28 @@ nobase_dist_resdata_DATA = \
RESOURCE/FNT_BARD.RES \
RESOURCE/FNT_CASA.RES \
RESOURCE/FNT_CASA_88592.RES \
RESOURCE/FNT_CASA_88593.RES \
RESOURCE/FNT_CASA_88595.RES \
RESOURCE/FNT_HITP.RES \
RESOURCE/FNT_MID.RES \
RESOURCE/FNT_MID_88592.RES \
RESOURCE/FNT_MID_88593.RES \
RESOURCE/FNT_MID_88595.RES \
RESOURCE/FNT_NEWS.RES \
RESOURCE/FNT_NEWS_88592.RES \
RESOURCE/FNT_NEWS_88593.RES \
RESOURCE/FNT_NEWS_88595.RES \
RESOURCE/FNT_SAN.RES \
RESOURCE/FNT_SAN_88592.RES \
RESOURCE/FNT_SAN_88593.RES \
RESOURCE/FNT_SAN_88595.RES \
RESOURCE/FNT_SMAL.RES \
RESOURCE/FNT_SMAL_88592.RES \
RESOURCE/FNT_SMAL_88593.RES \
RESOURCE/FNT_SMAL_88595.RES \
RESOURCE/FNT_STD.RES \
RESOURCE/FNT_STD_88592.RES \
RESOURCE/FNT_STD_88593.RES \
RESOURCE/FNT_STD_88595.RES \
RESOURCE/HELP.RES \
RESOURCE/HILL1.RES \
Expand Down
8 changes: 8 additions & 0 deletions data/RESOURCE/HELP.RES
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,11 @@ When you Click on this tile, your cursor will change into a small square. Place
REPAIRQ
Structure Repair Icon
This icon shows there is not a construction worker stationed here for repair but an idle worker may be requested. Click or right-click on this icon to request sending a construction worker.
~
MK_RSTKF
Restocking Source
This shows you which type of linked buildings this market may restock from.
~
MK_RSTKS
Switch Restocking Source
Click this button to change the type of linked buildings this market may restock from. This allows you to control this market's purpose.
21 changes: 1 addition & 20 deletions doc/README
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
% Greetings reader, my purpose is a complete restoration of the original manual with the updates. Special attention has been given to preserving the original author's voice; Overall, however, this is a different manual with lots of minor and major differences, written with Modern Language Association style guidance and coded in LaTeX with Texstudio on a minimalist Texlive distribution on GNU/Linux and compiled with pdflatex. I welcome fellow community members to contribute to this manual. Signed with gratitude to everyone who put effort in it.

% -- Building the manual -- %

% Required dependencies:
% * texlive-core
% * texlive-fontsextra - accanthis and universalis
% Optional dependencies:
% * latexmk
% To compile, run:
% $ latexmk or pdflatex main.tex

% -- Building the manual end -- %
NOTE: this README is essentially deprecated and will be heavily rewritten once changes I made over the years are reverted to align with a more preservationist method of development. The changelog is no longer needed since I use git more. Any TODO or bugs will be noted in an issue tracker. I will keep some information about dependencies and compiling and also some general style guidance for needed additions to blend in well.

% -- TODO -- %

Expand Down Expand Up @@ -70,13 +58,6 @@

% -- Notes end -- %

% -- References -- %

% https://cdn.akamai.steamstatic.com/steam/apps/450140/manuals/Seven_Kingdoms_Ancient_Adversaries_manual.pdf
% https://archive.org/details/Seven_Kingdoms

% -- References end -- %

% -- Changelog -- %

% v0.3.0
Expand Down
2 changes: 2 additions & 0 deletions include/CmdLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ enum StartupMode

struct CmdLine
{
int enable_audio;
int enable_if;
int game_speed;
int rnd;
StartupMode startup_mode;
char *join_host;

Expand Down
10 changes: 10 additions & 0 deletions include/ConfigAdv.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ class ConfigAdv

// firm settings
char firm_mobilize_civilian_aggressive;
char firm_migrate_stricter_rules;

// bug fix settings
char fix_recruit_dec_loyalty;
char fix_town_unjob_worker;

// locale settings
char locale[LOCALE_LEN+1];
Expand Down Expand Up @@ -73,10 +78,12 @@ class ConfigAdv
// town settings
int town_ai_emerge_nation_pop_limit;
int town_ai_emerge_town_pop_limit;
char town_migration;
char town_loyalty_qol;

// unit settings
char unit_ai_team_help;
char unit_finish_attack_move;
char unit_loyalty_require_local_leader;
char unit_spy_fixed_target_loyalty;
char unit_target_move_range_cycle;
Expand All @@ -91,6 +98,9 @@ class ConfigAdv
int vga_window_width;
int vga_window_height;

// wall settings
char wall_building_allowed;

public:
ConfigAdv();
~ConfigAdv();
Expand Down
15 changes: 14 additions & 1 deletion include/OF_MARK.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@

#define MAX_MARKET_STOCK 500

enum { RESTOCK_ANY = 0,
RESTOCK_PRODUCT,
RESTOCK_RAW,
RESTOCK_NONE,
};

//------- Define class MarketInfo --------//

#pragma pack(1)
Expand Down Expand Up @@ -101,7 +107,10 @@ class FirmMarket : public Firm

int no_linked_town_since_date;
int last_import_new_goods_date;
char is_retail_market; // if 1, then it sells consumer products only, if 0, it sells raw materials only

//--------------------------------//

char restock_type;

public:
FirmMarket();
Expand Down Expand Up @@ -133,6 +142,10 @@ class FirmMarket : public Firm

int read_derived_file(File* filePtr);

int is_raw_market();
int is_retail_market();
void switch_restock();

//-------------- multiplayer checking codes ---------------//
virtual uint8_t crc8();
virtual void clear_ptr();
Expand Down
2 changes: 1 addition & 1 deletion include/OMP_CRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ struct FirmMarketCrc : FirmCrc

int no_linked_town_since_date;
int last_import_new_goods_date;
char is_retail_market;
char restock_type;
};

struct FirmMineCrc : FirmCrc
Expand Down
2 changes: 2 additions & 0 deletions include/OREMOTE.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ enum { MSG_QUEUE_HEADER=FIRST_REMOTE_MSG_ID,
MSG_COMPARE_CRC,
MSG_U_SHIP_COPY_ROUTE,
MSG_FIRM_REQ_BUILDER,
MSG_F_MARKET_RESTOCK,

LAST_REMOTE_MSG_ID // keep this item last
};
Expand Down Expand Up @@ -314,6 +315,7 @@ struct RemoteMsg

void caravan_copy_route();
void firm_request_builder();
void market_switch_restock();
};

//----------- Define class Remote -----------//
Expand Down
2 changes: 1 addition & 1 deletion include/OTOWN.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ class Town
void think_migrate();
int think_migrate_one(Town* targetTown, int raceId, int townDistance);
void migrate(int raceId, int destTownZoneRecno, int newLoyalty);
int unjob_town_people(int raceId, int unjobOverseer, int killOverseer=0);
int unjob_town_people(int raceId, int unjobSpy, int unjobOverseer, int killOverseer=0);

int think_layout_id();

Expand Down
6 changes: 3 additions & 3 deletions include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#ifndef __VERSION_H
#define __VERSION_H

#define SKVERSION "2.15.5"
#define SKVERSION "2.15.6"
#define SKVERMAJ 2
#define SKVERMED 15
#define SKVERMIN 5
#define SKVERMIN 6

//#define DEV_VERSION
#define DEV_VERSION

#endif
2 changes: 1 addition & 1 deletion src/AM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ int main(int argc, char **argv)
config.help_mode = NO_HELP;
game.init();
game.game_mode = GAME_DEMO;
info.init_random_seed(0);
info.init_random_seed(cmd_line.rnd);
battle.run(0);
game.deinit();
break;
Expand Down
17 changes: 17 additions & 0 deletions src/CmdLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

CmdLine::CmdLine()
{
enable_audio = 1;
enable_if = 1;
rnd = 0;
game_speed = -1;
startup_mode = STARTUP_NORMAL;
join_host = NULL;
Expand Down Expand Up @@ -77,7 +79,9 @@ int CmdLine::init(int argc, char **argv)
const char *lobbyHostOption = "-host";
const char *lobbyNameOption = "-name";
const char *demoOption = "-demo";
const char *noAudioOption = "-noaudio";
const char *noIfOption = "-noif";
const char *rndOption = "-rnd";
const char *speedOption = "-speed";
const char *windowOption = "-win";
for( int i = 1; i < argc; i++ )
Expand All @@ -104,10 +108,23 @@ int CmdLine::init(int argc, char **argv)
{
set_startup_mode(STARTUP_DEMO);
}
else if( !strcmp(argv[i], noAudioOption) )
{
enable_audio = 0;
}
else if( !strcmp(argv[i], noIfOption) )
{
if( cmd_line.startup_mode == STARTUP_DEMO )
{
enable_audio = 0;
enable_if = 0;
}
}
else if( !strcmp(argv[i], rndOption) )
{
if( !have_arg(i, argc, rndOption) )
return 0;
rnd = atoi(argv[++i]);
}
else if( !strcmp(argv[i], speedOption) )
{
Expand Down
Loading

0 comments on commit 406e6a5

Please sign in to comment.