Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50e476f6e1 | ||
|
|
96cb05894f |
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ if(APPLE)
|
|||||||
# Enable native languages before dependencies/subdirectories inherit rules.
|
# Enable native languages before dependencies/subdirectories inherit rules.
|
||||||
enable_language(OBJC OBJCXX)
|
enable_language(OBJC OBJCXX)
|
||||||
endif()
|
endif()
|
||||||
set(OPENBMH_PRERELEASE "beta.1" CACHE STRING "Prerelease identifier; empty for final release")
|
set(OPENBMH_PRERELEASE "beta.2" CACHE STRING "Prerelease identifier; empty for final release")
|
||||||
set(OPENBMH_PRODUCT_VERSION "${PROJECT_VERSION}")
|
set(OPENBMH_PRODUCT_VERSION "${PROJECT_VERSION}")
|
||||||
if(OPENBMH_PRERELEASE)
|
if(OPENBMH_PRERELEASE)
|
||||||
string(APPEND OPENBMH_PRODUCT_VERSION "-${OPENBMH_PRERELEASE}")
|
string(APPEND OPENBMH_PRODUCT_VERSION "-${OPENBMH_PRERELEASE}")
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# OpenBMH 1.1 Beta 2
|
||||||
|
|
||||||
|
Bei Rückfragen zum Bau von Stadionplätzen und Peripherie bleibt die aktuelle Stadionansicht jetzt sichtbar. Das gilt auch für gedrückte Schaltflächen und nachfolgende Zahlungs-, Zuschuss- und Entschädigungshinweise. Der zuvor schwarze Hintergrund ist behoben.
|
||||||
|
|
||||||
|
Die Änderung betrifft die Darstellung; Baupreise, Bauzeiten und Spielstände bleiben unverändert. Bestehende 1.1-Daten und Spielstände können weiterverwendet werden. Bei einem bestehenden Community-Paket die Programmdateien aktualisieren und die eigene `COMMUNITY.OBD` sowie Spielstände behalten.
|
||||||
|
|
||||||
|
Downloads für Windows x64, macOS ARM64 und Linux x64 sowie ein passendes Source-Archiv. Originale Spieldaten sind nicht enthalten. Der Dateneditor `obdeddi` bleibt ein separater Download. Die stabile Classic-Linie 1.0 bleibt unabhängig; 1.2 wird weiterhin separat entwickelt und ist kein Bestandteil dieses Releases.
|
||||||
|
|
||||||
|
Der Fix wurde unter Linux mit Original-Assets, Pixelvergleichen und Bauablauf-Tests geprüft. Native Plattform-Builds und synthetische Tests sind über `QA-REPORT.json` und `SHA256SUMS` dokumentiert. Eine vollständige menschliche Spielprüfung auf allen Plattformen wird damit nicht behauptet.
|
||||||
+5
-3
@@ -2341,11 +2341,13 @@ int main(int argc, char** argv) {
|
|||||||
// after the tip question has returned, before the outer ACK.
|
// after the tip question has returned, before the outer ACK.
|
||||||
const Image backdrop = flow.stadium()->construction_notice_backdrop();
|
const Image backdrop = flow.stadium()->construction_notice_backdrop();
|
||||||
auto view = ui::construction_notice_dialog(staged, season_exe, notice);
|
auto view = ui::construction_notice_dialog(staged, season_exe, notice);
|
||||||
std::optional<ui::GameEndRenderOptions> effective_options;
|
const auto& stadium_owner = flow.stadium()->state();
|
||||||
|
std::optional<ui::GameEndRenderOptions> effective_options =
|
||||||
|
ui::GameEndRenderOptions{stadium_owner.plain_background, stadium_owner.gradient_text, true};
|
||||||
if (flow.stadium()->state().block_expansion || flow.stadium()->state().quoted_object) {
|
if (flow.stadium()->state().block_expansion || flow.stadium()->state().quoted_object) {
|
||||||
const auto& owner = flow.stadium()->state();
|
const auto& owner = flow.stadium()->state();
|
||||||
view.compact_dialog_frame = owner.compact_dialog_frame;
|
view.compact_dialog_frame = owner.compact_dialog_frame;
|
||||||
effective_options = ui::GameEndRenderOptions{owner.plain_background, owner.gradient_text};
|
effective_options = ui::GameEndRenderOptions{owner.plain_background, owner.gradient_text, true};
|
||||||
}
|
}
|
||||||
const char* title = notice.kind == ConstructionNoticeKind::InsufficientFunds
|
const char* title = notice.kind == ConstructionNoticeKind::InsufficientFunds
|
||||||
? "OpenBMH - stadium_funds_notice" : "OpenBMH - stadium_sponsor_notice";
|
? "OpenBMH - stadium_funds_notice" : "OpenBMH - stadium_sponsor_notice";
|
||||||
@@ -2359,7 +2361,7 @@ int main(int argc, char** argv) {
|
|||||||
view.compact_dialog_frame = owner.compact_dialog_frame;
|
view.compact_dialog_frame = owner.compact_dialog_frame;
|
||||||
if (present_pending_dialog(staged, view, backdrop,
|
if (present_pending_dialog(staged, view, backdrop,
|
||||||
"OpenBMH - stadium_ticket_compensation_notice",
|
"OpenBMH - stadium_ticket_compensation_notice",
|
||||||
ui::GameEndRenderOptions{owner.plain_background, owner.gradient_text}) == PendingOfferAnswer::unsupported)
|
ui::GameEndRenderOptions{owner.plain_background, owner.gradient_text, true}) == PendingOfferAnswer::unsupported)
|
||||||
throw std::runtime_error("compensation notice presenter stopped");
|
throw std::runtime_error("compensation notice presenter stopped");
|
||||||
}, sportschau_presenter,
|
}, sportschau_presenter,
|
||||||
[&](const GameState& staged, const AdvertisingRenewal& renewal, const Image& backdrop)
|
[&](const GameState& staged, const AdvertisingRenewal& renewal, const Image& backdrop)
|
||||||
|
|||||||
+7
-5
@@ -277,14 +277,16 @@ GameEndTaxDialog::GameEndTaxDialog(const std::filesystem::path& data,TaxDialogPr
|
|||||||
badge_=load_vga(asset_path(data/"W",std::to_string(std::max(0,projection_.badge_sprite)>>3)+".VGA"));
|
badge_=load_vga(asset_path(data/"W",std::to_string(std::max(0,projection_.badge_sprite)>>3)+".VGA"));
|
||||||
}
|
}
|
||||||
Image GameEndTaxDialog::backdrop() const {
|
Image GameEndTaxDialog::backdrop() const {
|
||||||
if(projection_.compact_dialog_frame)return Image(320,240,0);
|
const bool restored=restored_backdrop_&&restored_backdrop_->width==320&&restored_backdrop_->height==240;
|
||||||
if(restored_backdrop_&&restored_backdrop_->width==320&&restored_backdrop_->height==240)return *restored_backdrop_;
|
if(projection_.compact_dialog_frame&&!(options_.preserve_restored_backdrop&&restored))return Image(320,240,0);
|
||||||
|
if(restored)return *restored_backdrop_;
|
||||||
return source_base(background_,options_.plain_background,false);
|
return source_base(background_,options_.plain_background,false);
|
||||||
}
|
}
|
||||||
Image GameEndTaxDialog::render(std::optional<Button> pressed) const {
|
Image GameEndTaxDialog::render(std::optional<Button> pressed) const {
|
||||||
Image out=backdrop();
|
Image out=backdrop();
|
||||||
draw_source_dialog(out,{widgets_,faces_,&badge_,font_->small,font_->large,
|
draw_source_dialog(out,{widgets_,faces_,&badge_,font_->small,font_->large,
|
||||||
font_->exe,font_->sprite,texts_},projection_,options_.gradient_text,pressed);
|
font_->exe,font_->sprite,texts_},projection_,options_.gradient_text,pressed,
|
||||||
|
options_.preserve_restored_backdrop&&restored_backdrop_&&restored_backdrop_->width==320&&restored_backdrop_->height==240);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
bool source_badge_fallback(int token) {
|
bool source_badge_fallback(int token) {
|
||||||
@@ -292,11 +294,11 @@ bool source_badge_fallback(int token) {
|
|||||||
return original_badge_fallback(club);
|
return original_badge_fallback(club);
|
||||||
}
|
}
|
||||||
void draw_source_dialog(Image& out,const SourceDialogAssets& assets,const TaxDialogProjection& p,
|
void draw_source_dialog(Image& out,const SourceDialogAssets& assets,const TaxDialogProjection& p,
|
||||||
bool gradient,std::optional<GameEndTaxDialog::Button> pressed) {
|
bool gradient,std::optional<GameEndTaxDialog::Button> pressed,bool preserve_backdrop) {
|
||||||
using Button=GameEndTaxDialog::Button;
|
using Button=GameEndTaxDialog::Button;
|
||||||
if(out.width!=320||out.height!=240||(!p.badge_fallback&&!assets.badge))
|
if(out.width!=320||out.height!=240||(!p.badge_fallback&&!assets.badge))
|
||||||
throw FormatError("Source dialog: invalid backdrop or badge assets");
|
throw FormatError("Source dialog: invalid backdrop or badge assets");
|
||||||
if(p.compact_dialog_frame)out=Image(320,240,0);
|
if(p.compact_dialog_frame&&!preserve_backdrop)out=Image(320,240,0);
|
||||||
frame(out,assets.widgets,assets.exe,48,84,217,99,!p.compact_dialog_frame);
|
frame(out,assets.widgets,assets.exe,48,84,217,99,!p.compact_dialog_frame);
|
||||||
const std::string_view header = p.source_system_identity
|
const std::string_view header = p.source_system_identity
|
||||||
? text_at(assets.texts,::bmh::layout::SystemManagerNameText) : p.manager_name;
|
? text_at(assets.texts,::bmh::layout::SystemManagerNameText) : p.manager_name;
|
||||||
|
|||||||
+3
-1
@@ -29,6 +29,7 @@ std::vector<std::string> wrap_source_text(const Font&, const LeImage&,
|
|||||||
struct GameEndRenderOptions {
|
struct GameEndRenderOptions {
|
||||||
bool plain_background = false; // Original PlainBackground, not its inverse
|
bool plain_background = false; // Original PlainBackground, not its inverse
|
||||||
bool gradient_text = true; // TextGradientDisabled==0 && BMH.exe[TextGradientMode]==2
|
bool gradient_text = true; // TextGradientDisabled==0 && BMH.exe[TextGradientMode]==2
|
||||||
|
bool preserve_restored_backdrop = false; // Nested construction notices retain their owning screen.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Rendering-only projection. Names retain the Source ISO646-DE bytes; values and order have
|
// Rendering-only projection. Names retain the Source ISO646-DE bytes; values and order have
|
||||||
@@ -129,6 +130,7 @@ struct SourceDialogAssets {
|
|||||||
};
|
};
|
||||||
void draw_source_dialog(Image&, const SourceDialogAssets&, const TaxDialogProjection&,
|
void draw_source_dialog(Image&, const SourceDialogAssets&, const TaxDialogProjection&,
|
||||||
bool gradient,
|
bool gradient,
|
||||||
std::optional<GameEndTaxDialog::Button> pressed = {});
|
std::optional<GameEndTaxDialog::Button> pressed = {},
|
||||||
|
bool preserve_backdrop = false);
|
||||||
|
|
||||||
} // namespace bmh::ui
|
} // namespace bmh::ui
|
||||||
+3
-2
@@ -697,12 +697,13 @@ void StadiumScreen::rebuild_tip_dialog() {
|
|||||||
tip_dialog_.reset();
|
tip_dialog_.reset();
|
||||||
periphery_dialog_.reset();
|
periphery_dialog_.reset();
|
||||||
if (state_.periphery_quote_dialog) {
|
if (state_.periphery_quote_dialog) {
|
||||||
GameEndRenderOptions options{state_.plain_background, state_.gradient_text};
|
GameEndRenderOptions options{state_.plain_background, state_.gradient_text, true};
|
||||||
periphery_dialog_.emplace(data_, *state_.periphery_quote_dialog, options, render_scene());
|
periphery_dialog_.emplace(data_, *state_.periphery_quote_dialog, options, render_scene());
|
||||||
}
|
}
|
||||||
if (state_.construction_tip_dialog) {
|
if (state_.construction_tip_dialog) {
|
||||||
GameEndRenderOptions options;
|
GameEndRenderOptions options;
|
||||||
options.gradient_text = state_.gradient_text;
|
options.gradient_text = state_.gradient_text;
|
||||||
|
options.preserve_restored_backdrop = true;
|
||||||
if (state_.block_expansion) options.plain_background = state_.plain_background;
|
if (state_.block_expansion) options.plain_background = state_.plain_background;
|
||||||
tip_dialog_.emplace(data_, *state_.construction_tip_dialog,
|
tip_dialog_.emplace(data_, *state_.construction_tip_dialog,
|
||||||
options, state_.block_expansion
|
options, state_.block_expansion
|
||||||
@@ -2029,7 +2030,7 @@ void StadiumScreen::acknowledge(StadiumState updated) {
|
|||||||
// therefore leaves the old question retryable.
|
// therefore leaves the old question retryable.
|
||||||
std::optional<GameEndTaxDialog> staged_tip, staged_periphery;
|
std::optional<GameEndTaxDialog> staged_tip, staged_periphery;
|
||||||
if (updated.periphery_quote_dialog) {
|
if (updated.periphery_quote_dialog) {
|
||||||
const GameEndRenderOptions options{updated.plain_background, updated.gradient_text};
|
const GameEndRenderOptions options{updated.plain_background, updated.gradient_text, true};
|
||||||
staged_periphery.emplace(data_, *updated.periphery_quote_dialog, options, render_scene());
|
staged_periphery.emplace(data_, *updated.periphery_quote_dialog, options, render_scene());
|
||||||
}
|
}
|
||||||
if (updated.construction_tip_dialog) {
|
if (updated.construction_tip_dialog) {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "game/messages.hpp"
|
#include "game/messages.hpp"
|
||||||
#include "ui/manager.hpp"
|
#include "ui/manager.hpp"
|
||||||
|
#include "formats/palette.hpp"
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
@@ -1182,9 +1184,51 @@ void source_stadium_data_controls(const std::filesystem::path& data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
void construction_backdrop_tests(const std::filesystem::path& data,const std::filesystem::path& output) {
|
||||||
|
const auto save_image=[&](const Image& image,const std::string& name) {
|
||||||
|
if(output.empty())return;
|
||||||
|
std::filesystem::create_directories(output);const auto palette=load_palette(data/"M3PC.COL");
|
||||||
|
std::ofstream file(output/(name+".ppm"),std::ios::binary);file<<"P6\n320 240\n255\n";
|
||||||
|
for(auto pixel:image.pixels){const auto color=palette.argb[pixel];file.put(char(color>>16));file.put(char(color>>8));file.put(char(color));}
|
||||||
|
};
|
||||||
|
for(bool compact:{false,true})for(bool periphery:{false,true}) {
|
||||||
|
auto state=periphery?overview_state():detail_state(1,15333,1);
|
||||||
|
state.compact_dialog_frame=compact;
|
||||||
|
StadiumScreen screen(data,state);
|
||||||
|
if(periphery){screen.click(30,220);screen.click(160,220);}
|
||||||
|
const auto request=screen.click(periphery?266:50,periphery?125:140);
|
||||||
|
check(request.kind==(periphery?StadiumRequestKind::quote_periphery:StadiumRequestKind::expansion_confirm),"construction backdrop fixture did not enter its real request path");
|
||||||
|
const Image underlay=screen.render();
|
||||||
|
state=screen.state();next_identity(state);
|
||||||
|
auto question=question_for();question.compact_dialog_frame=compact;
|
||||||
|
if(periphery){state.quoted_object=request.object;state.quoted_price=1700000;question.source_flags=1;state.periphery_quote_dialog=question;}
|
||||||
|
else {state.block_expansion->offer=pending_offer(state.block_expansion->quote);state.construction_tip_dialog=question;}
|
||||||
|
screen.acknowledge(state);const auto actual=screen.render();
|
||||||
|
const auto check_outside=[&](const Image& image) {
|
||||||
|
for(int y=0;y<240;++y)if(y<80 || y>=190)for(int x=0;x<320;++x)
|
||||||
|
if(image.pixels[size_t(y*320+x)]!=underlay.pixels[size_t(y*320+x)])throw std::runtime_error(std::string(periphery?"periphery":"stands")+" compact="+std::to_string(compact)+" backdrop differs at "+std::to_string(x)+","+std::to_string(y));
|
||||||
|
};
|
||||||
|
check_outside(actual);
|
||||||
|
screen.pointer_down(100,171);check_outside(screen.render());
|
||||||
|
GameEndRenderOptions options{state.plain_background,state.gradient_text,true};
|
||||||
|
GameEndTaxDialog notice(data,question,options,screen.construction_notice_backdrop());
|
||||||
|
check(notice.backdrop().pixels==screen.construction_notice_backdrop().pixels,"construction notice completion restores a black frame");
|
||||||
|
check_outside(notice.render(GameEndTaxDialog::Button::yes));
|
||||||
|
if(compact) {
|
||||||
|
const auto name=periphery?"periphery":"stands";
|
||||||
|
GameEndTaxDialog previous(data,question,{state.plain_background,state.gradient_text},underlay);
|
||||||
|
check(previous.render().pixels[0]==0,"default compact dialog behavior changed outside construction menus");
|
||||||
|
save_image(previous.render(),std::string(name)+"-before");save_image(actual,std::string(name)+"-after");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) try {
|
int main(int argc, char** argv) try {
|
||||||
if (argc < 2 || !*argv[1]) throw std::runtime_error("expected Original BMH data directory");
|
if (argc < 2 || !*argv[1]) throw std::runtime_error("expected Original BMH data directory");
|
||||||
const std::filesystem::path data = argv[1];
|
const std::filesystem::path data = argv[1];
|
||||||
|
construction_backdrop_tests(data,argc>2?std::filesystem::path(argv[2]):std::filesystem::path{});
|
||||||
source_stadium_data_controls(data);
|
source_stadium_data_controls(data);
|
||||||
source_periphery_hit_tests(data);
|
source_periphery_hit_tests(data);
|
||||||
row_hit_tests(data);
|
row_hit_tests(data);
|
||||||
|
|||||||
Reference in new issue
Block a user