mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-01-13 14:27:08 +00:00
Compare commits
2 commits
acc365451c
...
bf8a80150d
Author | SHA1 | Date | |
---|---|---|---|
bf8a80150d | |||
f7e76e09a2 |
|
@ -4,6 +4,7 @@ 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;
|
||||
|
@ -78,10 +79,7 @@ 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 = {
|
||||
let base = if state.settings.original_textures { "ogph" } else { "plus" };
|
||||
format!("headband/{}/Casts", base)
|
||||
};
|
||||
let headband_spritesheet = NPC::get_headband_spritesheet(state, "Casts");
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
fn get_headband_spritesheet(&self, state: &SharedGameState, texture_name: &str) -> String {
|
||||
let base_dir = if state.settings.original_textures { "ogph" } else { "plus" };
|
||||
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" };
|
||||
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