Seven Kingdoms: Ancient Adversaries — Web (WebAssembly)
=======================================================

This is an unofficial, community fan port of the GPLv2 game "Seven Kingdoms:
Ancient Adversaries" (version 2.15.6), compiled to WebAssembly with Emscripten.

LICENSE
-------
The source code AND the game data are licensed under the GNU General Public
License, version 2 (GPLv2). See LICENSE.txt for the full text.

COMPLETE CORRESPONDING SOURCE (GPLv2 section 3)
-----------------------------------------------
The complete corresponding source for this build — the full 7kaa 2.15.6 source
INCLUDING the modifications made for this port, the HTML/JavaScript shell, and
the build scripts — is available at the same location as this page:

    https://lern-digital.de/7kaa/7kaa-source.zip

The game DATA (sprites/sounds/scenarios), also GPLv2, is distributed as
7kaa.data at the same URL. Upstream project & data:
    https://github.com/the3dfxdude/7kaa
    https://sourceforge.net/projects/skfans/

WRITTEN OFFER (GPLv2 section 3b, as a backup)
---------------------------------------------
For at least three (3) years, the operator will, on request, provide the
complete corresponding machine-readable source code for this build for no more
than the cost of physically performing source distribution. Contact via the
site's Impressum: https://lern-digital.de/impressum

MODIFICATIONS vs. upstream (GPLv2 section 2a)
---------------------------------------------
Changed by the porter for the WebAssembly build on 2026-06-02, all guarded by
`#ifdef __EMSCRIPTEN__`:
  - src/OVGA.cpp     : pin the SDL window to the logical VGA size; start windowed
                       (no startup fullscreen) so the canvas scales cleanly.
  - src/OSYS.cpp     : emscripten_sleep(1) in Sys::yield() (with -sASYNCIFY) to
                       hand control back to the browser; skip startup fullscreen.
  - src/AM.cpp       : read the SK_LOCALE env var to select the UI language.
  - src/LocaleRes.cpp: use an absolute /data/locale path for gettext catalogs.
  - src/OWORLD.cpp   : mouse-edge auto-scroll disabled on the web build.
Changed on 2026-06-04 (version 2 — configurable respawn of kingdoms/monsters):
  - include/ConfigAdv.h, src/ConfigAdv.cpp : new settings respawn_kingdoms,
    respawn_kingdom_interval/chance, respawn_monsters, respawn_monster_target/
    chance (also usable natively via config.txt).
  - include/ONATIONA.h, src/ONATIONA.cpp : NationArray::process_respawn() and
    spawn_ai_nation() — destroyed kingdoms are replaced (independent town forms
    a nation, or a new kingdom is founded on free land).
  - include/OMONSRES.h, src/OMONSRES.cpp : MonsterRes::process_respawn() —
    destroyed monster lairs reappear up to a configurable target.
  - src/OSYS2.cpp    : daily call of both respawn processors.
  - include/OBATTLE.h: create_town/create_unit made public for reuse.
  - src/AM.cpp       : SK_CONFIG env var ("name=value;...") feeds ConfigAdv
                       (used by the page's game-options panel).
  - src/OGAME.cpp    : wall_res.init()/deinit() — the wall graphics resource
                       was never initialized upstream (crash on wall draw).
  - include/OMOUSE.h, src/OMOUSE.cpp, src/OSYS.cpp : new key events
                       KEYEVENT_BUILD_WALL (V) / KEYEVENT_DESTRUCT_WALL
                       (shift+V) — the engine always had the wall build/
                       destruct commands but nothing ever issued them.
  - src/OW_WALL.cpp  : enabled the originally intended (commented-out)
                       wall building/destruction costs (10/5 gold).
  - include/OMOUSE.h, src/OMOUSE.cpp, src/OSYS.cpp : KEYEVENT_CHEAT_ENABLE_DIRECT
                       (shift+C) — enables the game's built-in cheat mode
                       directly (touch devices cannot type the classic secret
                       key sequence). Single player only, as upstream.
  - include/ConfigAdv.h, src/ConfigAdv.cpp, src/OSYS2.cpp : new option
                       cheat_enabled_from_start — built-in cheat mode active
                       from the start (set via the page's game options).
  - src/OGAMMAIN.cpp, src/OGAMSING.cpp : "[ui] <state>" stdout markers on
                       menu entry, used by the web shell's quick-start to
                       navigate the menus automatically.
  - include/ConfigAdv.h, src/ConfigAdv.cpp, src/OSYS2.cpp : new option
                       show_unit_icons (always display unit icons — small-
                       screen readability; mirrors into config daily).
  - src/OGAMMAIN.cpp : SK_LOAD env var — loads the given save game directly
                       on startup (one-tap resume from the web page).
  - src/OSYS.cpp     : "[save] auto" stdout marker after each auto-save so
                       the page can flush IndexedDB (crash safety).
  - src/AM.cpp       : SK_GAME env var ("key=value;...") tunes the main game
                       Config (difficulty/change_difficulty, ai_nation_count,
                       ai_aggressiveness, start_up_cash, ai_start_up_cash,
                       fog_of_war, explore_whole_map) for the web options.
  - src/OINFO.cpp    : "[seed] N" stdout marker in init_random_seed so the
                       page can confirm each game is freshly time-seeded.
  - src/OGAMEND.cpp  : "[gameover] win|lose|retire" stdout marker in
                       Game::game_end so the page can show a victory/defeat
                       share card.
  - src/OSYS2.cpp    : live in-game settings — Sys::process polls the MEMFS
                       file /sk_live.cfg (written by the page's options panel
                       while playing) and applies "name=value" pairs through
                       ConfigAdv::set, so respawn/walls/cheats etc. can be
                       changed during a running game.
The previous build (without respawn) remains available as version 1:
    https://lern-digital.de/7kaa/v1/7kaa.html
Plus a hand-written include/config.h and the 7kaa_web-build/ scripts.

EXCLUDED (not GPL): the original game MUSIC (separate free, non-GPL package) and
the third-party TRANSLATION resource file are NOT included. UI translations use
the GPL .po catalogs from the upstream source.

TRADEMARK
---------
"Seven Kingdoms" is a trademark of Enlight Software Ltd. This web port is an
unofficial fan project and is NOT affiliated with, sponsored by, or endorsed by
Enlight Software. Original game (c) 1997/98 Trevor Chan & Enlight Software;
free/open-source release maintained by the 7kfans project.

PRIVACY
-------
The game runs 100% in your browser and sends no game data to any server; it sets
no cookies. Site privacy policy: https://lern-digital.de/datenschutzerklaerung
