Joined manager sees his next opponent; club detail error names the access
- 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>
This commit is contained in:
1 parent
b8a37353cc
commit
16ae7df7f8
2 files changed
+6
-1
No files matched your search
@@ -768,6 +768,9 @@ bool CareerSession::commit_manager_join(ui::CareerInitializationResult& result,
|
||||
// ConfirmManager retains the current desk/cursor. Weiter performs the later handoff.
|
||||
const auto next_revision = revision + 1;
|
||||
turn_driver_.revision = next_revision;
|
||||
// The next opponent of every manager is captured per day for the manager count of that day;
|
||||
// the joined manager has only the default ("no game") until it is captured again.
|
||||
capture_source_desk_callargs();
|
||||
ui::CareerInitializationResult next;
|
||||
next.desktop = desktop_projection(next_revision); next.managers = managers_;
|
||||
next.preparation = preparation_projection(next_revision);
|
||||
|
||||
@@ -15,7 +15,9 @@ void rect(Image& out,int x,int y,int w,int h,uint8_t c) {
|
||||
for(int xx=std::max(0,x);xx<std::min(out.width,x+w);++xx)out.at(xx,yy)=c;
|
||||
}
|
||||
void copy(Image& out,const Image& src,int sx,int sy,int x,int y,int w,int h,int transparent=-1) {
|
||||
if(sx<0||sy<0||sx+w>src.width||sy+h>src.height)throw FormatError("player card: original atlas bounds");
|
||||
if(sx<0||sy<0||sx+w>src.width||sy+h>src.height)
|
||||
throw FormatError("club player detail: original atlas bounds "+std::to_string(sx)+","+std::to_string(sy)+
|
||||
":"+std::to_string(w)+"x"+std::to_string(h)+" in "+std::to_string(src.width)+"x"+std::to_string(src.height));
|
||||
for(int yy=0;yy<h;++yy)for(int xx=0;xx<w;++xx){
|
||||
const auto c=src.pixels.at(size_t(sy+yy)*src.width+sx+xx);
|
||||
if(c!=transparent&&x+xx>=0&&x+xx<out.width&&y+yy>=0&&y+yy<out.height)out.at(x+xx,y+yy)=c;
|
||||
|
||||
Reference in new issue
Block a user