Repack over-tall emote sheets into a 2-column grid
The client caps a texture at 1024px in either dimension - nothing in its own art exceeds it - and squeezes anything larger on load, so every 32px crop of a 32x2048 sheet landed between frames and the emote rendered as a stretched smear scrolling vertically. catJAM, pedro, goinginsane, HUHH, Kiss and Awoken are now 64x1024, the same frames laid out row-major across two columns. The animator derives the column count from imageWidth / frameWidth, so single-column sheets produce the same crop they did before. Fixed the frame-0 crops in the autocomplete popup and the stats screen, which hardcoded the full texture width. Also: HACKERMANS is a single 32x32 frame on disk but was declared as 11 frames of 32x512, which rendered it as the same kind of sliver; it is now a static icon. Dropped the shadowed duplicate RIPBOZO metadata entry.
@@ -3629,7 +3629,7 @@ defaultpack={
|
||||
["LockStone"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\LockStone.tga:28:28",
|
||||
["KomodoHype"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\KomodoHype.tga:28:28",
|
||||
["HiveDiver"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\HiveDiver.tga:28:28",
|
||||
["catJAM"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\catJAM.tga:28:28:0:0:32:2048:0:32:0:32",
|
||||
["catJAM"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\catJAM.tga:28:28:0:0:64:1024:0:32:0:32",
|
||||
["ratJAM"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\ratJAM.tga:28:28:0:0:32:512:0:32:0:32",
|
||||
["modCheck"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\modCheck.tga:28:28:0:0:32:1024:0:32:0:32",
|
||||
["CatMad"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\CatMad.tga:28:28",
|
||||
@@ -3704,9 +3704,9 @@ defaultpack={
|
||||
["OMEGAKEKMAN"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\OMEGAKEKMAN.tga:28:28",
|
||||
["ThumbsUp"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\ThumbsUp.tga:28:28",
|
||||
[":Clueless:"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\clueless.tga:28:28",
|
||||
[":Awoken:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Awoken.tga:28:28:0:0:32:2048:0:32:0:32",
|
||||
[":Awoken:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Awoken.tga:28:28:0:0:64:1024:0:32:0:32",
|
||||
["yeshoney"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\yeshoney.tga:28:28",
|
||||
["goinginsane"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\goinginsane.tga:28:28:0:0:32:2048:0:32:0:32",
|
||||
["goinginsane"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\goinginsane.tga:28:28:0:0:64:1024:0:32:0:32",
|
||||
["AbdulPls"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\AbdulPls.tga:28:28:0:0:32:512:0:32:0:32",
|
||||
["PunkChamp"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\PunkChamp.tga:28:28",
|
||||
["batBrah"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\batBrah.tga:28:28",
|
||||
@@ -3745,7 +3745,7 @@ defaultpack={
|
||||
["HYPERYOGGERS"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\HYPERYOGGERS.tga:28:28:0:0:32:64:0:32:0:32",
|
||||
[":xdd:"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\xdd.tga:28:28",
|
||||
[":meow:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\meow.tga:28:28:0:0:32:1024:0:32:0:32",
|
||||
["HUHH"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\HUHH.tga:28:28:0:0:32:2048:0:32:0:32",
|
||||
["HUHH"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\HUHH.tga:28:28:0:0:64:1024:0:32:0:32",
|
||||
["RIPBOZO"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\RIPBOZO.tga:28:28:0:0:32:1024:0:32:0:32",
|
||||
["evilcat"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\evilcat.tga:28:28",
|
||||
["bufeY"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\bufeY.tga:28:28",
|
||||
@@ -3757,7 +3757,7 @@ defaultpack={
|
||||
["docmeat"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\docmeat.tga:28:28:0:0:32:512:0:32:0:32",
|
||||
["politeCatWTF"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\politeCatWTF.tga:28:28",
|
||||
["SNIFFA"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\SNIFFA.tga:28:28:0:0:32:1024:0:32:0:32",
|
||||
[":kissing:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Kiss.tga:28:28:0:0:32:2048:0:32:0:32",
|
||||
[":kissing:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Kiss.tga:28:28:0:0:64:1024:0:32:0:32",
|
||||
["bidenBlast"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\bidenBlast.tga:28:28",
|
||||
[":om:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\om.tga:28:28:0:0:32:128:0:32:0:32",
|
||||
[":Classic:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Classic.tga:28:28:0:0:32:1024:0:32:0:32",
|
||||
@@ -3781,7 +3781,7 @@ defaultpack={
|
||||
[":alert:"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\alert.tga:28:28:0:0:32:1024:0:32:0:32",
|
||||
[":groove:"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\groove.tga:28:28",
|
||||
["LETSGOOO"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\LETSGOOO.tga:28:28:0:0:32:512:0:32:0:32",
|
||||
["pedro"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\pedro.tga:28:28:0:0:32:2048:0:32:0:32",
|
||||
["pedro"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\pedro.tga:28:28:0:0:64:1024:0:32:0:32",
|
||||
[":pls:"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\pls.tga:28:28",
|
||||
["Cluegi"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Cluegi.tga:28:28",
|
||||
["intjCaught"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\intjCaught.tga:28:56",
|
||||
@@ -3903,7 +3903,7 @@ defaultpack={
|
||||
["monakW"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\monakW.tga:LARGE",
|
||||
["monakGun"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\monakGun.tga:28:28",
|
||||
["monakMultiple"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\Monaks1.tga:28:28",
|
||||
["HACKERMANS"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\HACKERMANS.tga:28:28:0:0:32:512:0:32:0:32",
|
||||
["HACKERMANS"]="Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\HACKERMANS.tga:28:28",
|
||||
["peepoFR1"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepoFR1.tga:28:28",
|
||||
["peepoFR2"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepoFR2.tga:28:28",
|
||||
["PepeSmug"] = "Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\PepeSmug.tga:28:28",
|
||||
@@ -8926,8 +8926,8 @@ defaultpack={
|
||||
TwitchEmotes_animation_metadata = {
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Clap.tga"] = {["nFrames"] = 2, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=64, ["framerate"] = 6},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\modCheck.tga"] = {["nFrames"] = 28, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 9},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\goinginsane.tga"] = {["nFrames"] = 47, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=2048, ["framerate"] = 25},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\catJAM.tga"] = {["nFrames"] = 60, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=2048, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\goinginsane.tga"] = {["nFrames"] = 47, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=64, ["imageHeight"]=1024, ["framerate"] = 25},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\catJAM.tga"] = {["nFrames"] = 60, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=64, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\ratJAM.tga"] = {["nFrames"] = 16, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\BTTV+FFZ\\haHAA.tga"] = {["nFrames"] = 14, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 34},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\PepeMeltdown.tga"] = {["nFrames"] = 10, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 34},
|
||||
@@ -8996,8 +8996,7 @@ TwitchEmotes_animation_metadata = {
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\noted.tga"] = {["nFrames"] = 30, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\HYPEROMEGAPOGGERSCRAZY.tga"] = {["nFrames"] = 2, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=64, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\meow.tga"] = {["nFrames"] = 24, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 11},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\HUHH.tga"] = {["nFrames"] = 47, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=2048, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\RIPBOZO.tga"] = {["nFrames"] = 28, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\HUHH.tga"] = {["nFrames"] = 47, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=64, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\RIPBOZO.tga"] = {["nFrames"] = 28, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 13},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepoStrong.tga"] = {["nFrames"] = 4, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=128, ["framerate"] = 14},["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepoHorse.tga"] = {["nFrames"] = 13, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 40},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepoPolice.tga"] = {["nFrames"] = 4, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=128, ["framerate"] = 14},
|
||||
@@ -9011,7 +9010,7 @@ TwitchEmotes_animation_metadata = {
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\docmeat.tga"] = {["nFrames"] = 16, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\YEPPERS.tga"] = {["nFrames"] = 12, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 20},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\SNIFFA.tga"] = {["nFrames"] = 20, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Kiss.tga"] = {["nFrames"] = 38, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=2048, ["framerate"] = 20},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Kiss.tga"] = {["nFrames"] = 38, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=64, ["imageHeight"]=1024, ["framerate"] = 20},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\om.tga"] = {["nFrames"] = 4, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=128, ["framerate"] = 14},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Classic.tga"] = {["nFrames"] = 26, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\binocsSpin.tga"] = {["nFrames"] = 5, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=256, ["framerate"] = 15},
|
||||
@@ -9022,15 +9021,14 @@ TwitchEmotes_animation_metadata = {
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\Plotge.tga"] = {["nFrames"] = 10, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 18},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\shadowChatting.tga"] = {["nFrames"] = 8, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=256, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\Jammies.tga"] = {["nFrames"] = 7, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=256, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\HACKERMANS.tga"] = {["nFrames"] = 11, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepoComfy.tga"] = {["nFrames"] = 6, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=256, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\SALAMI.tga"] = {["nFrames"] = 10, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\typeg\\typegLoad.tga"] = {["nFrames"] = 8, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=256, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\typeg\\typegPaul.tga"] = {["nFrames"] = 10, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 15},["Interface\\AddOns\\TwitchEmotes\\Emotes\\typeg\\hyperjoy.tga"] = {["nFrames"] = 9, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Kekflap.tga"] = {["nFrames"] = 2, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=64, ["framerate"] = 15},["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Awoken.tga"] = {["nFrames"] = 38, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=2048, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Kekflap.tga"] = {["nFrames"] = 2, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=64, ["framerate"] = 15},["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\Awoken.tga"] = {["nFrames"] = 38, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=64, ["imageHeight"]=1024, ["framerate"] = 15},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\ChipiChipi.tga"] = {["nFrames"] = 24, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 25},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\alert.tga"] = {["nFrames"] = 17, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=1024, ["framerate"] = 40},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\LETSGOOO.tga"] = {["nFrames"] = 11, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=512, ["framerate"] = 20},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\pedro.tga"] = {["nFrames"] = 48, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=2048, ["framerate"] = 10},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Custom\\pedro.tga"] = {["nFrames"] = 48, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=64, ["imageHeight"]=1024, ["framerate"] = 10},
|
||||
["Interface\\AddOns\\TwitchEmotes\\Emotes\\Pepes\\peepofeet.tga"] = {["nFrames"] = 3, ["frameWidth"] = 32, ["frameHeight"] = 32, ["imageWidth"]=32, ["imageHeight"]=128, ["framerate"] = 15},
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
@@ -1,4 +1,4 @@
|
||||
-- Animated emotes are vertical sprite sheets; TwitchEmotes_animation_metadata
|
||||
-- Animated emotes are sprite sheets; TwitchEmotes_animation_metadata
|
||||
-- (Emotes.lua) maps each sheet's texture path to its frame layout. ClassicAPI's
|
||||
-- inline-texture renderer supports the extended
|
||||
-- |Tpath:w:h:0:0:imgW:imgH:0:frameW:top:bottom|t form (sprite-sheet crop), so we
|
||||
@@ -21,18 +21,30 @@ local function GetCurrentFrameNum(animdata)
|
||||
return math.floor((TWITCHEMOTES_T * animdata.framerate) % animdata.nFrames)
|
||||
end
|
||||
|
||||
-- Frames run row-major across however many columns the sheet is wide. The
|
||||
-- client caps a texture at 1024px in either dimension (nothing in its own art
|
||||
-- exceeds it) and squeezes anything larger on load, so the longest animations
|
||||
-- are packed as two 32px columns rather than one over-tall strip.
|
||||
local function GetFrameRect(animdata, framenum)
|
||||
local cols = math.floor(animdata.imageWidth / animdata.frameWidth)
|
||||
if cols < 1 then cols = 1 end
|
||||
local left = (framenum % cols) * animdata.frameWidth
|
||||
local top = math.floor(framenum / cols) * animdata.frameHeight
|
||||
return left, left + animdata.frameWidth, top, top + animdata.frameHeight
|
||||
end
|
||||
|
||||
-- Crop a Texture (not inline text) to its animdata's current frame.
|
||||
local function CropToCurrentFrame(tex, animdata)
|
||||
local top = GetCurrentFrameNum(animdata) * animdata.frameHeight / animdata.imageHeight
|
||||
tex:SetTexCoord(0, 1, top, top + animdata.frameHeight / animdata.imageHeight)
|
||||
local left, right, top, bottom = GetFrameRect(animdata, GetCurrentFrameNum(animdata))
|
||||
tex:SetTexCoord(left / animdata.imageWidth, right / animdata.imageWidth,
|
||||
top / animdata.imageHeight, bottom / animdata.imageHeight)
|
||||
end
|
||||
|
||||
local function BuildFrameString(imagepath, animdata, framenum, w, h)
|
||||
local top = framenum * animdata.frameHeight
|
||||
local bottom = top + animdata.frameHeight
|
||||
local left, right, top, bottom = GetFrameRect(animdata, framenum)
|
||||
return "|T" .. imagepath .. ":" .. w .. ":" .. h .. ":0:0:" ..
|
||||
animdata.imageWidth .. ":" .. animdata.imageHeight .. ":0:" ..
|
||||
animdata.frameWidth .. ":" .. top .. ":" .. bottom .. "|t"
|
||||
animdata.imageWidth .. ":" .. animdata.imageHeight .. ":" ..
|
||||
left .. ":" .. right .. ":" .. top .. ":" .. bottom .. "|t"
|
||||
end
|
||||
|
||||
-- escape the pattern-magic chars that can appear in an emote escape (paths use
|
||||
|
||||
@@ -158,7 +158,8 @@ local function showPopup(eb, results)
|
||||
-- animated emote sheets crop to a frame; the animator advances it
|
||||
b.animdata = TwitchEmotes_animation_metadata and TwitchEmotes_animation_metadata[tex]
|
||||
if b.animdata then
|
||||
b.ico:SetTexCoord(0, 1, 0, b.animdata.frameHeight / b.animdata.imageHeight)
|
||||
b.ico:SetTexCoord(0, b.animdata.frameWidth / b.animdata.imageWidth,
|
||||
0, b.animdata.frameHeight / b.animdata.imageHeight)
|
||||
else
|
||||
b.ico:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
|
||||
@@ -84,7 +84,8 @@ local function setTopEmote(tex, emote)
|
||||
-- store animdata so the animator can crop frames; frame 0 as the base
|
||||
tex.animdata = tga and TwitchEmotes_animation_metadata and TwitchEmotes_animation_metadata[tga]
|
||||
if tex.animdata then
|
||||
tex:SetTexCoord(0, 1, 0, tex.animdata.frameHeight / tex.animdata.imageHeight)
|
||||
tex:SetTexCoord(0, tex.animdata.frameWidth / tex.animdata.imageWidth,
|
||||
0, tex.animdata.frameHeight / tex.animdata.imageHeight)
|
||||
else
|
||||
tex:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
|
||||