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 Mar 7, 2024
2 parents 406e6a5 + 14e6fdf commit 31e42df
Show file tree
Hide file tree
Showing 62 changed files with 743 additions and 281 deletions.
39 changes: 38 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
PLEASE UPDATE YOUR LINKS
https://sourceforge.net/projects/skfans

Seven Kingdoms: Ancient Adversaries
-----------------------------------

Release version 2.15.6
Project website: www.7kfans.com
Downloads and source repo: sourceforge.net/projects/skfans

This is a GPL release of the Seven Kingdoms: Ancient Adversaries thanks to
Enlight Software which granted the ability to license the game under a
Expand All @@ -13,6 +17,39 @@ of the game.

Summary of changes from 2.15.5 to 2.15.6
---------
* Fixed bugs related to rebelling
* Improved AI on handling rebellions
* Fixed several crash bugs
* Fixed small graphic update bugs
* Fixed bug when assigning to ship
* Fixed AI declare war bug
* Fixed AI give tribute bug
* Greatly improved AI sea based missions
* Improved AI on training and recruiting
* Cleaned up some deinit code
* Improved handling of town migration with workers
* Improved AI to be move aggressive in attack missions
* Improved validation of attack actions
* Added display of the land mass size in the F10 menu
* Enabled town peasant migration
* Created button for markets to control stocking type -- thanks MicroVirus and
sraboy
* Added Phoenix vision on fryhtan lairs
* Improved AI at building harbors
* Fixed bugs related to AI surrenders
* Improved locale code
* Made English the default language on Windows
* Increased the max number of raw resource sites to 10
* Fixed bug on trade ship docking and exiting
* Reduced penalty on trade unit destruction
* Improved distance calculating so placing buildings and towns on any side is
treated the same
* Fixed some path finding issues
* Enabled the ability for AI to scout the map
* Fixed screen edge mouse handling bug
* Fixed exploit when spying on an enemy nation report
* Improved AI handling on granting money to towns and recruiting
* Increased the speed of speed level 9


System Requirements
Expand Down Expand Up @@ -41,7 +78,7 @@ 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
* SDL 2.24.0+
* enet 1.3.xx Reliable UDP networking library
* OpenAL-soft or equivalent driver

Expand Down
28 changes: 27 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,24 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
)
CXXFLAGS="$save_CXXFLAGS"

AC_MSG_CHECKING(checking for register keyword)
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
int main()
{
register int x;
return 0;
}
)],[
AC_MSG_RESULT(yes)
have_register=yes
],[
AC_MSG_RESULT(no)
]
)

# Checks for header files.
dnl AC_CHECK_HEADERS([])
gt_LC_MESSAGES

# Checks for typedefs, structures, and compiler characteristics.
AC_CANONICAL_HOST
Expand All @@ -95,7 +111,7 @@ AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_CHECK_FUNCS([_NSGetExecutablePath])
AC_CHECK_FUNCS_ONCE([_NSGetExecutablePath setenv])

AX_STRING_STRCASECMP
if test x"$ac_cv_string_strcasecmp" = "xno" ; then
Expand Down Expand Up @@ -365,6 +381,16 @@ AS_IF([test "$enable_enet" = yes], [
])
])

AS_IF([test "$have_register" = yes], [
AC_DEFINE([REGISTER], [register], [
Define to the register keyword your compiler allows
])
],[
AC_DEFINE([REGISTER], [], [
Define to the register keyword your compiler allows
])
])

AC_SUBST([GLOBAL_LDFLAGS])
AC_SUBST([GLOBAL_CFLAGS])

Expand Down
6 changes: 6 additions & 0 deletions include/ConfigAdv.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@ class ConfigAdv
char firm_migrate_stricter_rules;

// bug fix settings
char fix_path_blocked_by_team;
char fix_recruit_dec_loyalty;
char fix_sea_travel_final_move;
char fix_town_unjob_worker;

// locale settings
char locale[LOCALE_LEN+1];

// mine settings
char mine_unlimited_reserve;

// monster settings
char monster_alternate_attack_curve;
int monster_attack_divisor;
Expand Down Expand Up @@ -85,6 +90,7 @@ class ConfigAdv
char unit_ai_team_help;
char unit_finish_attack_move;
char unit_loyalty_require_local_leader;
char unit_allow_path_power_mode;
char unit_spy_fixed_target_loyalty;
char unit_target_move_range_cycle;

Expand Down
3 changes: 3 additions & 0 deletions include/GAMEDEF.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ enum { COMMAND_PLAYER=0, COMMAND_REMOTE=1, COMMAND_AI, COMMAND_AUTO };

#define SPY_KILLED_REPUTATION_DECREASE 3

#define MIN_RAW_RES_SITE 1
#define MAX_RAW_RES_SITE 10

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

#endif
4 changes: 3 additions & 1 deletion include/LocaleRes.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ class LocaleRes

void init();
void deinit();
void load();
void load(const char *locale);

#ifdef ENABLE_NLS
const char *conv_str(iconv_t cd, const char *s);
#endif
const char *get_locale_dir();
const char *get_messages_locale();
};

extern LocaleRes locale_res;
Expand Down
3 changes: 2 additions & 1 deletion include/OGAME.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ enum { GAME_PREGAME=1,
// ####### begin Gilbert 2/9 ######//
GAME_CREDITS,
// ####### end Gilbert 2/9 ######//
GAME_DEMO
GAME_DEMO,
GAME_POSTGAME
};

//--------- Define struct ColorRemapMethod ----------//
Expand Down
1 change: 1 addition & 0 deletions include/OMISC.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Misc
int sqrt(long);
int diagonal_distance(int,int,int,int);
int points_distance(int,int,int,int);
int rects_distance(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2, int edgeA=0, int edgeB=0);
float round(float,int,int=0);
float round_dec(float);

Expand Down
4 changes: 2 additions & 2 deletions include/ONATIONB.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ class NationBase
int has_people(); // whether the nation has any people (but not counting the king). If no, then the nation is going to end.

void being_attacked(int attackNationRecno);
void civilian_killed(int civilianRaceId, int penaltyLevel);
void change_all_people_loyalty(int loyaltyChange, int raceId=0);
void civilian_killed(int civilianRaceId, int isAttacker, int penaltyType);
void change_all_people_loyalty(float loyaltyChange, int raceId=0);

void form_friendly_treaty(int nationRecno);
void form_alliance_treaty(int nationRecno);
Expand Down
1 change: 1 addition & 0 deletions include/OSPY.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class Spy
int can_change_cloaked_nation(int newNationRecno);

int capture_firm();
int can_capture_firm();

void reward(int remoteAction);
void set_exposed(int remoteAction);
Expand Down
2 changes: 1 addition & 1 deletion include/OU_GOD.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class UnitGod : public Unit
virtual void init_crc(UnitGodCrc *c);

private:
void consume_power_pray_points();
int consume_power_pray_points();

void cast_on_loc(int castXLoc, int castYLoc);
void cast_on_unit(int unitRecno, int divider);
Expand Down
1 change: 1 addition & 0 deletions include/OWORLD.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class World
int spaceLocWidth, int spaceLocHeight, int maxTries,
int regionId=0, int buildSite=0, char teraMask=1);
int is_adjacent_region( int x, int y, int regionId );
int is_harbor_region(int xLoc, int yLoc, int landRegionId, int seaRegionId);

void draw_link_line(int srcFirmId, int srcTownRecno, int srcXLoc1, int srcYLoc1, int srcXLoc2, int srcYLoc2, int giveEffectiveDis=0);

Expand Down
2 changes: 1 addition & 1 deletion include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
#define SKVERMED 15
#define SKVERMIN 6

#define DEV_VERSION
//#define DEV_VERSION

#endif
35 changes: 35 additions & 0 deletions m4/lcmessage.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# lcmessage.m4 serial 8
dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-2023 Free
dnl Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Lesser General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.

dnl Authors:
dnl Ulrich Drepper <[email protected]>, 1995.

# Check whether LC_MESSAGES is available in <locale.h>.

AC_DEFUN([gt_LC_MESSAGES],
[
AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <locale.h>]],
[[return LC_MESSAGES]])],
[gt_cv_val_LC_MESSAGES=yes],
[gt_cv_val_LC_MESSAGES=no])])
if test $gt_cv_val_LC_MESSAGES = yes; then
AC_DEFINE([HAVE_LC_MESSAGES], [1],
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
])
4 changes: 2 additions & 2 deletions packaging/windows/install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ SetCompressor /SOLID lzma
;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "COPYING"
!insertmacro MUI_PAGE_LICENSE "COPYING-Music.txt"
;!insertmacro MUI_PAGE_LICENSE "COPYING"
;!insertmacro MUI_PAGE_LICENSE "COPYING-Music.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY

Expand Down
Loading

0 comments on commit 31e42df

Please sign in to comment.