Skip to content

Commit c2f4d5f

Browse files
committed
Use correct generic anim function to get hi-res support
1 parent 4af292a commit c2f4d5f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

code/scpui/RocketRenderingInterface.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,11 @@ bool RocketRenderingInterface::LoadTexture(TextureHandle& texture_handle, Vector
143143

144144
std::unique_ptr<Texture> tex(new Texture());
145145
// If there is a file that ends with an animation extension, try to load that
146-
if (generic_anim_exists(filename.c_str())) {
147-
// Load as animation
148-
generic_anim_init(&tex->animation, filename);
149-
if (generic_anim_stream(&tex->animation) == 0) {
150-
tex->is_animation = true;
151-
152-
texture_dimensions.x = tex->animation.width;
153-
texture_dimensions.y = tex->animation.height;
154-
}
146+
if (generic_anim_init_and_stream(&tex->animation, filename.c_str(), BM_TYPE_NONE, true) == 0) {
147+
tex->is_animation = true;
148+
149+
texture_dimensions.x = tex->animation.width;
150+
texture_dimensions.y = tex->animation.height;
155151
}
156152

157153
if (!tex->is_animation) {

code/scripting/api/libs/ui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ ADE_VIRTVAR(ColorTags,
395395
nullptr,
396396
"The available tagged colors",
397397
ade_type_map("string", "color"),
398-
"A apping from tag string to color value")
398+
"A mapping from tag string to color value")
399399
{
400400
using namespace luacpp;
401401

0 commit comments

Comments
 (0)