-
Notifications
You must be signed in to change notification settings - Fork 197
CogDis: Battle background not shown in web player #2893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
Not tested yet but the fix should be simply using two diff --git a/src/background.cpp b/src/background.cpp
index d18bbfdc..30282818 100644
--- a/src/background.cpp
+++ b/src/background.cpp
@@ -35,7 +35,7 @@ Background::Background(const std::string& name) : Drawable(Priority_Background)
if (!name.empty()) {
FileRequestAsync* request = AsyncHandler::RequestFile("Backdrop", name);
request->SetGraphicFile(true);
- request_id = request->Bind(&Background::OnBackgroundGraphicReady, this);
+ bg_request_id = request->Bind(&Background::OnBackgroundGraphicReady, this);
request->Start();
}
}
@@ -55,7 +55,7 @@ Background::Background(int terrain_id) : Drawable(Priority_Background)
if (terrain->background_type == lcf::rpg::Terrain::BGAssociation_background && !terrain->background_name.empty()) {
FileRequestAsync* request = AsyncHandler::RequestFile("Backdrop", terrain->background_name);
request->SetGraphicFile(true);
- request_id = request->Bind(&Background::OnBackgroundGraphicReady, this);
+ bg_request_id = request->Bind(&Background::OnBackgroundGraphicReady, this);
request->Start();
return;
}
@@ -64,7 +64,7 @@ Background::Background(int terrain_id) : Drawable(Priority_Background)
if (!terrain->background_a_name.empty()) {
FileRequestAsync* request = AsyncHandler::RequestFile("Frame", terrain->background_a_name);
request->SetGraphicFile(true);
- request_id = request->Bind(&Background::OnBackgroundGraphicReady, this);
+ bg_request_id = request->Bind(&Background::OnBackgroundGraphicReady, this);
request->Start();
bg_hscroll = terrain->background_a_scrollh ? terrain->background_a_scrollh_speed : 0;
@@ -74,7 +74,7 @@ Background::Background(int terrain_id) : Drawable(Priority_Background)
if (terrain->background_b && !terrain->background_b_name.empty()) {
FileRequestAsync* request = AsyncHandler::RequestFile("Frame", terrain->background_b_name);
request->SetGraphicFile(true);
- request_id = request->Bind(&Background::OnForegroundFrameGraphicReady, this);
+ fg_request_id = request->Bind(&Background::OnForegroundFrameGraphicReady, this);
request->Start();
fg_hscroll = terrain->background_b_scrollh ? terrain->background_b_scrollh_speed : 0;
diff --git a/src/background.h b/src/background.h
index f8814871..1885d532 100644
--- a/src/background.h
+++ b/src/background.h
@@ -55,7 +55,8 @@ private:
int fg_x = 0;
int fg_y = 0;
- FileRequestBinding request_id;
+ FileRequestBinding fg_request_id;
+ FileRequestBinding bg_request_id;
};
inline Tone Background::GetTone() const { |
Ghabry
added a commit
to Ghabry/easyrpg-player
that referenced
this issue
Mar 8, 2023
…e used Fixes the battles in Mother: Cognitive Dissonance which uses fancy background effects Fix EasyRPG#2893
Ghabry
added a commit
to Ghabry/easyrpg-player
that referenced
this issue
Mar 8, 2023
…e used Fixes the battles in Mother: Cognitive Dissonance which uses fancy background effects Fix EasyRPG#2893
Ghabry
added a commit
to Ghabry/easyrpg-player
that referenced
this issue
Mar 12, 2023
…e used Fixes the battles in Mother: Cognitive Dissonance which uses fancy background effects Fix EasyRPG#2893
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Name of the game: Mother Cognitive Dissonance
Player platform: Web
Describe the issue in detail and how to reproduce it:
Start a battle. The background is missing due to async error.
The text was updated successfully, but these errors were encountered: