The buttons of the game setup (and of the joining manager's setup) use the darker
picture from the bottom of the setup atlas while the mouse button is held, as in a
recording of the real game; the release redraws even when the value is at its limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The calculator panel and its keys (bank, offer editor, advertising, contracts, stadium,
balance plan, alternate game end) and the window frame (ten dialogs) are drawn by
ui/calculator_widgets.hpp and ui/dialog_frame.hpp; a test compares them with the former
drawings. The calculator keys of bank, offer editor, advertising and contracts now show
the pressed look while the mouse button is held.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Transfer market, pitch, lineup, bank, offer editor, advertising, manager, player card,
player detail, club info, league pairings, other games, top scorers, stadium,
training, game end and the contract tabs drew the same button frame with their own
copies. They now call draw_wide_button_frame (ui/button_frame.hpp), which a test
compares pixel for pixel with the former drawing. Buttons whose drawing differs by a
pixel (statistics rankings, team statistics, opportunities, analytics) are left alone.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Advertising offers and notices, the player card, the training camp booking and
notice, the file dialog (page button, overwrite question) and the bank notices
and credit fee question now draw the pressed look from the mouse press until
the release. Manager notices share source_dialog_button_at for their OK/Ja/Nein.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The back, send and switch buttons below the contract offer and team premium
panels and JA/NEIN of the manager confirmation are drawn pressed while the
mouse button is held, using the shared frame of ui/button_frame.hpp.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bank (stocks, property, savings, credit), the offer editor footer, the lineup
bottom buttons and the pitch page buttons Daten and Kurz are drawn in the
pressed look from the mouse press until the release, like the friendly match
question. The frame drawing is shared in ui/button_frame.hpp.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Assets with openbmh.dat are a complete game; without that file the launcher asks
for BMH.EXE (FLTD.EXE) as before. With both present the executable is used.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The numbers of the Diamond 3.7 executable and of Football Limited stay built in,
the game texts go into data/openbmh.dat, which the release ships next to the
programs (found in OPENBMH_DAT, the game folder, the program folder, the current
folder). Without the file those texts are empty. A replay of a recorded session
gives the same output as with the real BMH.exe when the file is there, and differs
only in the seven text lines when it is missing. week_check no longer counts its
probe re-rating of the team as draws of the port (the apparent deviation from
minute 10 of the DOSBox recording was this measuring error).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The game no longer needs BMH.EXE or FLTD.EXE. The numbers and the game texts of
the Diamond 3.7 executable and of the English Football Limited are generated into
formats/diamond_constants.inc and formats/fltd_constants.inc (tools/diamond_constants).
A missing BMH.exe loads the embedded German image, an English installation without
FLTD.EXE gets the embedded English image; an executable that is present is used as
before. The default manager name is OpenBMH. The launcher accepts directories and
archives that hold only the asset files. Replays of a recorded session give identical
output with and without BMH.EXE, and the English image equals the translated one.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
VERKAUFEN on a player who stands on the transfer list only showed a message
when no offer had arrived yet. The original first asks whether the player
should be taken off the transfer market: yes frees the list slot (the player
stays in the squad), no continues to the offers. Controller and UI tests cover
both answers.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The source package verifies the pinned archive hashes, so the vendored files
must not be line-ending converted, and ChangeLog.md/readme.md are included.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The release asset download returned HTTP 504 for hours and blocked the Windows
build. miniz (MIT) is two source files, so it now lives in third_party/miniz and
the public-tree check skips that unmodified third-party directory.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- The notice dialog refused Source notices it did not know, which silently refused the whole action: the agreement of a
poached player ("Ihr erstes Angebot wird angenommen!") made the Angebot button of the Abwerben dialog fail, and the new
search boxes never appeared. Both text families are known now; the test turns every notice of the transfer routes into
its dialog like the graphical client does.
- Suchen/Vorschlag/Abwerben and the other market buttons are drawn pressed while the mouse button is held.
- Confirming the search dialog first reports "Ihre Scouting-Abteilung ..." (text 0xAF25C) as in the original, then the matches.
- A refused transfer or offer action shows its reason, writes it to stderr and the debug log.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
TransferMarketScreen gets the dialog of the original (KB/69.VGA panel at 184,20, seven bar rows from the
EXE table, click rules of sub_19409, confirm button, price estimate). Suchen opens it with the stored
profile, Vorschlag with the suggestion the squad asks for (computed in the projection). Closing posts a
store_search_profile request; the controller stores it and announces the matching listings through the
notice presenter, like the original's message boxes. Right button or Esc leaves with the search switched
off. Controller test drives the whole route.
The market list showed the asking fee scaled by 0x30d4 (older Diamond); 3.7 rounds to 10000
(sub_3C940), now also in the projection. Four tests computed the old base and follow.
Fixes#79
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two controller tests: an own listing with a bid is reviewed from the roster, the offers reach the
presenter and accepting sells the player; a listing that expires with a declined offer leaves the
list and the player can be listed again from the roster. Both pass; the reported "cannot review
offers / cannot list again" could not be reproduced on this route. app_controller_tests gets a
--market-only switch.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CareerSession gets search_profile, suggest_search_profile and dispatch_search_profile (owner and
modal-state checks, revision only when the stored profile changed). The console replaces the
OpenSearch placeholder with three commands and documents them; with apply the matching listings
are reported with the original's "Spieler ... ist interessant!" message. search_profile_valid
separates a refused profile from a switched-off one.
Part of #79 (the dialog in the graphical client is still open)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New game/search_profile.* holds the 18-byte search profile of a human manager (manager record
+0x1f6): the dialog's closing rule, the suggestion generated from the squad (original sub_18F06),
the position strengths (sub_19A38) and the listing match (sub_190B5). search_profile_news in
month.cpp now uses the same matching rule. Compared with the Diamond 3.7 routines in the
emulator harness on 10 savegames (306 runs, 406 matched listings, no difference; a deliberately
changed profile is detected).
Part of #79 (the dialog in the graphical client and the console commands follow)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The engine asks the selling manager and the buyer a yes/no question when a poaching offer
is decided (hooks.confirm). The graphical client only supplied the notice presenter, so the
engine refused the offer, the controller swallowed the reason and the ANGEBOT button appeared
to do nothing. The client now shows the question with the existing yes/no dialog.
Fixes#80
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Strength of the new player is the youth-team strength setting, the academy is
skipped when the squad's youth average is more than 25 above it, up to two rounds
need W(0, 3) == 0, and the retirement/retire rules use the 3.7 slot range. The
age test was inverted: only a player older than the roll W(t, t + 3) is recycled
(found by comparing with the 3.7 programme in an emulator, 192 runs on whole
savegames, no difference). Removes the old strength-band deviation entries.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kFacilityValue (entries 1, 2, 5), the per-visitor facility income table and the
season-ticket price of the first division. Checked against the 3.7 programme in
an emulator on whole savegames: weekly statistics now match without difference.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Credit limit 8 million, fee base 10000 per 10000 of value, DFB fee 150 %,
championship bonus 700000, club-popularity premiums 400000/850000/1000000/850000,
periphery prices, advertising base 0x87, start capital step 3 million, the
broke limit -4 million, the training-injury chance, retirement after an injury
of more than 20 matchdays (1 in 40), the contract-talk limit and the side
rhythm (human: no balance term, computers: at least 48). Values read from the
3.7 programme; the earlier build the engine was derived from used other numbers.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Injury chance 1 in 31 (was 1 in 39), no-booking roll W(0,3), straight red 1 in 34
(was 1 in 28), the injury type thresholds (match injuries now types 3-30), the
duration table, 1/4 longer for a player injured before (was 1/8) and the club
doctor's cut (/8, capped only for the heavy types 20-30). Values read from the
3.7 programme, measured against the earlier build the engine was derived from.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Function and section comments for ui/stadium, ui/preparation_flow, the
transfer market, contract, outgoing and incoming transfer screens, and for
app/main, app/window_actions and app/desktop_actions. Comment lines only;
full build and runnable tests unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Function and group comments for ui/flow, app/controller and app/career_session:
the request/acknowledge model, the revision and identity checks, staged copies
that are committed on success, and the national-coach desk identity. Comment
lines only; full build and runnable tests unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every source file in ui, app, game, formats, cli, audio and launch that had none
now starts with a short English comment: what it implements, what state it owns
and how it relates to its neighbours (request/acknowledge flow, pairs of files,
random generator use). Comment lines only; the full build and the runnable
tests are unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The original computes ((base / 100) * den) / 100 with 64-bit-mantissa x87
steps and one final store to a double. The host long double is only 64 bits
wide on MSVC and Apple silicon, so the annuity differed by 1 for roughly 0.2 %
of realistic loans (1-60 million) there. The chain is now evaluated with
integers, identical on every platform. Verified against the original routine
in an emulator: 5684 term/principal combinations, no difference.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both screens are identified by the home club in the session; the desktop
check compared against the desk's own runtime club identity after the earlier
Table/Strengths fix, so the national desk was rejected as stale.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The original shows only ABBRECHEN while a running sponsor contract is not
terminable; the button was always drawn here.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The live lineup of a national-team match failed with 'pitch: unsupported club'
because the pitch extras only accepted league club ids. The national desk
(runtime club 357, national squad pool) is now accepted under the same
condition as the lineup page, uses badge sheet 0 and its own roster base for
the marking lookup.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The table's club information (TeamInfo) enters the club again on each
redraw: view toggle, statistics, player card. The session required
exactly one entry and discarded the whole visit otherwise, also the
Nein/Radio/Video setting made in it, so a computer match could not be
set to Video. One entry is now the minimum.
Checked with a probe on a real savegame: table, club, two entries and
Video leave the category set.
Refs #75, #77.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Joining a manager: the next opponent of every manager is captured per
day for that day's manager count, so the joined manager's desk showed
"Spielfrei" until the next day was prepared. It is captured again when
the join is committed.
- The club player detail's atlas error now names the access and the
atlas size, so the debug log shows what failed.
Refs #76, #77.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Desktop: the opponent's badge sheet was loaded once when the screen
was built and kept while the state advanced, so the index of the new
opponent picked a badge from the old sheet (a foreign club's logo, the
wrong club for RB Leipzig). It is reloaded with every new state.
- National desk: the desk keeps the home club's key per manager (for
the hand-back), while Table, Stärken, Other games and the other pages
carry the identity of the runtime club (the national team). The
controller and flow compared the two and refused ("invalid Table
dispatch manager identity", "stale desktop identity"). DeskState now
gives session_identity_key() and the comparisons use it.
Refs #74.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found with the debug log and savegames of a real session:
- Calendar: it read the memory copies of the season origin and day,
which hold only the day the game was loaded or saved, and refused
from the first kickoff on ("saved native season cursor disagrees").
It now uses the live values, as the reschedule code does. This also
fixes "Spiel verlegen".
- Stärken: the guard of dispatch_strengths required a desk stage, but
the turn driver marks the running turn as Failed (replay guard) for
its whole duration, so Stärken could never open from the live
overview or the end-of-phase results page; the failed handover then
left the other pages with stale owners and the match stuck. The
guard now accepts the running turn while a live overview is open.
- Tests: calendar after a kickoff; live overview handovers on the
phase results page.
Refs #71, #73.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>