mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-01 19:28:02 +03:00
This wasn't a thing yet?
This commit is contained in:
@@ -482,6 +482,10 @@ const spr_db_spr* sprite_database::get_tex_by_set_id_index(uint32_t set_id, uint
|
||||
return &spr_db_spr_null;
|
||||
}
|
||||
|
||||
uint32_t sprite_database::get_spr_id_by_name(const char* name) const {
|
||||
return get_spr_by_name(name)->id;
|
||||
}
|
||||
|
||||
const char* sprite_database::get_spr_set_file_name(uint32_t set_id) const {
|
||||
return get_spr_set_by_id(set_id)->file_name.c_str();
|
||||
}
|
||||
|
||||
@@ -152,6 +152,7 @@ struct sprite_database {
|
||||
const spr_db_spr* get_spr_by_id(uint32_t id) const;
|
||||
const spr_db_spr* get_spr_by_set_id_index(uint32_t set_id, uint32_t index) const;
|
||||
const spr_db_spr* get_tex_by_set_id_index(uint32_t set_id, uint32_t index) const;
|
||||
uint32_t get_spr_id_by_name(const char* name) const;
|
||||
const char* get_spr_set_file_name(uint32_t set_id) const;
|
||||
uint32_t get_spr_set_id_by_name(const char* name) const;
|
||||
uint32_t get_spr_set_id_by_name_index(uint32_t index) const;
|
||||
|
||||
@@ -2986,7 +2986,7 @@ bool pv_game::load() {
|
||||
std::string spr_set_back_image(i.spr_set_back);
|
||||
spr_set_back_image.append("_IMAGE");
|
||||
|
||||
uint32_t spr_id = aft_spr_db->get_spr_set_id_by_name(spr_set_back_image.c_str());
|
||||
uint32_t spr_id = aft_spr_db->get_spr_id_by_name(spr_set_back_image.c_str());
|
||||
if (spr_id != -1) {
|
||||
data.spr_set_back_ids.push_back(spr_set_id);
|
||||
field.spr_set_back_id = spr_id;
|
||||
|
||||
Reference in New Issue
Block a user