mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-14 17:33:25 +00:00
Clarify animated textures.
This commit is contained in:
parent
2ce251997d
commit
d6e290855c
2 changed files with 25 additions and 8 deletions
|
|
@ -535,11 +535,7 @@ void block::loadPayload(const buffer &data)
|
|||
break;
|
||||
}
|
||||
|
||||
// unk
|
||||
// seen: 0,2,3,4,8,9,516
|
||||
READ(data, unk7);
|
||||
// seen: 0.0, 0.0222222, 0.0444444, 0.0555556, 0.03125, 0.0375, 0.0625, 0.1, 0.125, 100, inf
|
||||
READ(data, unk9); // scale? probably no
|
||||
READ(data, atex);
|
||||
READ(data, unk10);
|
||||
READ(data, auto_animation);
|
||||
READ(data, animation_cycle);
|
||||
|
|
@ -594,7 +590,7 @@ void block::loadPayload(const buffer &data)
|
|||
read_more_faces();
|
||||
}
|
||||
|
||||
if (unk7 != 0)
|
||||
if (atex.is_present())
|
||||
return;
|
||||
|
||||
std::string s = "extraction error: block: " + std::string(h.name);
|
||||
|
|
|
|||
|
|
@ -329,6 +329,28 @@ struct block
|
|||
aim_vector4 max;
|
||||
};
|
||||
|
||||
struct animated_texture
|
||||
{
|
||||
uint16_t zeros0;
|
||||
uint8_t multiplier_of_number_of_gradations;
|
||||
uint8_t number_of_gradations;
|
||||
float time_of_full_cycle;
|
||||
|
||||
float get_actual_number_of_gradations() const
|
||||
{
|
||||
if (!multiplier_of_number_of_gradations)
|
||||
return multiplier_of_number_of_gradations * number_of_gradations;
|
||||
return number_of_gradations * number_of_gradations;
|
||||
}
|
||||
|
||||
float get_actual_time_of_full_cycle() const
|
||||
{
|
||||
return get_actual_number_of_gradations() * time_of_full_cycle;
|
||||
}
|
||||
|
||||
bool is_present() const { return number_of_gradations; }
|
||||
};
|
||||
|
||||
header h;
|
||||
|
||||
// data
|
||||
|
|
@ -349,10 +371,9 @@ struct block
|
|||
// animations
|
||||
std::vector<animation> animations;
|
||||
std::vector<damage_model> damage_models;
|
||||
animated_texture atex;
|
||||
|
||||
// unk
|
||||
uint32_t unk7;
|
||||
float unk9;
|
||||
uint32_t unk10;
|
||||
float unk8;
|
||||
uint32_t unk11;
|
||||
|
|
|
|||
Loading…
Reference in a new issue