mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-01-14 23:06:40 +00:00
Compare commits
No commits in common. "bf8a80150d59ffccc5fc1045f409dfd55a4d41fe" and "acc365451c6e82ec64a5fa29850d8176a9bf7532" have entirely different histories.
bf8a80150d
...
acc365451c
|
@ -4,7 +4,6 @@ use crate::framework::context::Context;
|
|||
use crate::framework::error::GameResult;
|
||||
use crate::framework::graphics;
|
||||
use crate::game::frame::Frame;
|
||||
use crate::game::npc::NPC;
|
||||
use crate::game::scripting::tsc::text_script::IllustrationState;
|
||||
use crate::game::shared_game_state::SharedGameState;
|
||||
use crate::graphics::font::Font;
|
||||
|
@ -79,7 +78,10 @@ impl GameEntity<()> for Credits {
|
|||
if state.more_rust {
|
||||
// draw sue's headband separately because rust doesn't let me mutate the texture set multiple times at once
|
||||
|
||||
let headband_spritesheet = NPC::get_headband_spritesheet(state, "Casts");
|
||||
let headband_spritesheet = {
|
||||
let base = if state.settings.original_textures { "ogph" } else { "plus" };
|
||||
format!("headband/{}/Casts", base)
|
||||
};
|
||||
|
||||
let batch = state.texture_set.get_or_load_batch(ctx, &state.constants, headband_spritesheet.as_str())?;
|
||||
|
||||
|
|
|
@ -223,8 +223,8 @@ impl NPC {
|
|||
[42, 92, 280, 284].contains(&self.npc_type)
|
||||
}
|
||||
|
||||
pub fn get_headband_spritesheet(state: &SharedGameState, texture_name: &str) -> String {
|
||||
let base_dir = if state.settings.original_textures || state.constants.is_base() { "ogph" } else { "plus" };
|
||||
fn get_headband_spritesheet(&self, state: &SharedGameState, texture_name: &str) -> String {
|
||||
let base_dir = if state.settings.original_textures { "ogph" } else { "plus" };
|
||||
format!("headband/{}/{}", base_dir, texture_name)
|
||||
}
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ impl GameEntity<([&mut Player; 2], &NPCList, &mut Stage, &mut BulletManager, &mu
|
|||
|
||||
if self.is_sue() && state.more_rust {
|
||||
// draw crab headband
|
||||
let headband_spritesheet = Self::get_headband_spritesheet(state, &*texture_ref);
|
||||
let headband_spritesheet = self.get_headband_spritesheet(state, &*texture_ref);
|
||||
let batch = state.texture_set.get_or_load_batch(ctx, &state.constants, headband_spritesheet.as_str())?;
|
||||
batch.add_rect(final_x, final_y, &self.anim_rect);
|
||||
batch.draw(ctx)?;
|
||||
|
|
Loading…
Reference in a new issue