Documentation
¶
Overview ¶
Package sprites handles loading and rendering sprites.
Index ¶
- Variables
- func Button(btn arcade.Button) string
- func DrawText(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextCentered(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextCenteredFunc(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextCenteredFuncEx(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextFunc(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextFuncEx(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextShadow(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func DrawTextShadowFunc(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, ...)
- func TextAdvance(font FontID, letter rune, scaleX float32) float32
- func TextHitTest(cam *gfx.Camera, font FontID, text string, ...) bool
- type Batch
- type FontID
- type RenderFlag
- type Sprite
- type TextBatch
Constants ¶
This section is empty.
Variables ¶
var ( WhiteBar = gui.sprite(1, 975, 438.9732, 48, 0.5000305, 0.5) HP = gui.sprite(1493, 26, 125, 132, 0.5082959, 0.5366576) ATK = gui.sprite(1636.027, 17, 140.9733, 144, 0.4999052, 0.5) DEF = gui.sprite(1638, 179, 124, 132, 0.5, 0.5) TP = gui.sprite(783, 96, 82, 81, 0.5, 0.5) CardNum = [10]*Sprite{ gui.sprite(10, 480, 32, 58, 0.5, 0.5), gui.sprite(43, 479, 23, 59, 0.5, 0.5), gui.sprite(69, 480, 33, 58, 0.5, 0.5), gui.sprite(103, 479, 32, 59, 0.5, 0.5), gui.sprite(136, 480, 34, 58, 0.5, 0.5), gui.sprite(171, 478, 34, 60, 0.5, 0.5), gui.sprite(206, 479, 34, 62, 0.5, 0.5), gui.sprite(241, 480, 32, 59.97325, 0.5, 0.5085601), gui.sprite(275, 479, 34, 59, 0.5, 0.5), gui.sprite(311, 477, 34, 62, 0.5, 0.5), } BackEnemy = gui.sprite(2, 1225, 175, 237, 0.5, 0.5) CardFront = gui.sprite(540, 1225, 174, 237, 0.5, 0.5) BackMiniBoss = gui.sprite(181, 1225, 175, 237, 0.5, 0.5) BackBoss = gui.sprite(360, 1225, 175, 237, 0.5, 0.5) Pointer = gui.sprite(1920.027, 1350, 124.9733, 78, 1, 0.5) Capsule = gui.sprite(1657, 1839, 389, 206, 0.5, 0.5) CircleArrow = gui.sprite(0, 919, 52, 52, 0.5, 0.5) WideArrow = gui.sprite(104, 949, 315, 21, 0.5, 0.5) Tab = gui.sprite(3, 550, 429, 134, 0.5, 0.5) Portraits = func() (p [235]*Sprite) { for i := range p { p[i] = portraits.sprite(float32(i%16)*128, 2048-float32(i/16+1)*128, 128, 128, 0.5, 0.5) } return }() CardFrontWindow = customCard.sprite(1, 274, 174, 237, 0.5, 0.5) TPInf = customCard.sprite(427, 428, 84, 84, 0.5, 0.5) TribeBubble = customCard.sprite(175, 459, 123, 26, 0.5, 0.5) TribeBubbleWide = customCard.sprite(175, 487, 253, 25, 0.5, 0.5) Description = customCard.sprite(177, 329, 202, 130, 0.5, 0.5) BackToken = customCard.sprite(0, 35, 177, 239, 0.5, 0.5) )
GUI sprites for Spy Cards.
var ( Red = color.RGBA{255, 0, 0, 255} Yellow = color.RGBA{255, 235, 4, 255} Green = color.RGBA{0, 255, 0, 255} Gray = color.RGBA{127, 127, 127, 255} White = color.RGBA{255, 255, 255, 255} Black = color.RGBA{0, 0, 0, 255} Rainbow = color.RGBA{1, 1, 1, 0} )
Colors for sprites.
var ( Amber1 = characters1.sprite(3, 1765, 239, 279, 0.5, 0.0) Amber2 = characters1.sprite(249, 1765, 239, 278, 0.5, 0.0) Ambera = characters1.sprite(493, 1766, 240, 277, 0.5, 0.0) Aria1 = characters1.sprite(738, 1771, 151, 272, 0.5, 0.0) Aria2 = characters1.sprite(893, 1771, 156, 271, 0.5, 0.0) Ariaa = characters1.sprite(1057, 1752, 142, 291, 0.5, 0.0) Arie1 = characters1.sprite(1206, 1800, 187, 243, 0.5, 0.0) Arie2 = characters1.sprite(1399, 1801, 188, 241, 0.5, 0.0) Ariea = characters1.sprite(1593, 1799, 160, 243, 0.5, 0.0) Astotheles1 = characters1.sprite(1761, 1700, 113, 342, 0.5, 0.0) Astotheles2 = characters1.sprite(1881, 1703, 111, 340, 0.5, 0.0) Astothelesa = characters1.sprite(1890, 1377, 140, 320, 0.5, 0.0) Bomby1 = characters1.sprite(4, 1572, 106, 188, 0.5, 0.0) Bomby2 = characters1.sprite(116, 1574, 109, 186, 0.5, 0.0) Bombya = characters1.sprite(234, 1606, 103, 153, 0.5, 0.0) BuGi1 = characters1.sprite(343, 1364, 240, 395, 0.5, 0.0) BuGi2 = characters1.sprite(591, 1366, 240, 393, 0.5, 0.0) BuGia = characters1.sprite(837, 1387, 135, 373, 0.5, 0.0) Carmina1 = characters1.sprite(976, 1477, 118, 283, 0.5, 0.0) Carmina2 = characters1.sprite(1096, 1466, 117, 283, 0.5, 0.0) Carminaa = characters1.sprite(1218, 1547, 129, 247, 0.5, 0.0) Celia1 = characters1.sprite(1351, 1558, 113, 236, 0.5, 0.0) Celia2 = characters1.sprite(1470, 1559, 113, 234, 0.5, 0.0) Celiaa = characters1.sprite(1588, 1567, 112, 220, 0.5, 0.0) Cenn1 = characters1.sprite(1729, 1422, 154, 272, 0.5, 0.0) Cenn2 = characters1.sprite(1730, 1143, 153, 271, 0.5, 0.0) Cenna = characters1.sprite(1888, 1098, 153, 274, 0.5, 0.0) Cerise1 = characters1.sprite(4, 1407, 133, 162, 0.5, 0.0) Cerise2 = characters1.sprite(140, 1409, 136, 160, 0.5, 0.0) Cerisea = characters1.sprite(5, 1243, 138, 161, 0.5, 0.0) Chompy1 = characters1.sprite(146, 1249, 94, 157, 0.5, 0.0) Chompy2 = characters1.sprite(244, 1253, 96, 154, 0.5, 0.0) Chompya = characters1.sprite(7, 1179, 189, 60, 0.5, 0.0) Chubee1 = characters1.sprite(5, 883, 185, 285, 0.5, 0.0) Chubee2 = characters1.sprite(204, 948, 183, 283, 0.5, 0.0) Chubeea = characters1.sprite(394, 1062, 189, 288, 0.5, 0.0) Chuck1 = characters1.sprite(588, 1167, 190, 191, 0.5, 0.0) Chuck2 = characters1.sprite(783, 1168, 191, 190, 0.5, 0.0) Chucka = characters1.sprite(987, 1268, 250, 196, 0.5, 0.0) Crisbee1 = characters1.sprite(1252, 1249, 223, 289, 0.5, 0.0) Crisbee2 = characters1.sprite(1481, 1256, 221, 288, 0.5, 0.0) Crisbeea = characters1.sprite(1257, 948, 223, 288, 0.5, 0.0) Crow1 = characters1.sprite(1496, 1035, 95, 207, 0.5, 0.0) Crow2 = characters1.sprite(1611, 1034, 97, 205, 0.5, 0.0) Crowa = characters1.sprite(1714, 924, 110, 209, 0.5, 0.0) Diana1 = characters1.sprite(9, 569, 233, 300, 0.5, 0.0) Diana2 = characters1.sprite(248, 635, 232, 301, 0.5, 0.0) Dianaa = characters1.sprite(483, 730, 238, 324, 0.5, 0.0) Eremi1 = characters1.sprite(722, 910, 131, 251, 0.5, 0.0) Eremi2 = characters1.sprite(856, 913, 134, 249, 0.5, 0.0) Eremia = characters1.sprite(993, 908, 121, 255, 0.5, 0.0) Futes1 = characters1.sprite(1120, 923, 133, 315, 0.5, 0.0) Futes2 = characters1.sprite(1124, 607, 133, 314, 0.5, 0.0) Futesa = characters1.sprite(1261, 625, 133, 319, 0.5, 0.0) Genow1 = characters1.sprite(1398, 723, 159, 222, 0.5, 0.0) Genow2 = characters1.sprite(1560, 726, 160, 218, 0.5, 0.0) Genowa = characters1.sprite(1723, 704, 158, 218, 0.5, 0.0) Honeycomb1 = characters1.sprite(748, 721, 171, 175, 0.5, 0.0) Honeycomb2 = characters1.sprite(925, 725, 173, 173, 0.5, 0.0) Honeycomba = characters1.sprite(922, 542, 170, 176, 0.5, 0.0) Janet1 = characters1.sprite(491, 465, 110, 250, 0.3622384, 0.0) Janet2 = characters1.sprite(605, 466, 110, 250, 0.3599749, 0.0) Janeta = characters1.sprite(717, 466, 110, 250, 0.3664821, 0.0) Jaune1 = characters1.sprite(1907, 828, 122, 258, 0.5, 0.0) Jaune2 = characters1.sprite(1906, 562, 125, 256, 0.5, 0.0) Jaunea = characters1.sprite(1929, 298, 99, 259, 0.5, 0.0) Jayde1 = characters1.sprite(1384, 364, 163, 332, 0.5, 0.0) Jayde2 = characters1.sprite(1552, 379, 166, 331, 0.5, 0.0) Jaydea = characters1.sprite(1726, 358, 169, 332, 0.5, 0.0) Johnny1 = characters1.sprite(8, 287, 197, 279, 0.5, 0.0) Johnny2 = characters1.sprite(212, 284, 193, 277, 0.5, 0.0) Johnnya = characters1.sprite(2, 2, 223, 280, 0.5, 0.0) Kabbu1 = characters1.sprite(246, 10, 144, 246, 0.5, 0.0) Kabbu2 = characters1.sprite(397, 14, 149, 246, 0.5, 0.0) Kabbua = characters1.sprite(553, 14, 166, 240, 0.5, 0.0) Kage1 = characters1.sprite(728, 4, 188, 260, 0.5, 0.0) Kage2 = characters1.sprite(924, 6, 188, 258, 0.5, 0.0) Kagea = characters1.sprite(1121, 8, 183, 260, 0.5, 0.0) Kali1 = characters1.sprite(1315, 14, 155, 321, 0.5, 0.0) Kali2 = characters1.sprite(1482, 18, 153, 319, 0.5, 0.0) Kalia = characters1.sprite(1641, 13, 118, 325, 0.5, 0.0) Nero1 = characters1.sprite(433, 359, 79, 90, 0.5, 0.0) Nero2 = characters1.sprite(513, 360, 79, 88, 0.5, 0.0) Neroa = characters1.sprite(594, 362, 77, 85, 0.5, 0.0) Pibu1 = characters1.sprite(423, 273, 75, 65, 0.5, 0.0) Pibu2 = characters1.sprite(500, 273, 77, 66, 0.5, 0.0) Pibua = characters1.sprite(579, 274, 92, 64, 0.5, 0.0) Pisci1 = characters1.sprite(944, 278, 131, 204, 0.5, 0.0) Pisci2 = characters1.sprite(1087, 284, 135, 202, 0.5, 0.0) Piscia = characters1.sprite(1227, 404, 143, 192, 0.5, 0.0) Kenny1 = characters2.sprite(401, 955, 154, 291, 0.5, 0.0) Kenny2 = characters2.sprite(572, 868, 154, 289, 0.5, 0.0) Kennya = characters2.sprite(735, 867, 171, 291, 0.5, 0.0) Kina1 = characters2.sprite(9, 529, 151, 316, 0.5, 0.0) Kina2 = characters2.sprite(165, 530, 156, 315, 0.5, 0.0) Kinaa = characters2.sprite(328, 620, 173, 319, 0.5, 0.0) Lanya1 = characters2.sprite(33, 268, 137, 248, 0.5, 0.0) Lanya2 = characters2.sprite(177, 269, 141, 246, 0.5, 0.0) Lanyaa = characters2.sprite(322, 268, 127, 249, 0.5, 0.0) Leif1 = characters2.sprite(597, 628, 104, 222, 0.5, 0.0) Leif2 = characters2.sprite(707, 631, 104, 220, 0.5, 0.0) Leifa = characters2.sprite(835, 586, 152, 236, 0.5, 0.0) Levi1 = characters2.sprite(1104, 1058, 122, 228, 0.5, 0.0) Levi2 = characters2.sprite(1103, 807, 121, 227, 0.5, 0.0) Levia = characters2.sprite(1016, 579, 159, 224, 0.5, 0.0) Maki1 = characters2.sprite(1189, 1328, 109, 293, 0.5, 0.0) Maki2 = characters2.sprite(1314, 1328, 109, 290, 0.5, 0.0) Makia = characters2.sprite(1258, 1041, 167, 284, 0.5, 0.0) Malbee1 = characters2.sprite(1463, 1572, 178, 261, 0.5, 0.0) Malbee2 = characters2.sprite(1464, 1308, 178, 261, 0.5, 0.0) Malbeea = characters2.sprite(1441, 1051, 180, 252, 0.5, 0.0) Mar1 = characters2.sprite(1245, 687, 116, 342, 0.5, 0.0) Mar2 = characters2.sprite(1368, 688, 117, 343, 0.5, 0.0) Mara = characters2.sprite(1493, 619, 117, 336, 0.5, 0.0) Mothiva1 = characters2.sprite(1703, 1473, 153, 217, 0.5, 0.0) Mothiva2 = characters2.sprite(1863, 1477, 154, 217, 0.5, 0.0) Mothivaa = characters2.sprite(1671, 1253, 164, 212, 0.5, 0.0) Neolith1 = characters2.sprite(767, 295, 182, 273, 0.5, 0.0) Neolith2 = characters2.sprite(965, 288, 183, 271, 0.5, 0.0) Neolitha = characters2.sprite(958, 3, 190, 279, 0.5, 0.0) Ritchee1 = characters2.sprite(3, 2, 144, 250, 0.5, 0.0) Ritchee2 = characters2.sprite(152, 3, 144, 248, 0.5, 0.0) Ritcheea = characters2.sprite(298, 2, 150, 255, 0.5, 0.0) Riz1 = characters2.sprite(451, 4, 214, 283, 0.5, 0.0) Riz2 = characters2.sprite(669, 5, 214, 281, 0.5, 0.0) Riza = characters2.sprite(452, 290, 305, 326, 0.5, 0.0) Samira1 = characters2.sprite(1634, 1007, 176, 220, 0.5, 0.0) Samira2 = characters2.sprite(1634, 786, 175, 218, 0.5, 0.0) Samiraa = characters2.sprite(1640, 607, 165, 174, 0.5, 0.0) Scarlet1 = characters2.sprite(1864, 1145, 175, 278, 0.5, 0.0) Scarlet2 = characters2.sprite(1865, 866, 177, 276, 0.5, 0.0) Scarleta = characters2.sprite(1814, 589, 228, 273, 0.5, 0.0) Serene1 = characters2.sprite(1193, 393, 125, 278, 0.5, 0.0) Serene2 = characters2.sprite(1323, 394, 130, 277, 0.5, 0.0) Serenea = characters2.sprite(1465, 337, 101, 249, 0.5, 0.0) Shay1 = characters2.sprite(1570, 333, 123, 267, 0.5, 0.0) Shay2 = characters2.sprite(1698, 335, 126, 265, 0.5, 0.0) Shaya = characters2.sprite(1829, 314, 216, 290, 0.5, 0.0) Skirby1 = characters2.sprite(2, 1855, 167, 191, 0.5, 0.0) Skirby2 = characters2.sprite(170, 1855, 167, 191, 0.5, 0.0) Skirbya = characters2.sprite(338, 1856, 168, 190, 0.5, 0.0) Tanjerin1 = characters2.sprite(1151, 201, 136, 191, 0.5, 0.0) Tanjerin2 = characters2.sprite(1181, 6, 136, 188, 0.5, 0.0) Tanjerina = characters2.sprite(1297, 193, 160, 200, 0.5, 0.0) Tanjerinc = characters2.sprite(1323, 3, 135, 189, 0.5, 0.0) Ultimax1 = characters2.sprite(1464, 3, 184, 327, 0.5, 0.0) Ultimax2 = characters2.sprite(1651, 3, 184, 326, 0.5, 0.0) Ultimaxa = characters2.sprite(1838, 4, 207, 306, 0.5, 0.0) Vanessa1 = characters2.sprite(911, 1700, 172, 320, 0.5, 0.0) Vanessa2 = characters2.sprite(1094, 1697, 174, 318, 0.5, 0.0) Vanessaa = characters2.sprite(1282, 1694, 136, 323, 0.5, 0.0) Vi1 = characters2.sprite(99, 1527, 172, 189, 0.5, 0.0) Vi2 = characters2.sprite(276, 1529, 171, 190, 0.5, 0.0) Via = characters2.sprite(450, 1531, 213, 192, 0.5, 0.0) Yin1 = characters2.sprite(220, 1252, 142, 268, 0.5, 0.0) Yin2 = characters2.sprite(364, 1253, 151, 266, 0.5, 0.0) Yina = characters2.sprite(522, 1250, 157, 273, 0.5, 0.0) Zaryant1 = characters2.sprite(3, 890, 184, 284, 0.5, 0.0) Zaryant2 = characters2.sprite(206, 945, 184, 283, 0.5, 0.0) Zaryanta = characters2.sprite(10, 1221, 200, 203, 0.5, 0.0) Zasp1 = characters2.sprite(682, 1300, 137, 301, 0.5, 0.0) Zasp2 = characters2.sprite(831, 1306, 134, 303, 0.5, 0.0) Zaspa = characters2.sprite(975, 1308, 176, 299, 0.5, 0.0) )
Player character sprites.
var ( AttractMK = loadSpriteSheet("img/arcade/game1.png", 14, 256, 128, true).sprite(0, 0, 256, 128, 0.52, 0.3) AttractFJ = loadSpriteSheet("img/arcade/game2.png", 25, 128, 64, true).sprite(0, 0, 128, 64, 0.5, 0.5) )
Attract screen backgrounds.
var ( MKKey = dungeonGameSheet.sprite(130, 452, 45, 57, 0.5, 0.5) MKPotion = dungeonGameSheet.sprite(180, 456, 37, 48, 0.5, 0.5) MKKnightIdle = dungeonGameSheet.sprite(441, 427, 70, 84, 0.5, 0) MKAntFront = dungeonGameSheet.sprite(392, 434, 45, 78, 0.5, 0) MKHeartFull = dungeonGameSheet.sprite(135, 394, 49, 48, 0.5, 0.5) MKHeartEmpty = dungeonGameSheet.sprite(189, 400, 35, 35, 0.5, 0.4989105) MKKnightBlock = dungeonGameSheet.sprite(440, 338, 71, 85, 0.5280719, 0.003908045) MKKnightMove = dungeonGameSheet.sprite(436, 250, 76, 83, 0.5307799, 0.004722687) MKKnightAttack = dungeonGameSheet.sprite(432, 165, 79, 82, 0.5, 0) MKAntSide = dungeonGameSheet.sprite(372, 352, 66, 80, 0.6725016, -0.003305817) MKAntBack = dungeonGameSheet.sprite(384, 270, 51, 79, 0.5435582, -0.002646531) UnusedParty = [...]*Sprite{ dungeonGameSheet.sprite(2, 85, 75, 82, 0.5, 0.5), dungeonGameSheet.sprite(79, 85, 75, 82, 0.5, 0.5), dungeonGameSheet.sprite(157, 85, 75, 82, 0.5, 0.5), dungeonGameSheet.sprite(2, 1, 75, 82, 0.5, 0.5), dungeonGameSheet.sprite(79, 1, 75, 82, 0.5, 0.5), dungeonGameSheet.sprite(156, 1, 75, 82, 0.5, 0.5), } FJGround = [...]*Sprite{ dungeonGameSheet.sprite(246, 471, 36, 37, 0.5, 0.5), dungeonGameSheet.sprite(389, 228, 37, 37, 0.5, 0.5), } FJBee = [...]*Sprite{ dungeonGameSheet.sprite(200, 280, 36, 33, 0.5, 0.5), dungeonGameSheet.sprite(241, 280, 37, 28, 0.5, 0.5), } FJWall = dungeonGameSheet.sprite(246, 320, 36, 147, 0.5, 0.5) FJCloud = [...]*Sprite{ dungeonGameSheet.sprite(289, 450, 74, 58, 0.5, 0.5), dungeonGameSheet.sprite(289, 401, 72, 45, 0.5, 0.5), dungeonGameSheet.sprite(291, 331, 71, 62, 0.5, 0.5), } FJBack = dungeonGameSheet.sprite(405, 233, 7, 7, 0.5, 0.5) FJHive = dungeonGameSheet.sprite(2, 202, 67, 115, 0.5, 0.5) FJFlower = dungeonGameSheet.sprite(132, 302, 39, 39, 0.5, 0.5) FJHoney = dungeonGameSheet.sprite(134, 349, 37, 39, 0.5, 0.5) FJWasp = [...]*Sprite{ dungeonGameSheet.sprite(72, 235, 46, 43, 0.5, 0.5), dungeonGameSheet.sprite(72, 282, 55, 35, 0.4028032, 0.5), } MKFireball = dungeonGameSheet.sprite(188, 343, 52, 45, 0.4843075, 0.4827393) MKWizardFront = dungeonGameSheet.sprite(316, 244, 67, 84, 0.5, 0) MKWizardSide = dungeonGameSheet.sprite(187, 174, 64, 80, 0.5746202, 0.00238651) MKWizardBack = dungeonGameSheet.sprite(119, 172, 66, 84, 0.5, 0) MKWizardCastFront = dungeonGameSheet.sprite(316, 158, 66, 85, 0.4768423, 0) MKWizardCastSide = dungeonGameSheet.sprite(254, 197, 59, 79, 0.4714805, 0) MKWizardCastBack = dungeonGameSheet.sprite(236, 89, 68, 83, 0.464739, 0) MKCompass = dungeonGameSheet.sprite(386, 167, 40, 53, 0.5270554, 0.4959164) MKWall = dungeonGameSheet.sprite(0, 448, 64, 64, 0.5, 0) MKCeiling = dungeonGameSheet.sprite(64, 448, 64, 64, 0.5, 0.5) MKFloor = dungeonGameSheet.sprite(0, 384, 64, 64, 0.5, 0.5) MKWall2 = dungeonGameSheet.sprite(64, 384, 64, 64, 0.5, 0) MKDoor = dungeonGameSheet.sprite(0, 320, 64, 64, 0.5, 0) MKStairs = dungeonGameSheet.sprite(64, 320, 64, 64, 0.5, 0) )
Termacade game sprites.
var ( ParticleStar = loadSpriteSheet("img/arcade/sprite-star.png", 100, 128, 128, false).sprite(4.026751, 7.026751, 119.9219, 114.9465, 0.5001024, 0.4956501) ParticleSmoke = loadSpriteSheet("img/arcade/sprite-smoke-sheet.png", 100, 128, 256, false).sprite(0.0761205, 22.02675, 127.9239, 233.9733, 0.4997025, 0.4529289) ParticleGrassPlaceholder = loadSpriteSheet("img/arcade/grass placeholder particle.png", 100, 16, 32, false).sprite(0, 0, 16, 32, 0.5, 0.5) )
Particle effect sprites.
var ( NeonFJBee = neon.sprite(0, 207, 65, 49, 0.5, 0.5) NeonFJWall = neon.sprite(69, 190, 37, 66, 0.5, 0.5) NeonMKWall = [...]*Sprite{ neon.sprite(108, 175, 57, 81, 0.5, 0.5), neon.sprite(167, 174, 57, 82, 0.5, 0.5), } NeonMKKnight = neon.sprite(0, 139, 65, 66, 0.5, 0.5) NeonHSCrown = neon.sprite(3, 3, 85, 103, 0.5, 0.5) NeonHSSparkle = neon.sprite(94, 8, 57, 76, 0.5, 0.5) NeonSparkle = [...]*Sprite{ neon.sprite(156, 0, 36, 35, 0.5, 0.5), neon.sprite(197, 0, 43, 37, 0.5, 0.5), } NeonCoin = [...]*Sprite{ neon.sprite(227, 40, 27, 61, 0.5, 0.5), neon.sprite(75, 106, 42, 63, 0.5, 0.5), neon.sprite(127, 106, 61, 63, 0.5, 0.5), neon.sprite(195, 106, 61, 65, 0.4750847, 0.4799582), } )
Neon sprites.
var (
Audience = [6][4]*Sprite{
{
audience.sprite(3, 140, 110, 297, 0.5, 0),
audience.sprite(116, 142, 110, 295, 0.5, 0),
audience.sprite(230, 138, 110, 295, 0.5, 0),
audience.sprite(347, 136, 110, 297, 0.5, 0),
},
{
audience.sprite(517, 757, 126, 263, 0.5, 0),
audience.sprite(645, 757, 125, 263, 0.5, 0),
audience.sprite(772, 756, 125, 264, 0.5, 0),
audience.sprite(899, 755, 125, 265, 0.5, 0),
},
{
audience.sprite(0, 445, 142, 250, 0.5, 0),
audience.sprite(144, 446, 143, 251, 0.5, 0),
audience.sprite(290, 447, 142, 248, 0.5, 0),
audience.sprite(144, 446, 143, 251, 0.5, 0),
},
{
audience.sprite(0, 701, 102, 323, 0.5, 0),
audience.sprite(104, 701, 104, 323, 0.5, 0),
audience.sprite(209, 701, 150, 323, 0.5, 0),
audience.sprite(360, 701, 152, 323, 0.5, 0),
},
{
audience.sprite(907, 435, 113, 313, 0.5, 0),
audience.sprite(791, 434, 112, 314, 0.5, 0),
audience.sprite(673, 435, 111, 313, 0.5, 0),
audience.sprite(556, 435, 113, 313, 0.5, 0),
},
{
audience.sprite(894, 99, 130, 327, 0.5, 0),
audience.sprite(765, 98, 128, 330, 0.5, 0),
audience.sprite(622, 100, 138, 326, 0.5240864, 0),
audience.sprite(480, 100, 138, 328, 0.5136719, 0),
},
}
)
Audience member sprites.
var Blank = (&spriteSheet{ AssetTexture: gfx.BlankAssetTexture(), width: 2, height: 2, unitPerPx: 2, }).sprite(0, 0, 2, 2, 0.5, 0.5)
Blank is a white square extending 1 unit in each direction.
var ButtonStyle internal.ButtonStyle
ButtonStyle determines the icon type used to display buttons in text.
var (
CardBattle = loadSpriteSheet("img/room/cardbattle2.png", 25.6, 256, 256, false).sprite(0, 64, 256, 192, 0.5, 0.5)
)
Misc. room sprites.
var ( GamepadButton = [10][]*Sprite{ arcade.BtnUp: { guiBtn.sprite(10.07612, 1803.076, 106.8478, 105.8478, 0.0625, 0.25), guiBtn.sprite(793, 1584, 107, 107, 0.0625, 0.25), guiBtn.sprite(1132, 1542, 96, 106, 0.0625, 0.25), }, arcade.BtnDown: { guiBtn.sprite(395.0761, 1675.076, 106.8478, 105.8478, 0.0625, 0.25), guiBtn.sprite(794, 1471, 107, 107, 0.0625, 0.25), guiBtn.sprite(1231, 1540, 96.97325, 105, 0.0625, 0.25), }, arcade.BtnLeft: { guiBtn.sprite(526, 1677, 102, 103, 0.0625, 0.25), guiBtn.sprite(902, 1584, 107, 107, 0.0625, 0.25), guiBtn.sprite(1235, 1440.027, 105, 96.97325, 0.0625, 0.25), }, arcade.BtnRight: { guiBtn.sprite(268.0761, 1675.076, 105.8478, 106.8478, 0.0625, 0.25), guiBtn.sprite(902, 1471, 107, 107, 0.0625, 0.25), guiBtn.sprite(1129, 1443, 104, 96, 0.0625, 0.25), }, arcade.BtnConfirm: { guiBtn.sprite(138, 1800, 107, 108, 0.0625, 0.25), guiBtn.sprite(500, 1931, 108, 107, 0.0625, 0.25), guiBtn.sprite(638, 1696, 107, 108, 0.0625, 0.25), guiBtn.sprite(1136, 1654, 99, 100, 0.0625, 0.25), }, arcade.BtnCancel: { guiBtn.sprite(266, 1800, 107, 108, 0.0625, 0.25), guiBtn.sprite(628, 1931, 108, 107, 0.0625, 0.25), guiBtn.sprite(766, 1696, 107, 108, 0.0625, 0.25), guiBtn.sprite(1135, 1756, 99, 99, 0.0625, 0.25), }, arcade.BtnSwitch: { guiBtn.sprite(395, 1800, 107, 108, 0.0625, 0.25), guiBtn.sprite(756, 1931, 108, 107, 0.0625, 0.25), guiBtn.sprite(895, 1696, 107, 108, 0.0625, 0.25), guiBtn.sprite(1237, 1653, 99, 99, 0.0625, 0.25), }, arcade.BtnToggle: { guiBtn.sprite(523, 1800, 107, 108, 0.0625, 0.25), guiBtn.sprite(884, 1931, 108, 107, 0.0625, 0.25), guiBtn.sprite(1023, 1696, 107, 108, 0.0625, 0.25), guiBtn.sprite(1236, 1757, 99, 99, 0.0625, 0.25), }, arcade.BtnPause: { guiBtn.sprite(4, 1676.076, 121, 96.92388, 0.0625, 0.25), guiBtn.sprite(1121, 1947, 110, 83, 0.0625, 0.25), guiBtn.sprite(880, 1818, 102, 103, 0.0625, 0.25), }, arcade.BtnHelp: { guiBtn.sprite(132, 1676.076, 121, 96.92388, 0.0625, 0.25), guiBtn.sprite(1121, 1858, 110, 83, 0.0625, 0.25), guiBtn.sprite(989, 1850, 102, 39, 0.0625, 0.25), }, } )
Button sprites.
Functions ¶
func DrawText ¶
func DrawText(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, color color.RGBA)
DrawText draws a string to the screen.
func DrawTextCentered ¶
func DrawTextCentered(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, color color.RGBA, shadow bool)
DrawTextCentered draws a string to the screen center-justified.
func DrawTextCenteredFunc ¶
func DrawTextCenteredFunc(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, color func(rune) color.RGBA, shadow bool)
DrawTextCenteredFunc draws a string to the screen center-justified.
func DrawTextCenteredFuncEx ¶ added in v0.2.73
func DrawTextCenteredFuncEx(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, color func(rune) color.RGBA, shadow bool, flag RenderFlag, ry, rz, blur float32)
DrawTextCenteredFuncEx draws a string to the screen center-justified.
func DrawTextFunc ¶
func DrawTextFunc(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, getColor func(rune) color.RGBA)
DrawTextFunc draws a string to the screen.
func DrawTextFuncEx ¶ added in v0.2.73
func DrawTextFuncEx(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, getColor func(rune) color.RGBA, flags RenderFlag, ry, rz, blur float32)
DrawTextFuncEx draws a string to the screen.
func DrawTextShadow ¶
func DrawTextShadow(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, color color.RGBA)
DrawTextShadow draws a string to the screen with a drop shadow.
func DrawTextShadowFunc ¶
func DrawTextShadowFunc(tb *TextBatch, font FontID, text string, x, y, z, scaleX, scaleY float32, color func(rune) color.RGBA)
DrawTextShadowFunc draws a string to the screen with a drop shadow.
func TextAdvance ¶
TextAdvance returns the number of units the next letter is offset after this letter.
func TextHitTest ¶ added in v0.2.75
func TextHitTest(cam *gfx.Camera, font FontID, text string, x, y, z, scaleX, scaleY, curX, curY float32, centered bool) bool
TextHitTest returns true if the cursor position is sufficiently close to the text. Assumes the text is displayed in a rectangle-ish region of the screen.
Types ¶
type Batch ¶ added in v0.2.72
type Batch struct {
// contains filtered or unexported fields
}
Batch is a sprite batch.
func (*Batch) Append ¶ added in v0.2.72
func (sb *Batch) Append(s *Sprite, x, y, z, sx, sy float32, tint color.RGBA, flags RenderFlag, ry, rz, blur float32)
Append adds a sprite to the batch.
func (*Batch) MatchOverview ¶ added in v0.2.75
func (*Batch) Render ¶ added in v0.2.72
func (sb *Batch) Render()
Render draws the sprite batch to the screen.
type RenderFlag ¶ added in v0.2.72
type RenderFlag uint16
RenderFlag is a sprite rendering modifier.
const ( FlagBillboard RenderFlag = 1 << 0 FlagRainbow RenderFlag = 1 << 1 FlagMKFog RenderFlag = 1 << 2 FlagNoDiscard RenderFlag = 1 << 3 FlagBorder RenderFlag = 1 << 4 FlagIsMask RenderFlag = 1 << 5 FlagHalfGlow RenderFlag = 1 << 6 )
Constants for RenderFlag.
type Sprite ¶
type Sprite struct {
S0, S1 float32
T0, T1 float32
X0, X1 float32
Y0, Y1 float32
// contains filtered or unexported fields
}
Sprite holds the data needed to render a sprite.
type TextBatch ¶ added in v0.2.73
type TextBatch struct {
// contains filtered or unexported fields
}
TextBatch is a sequence of text rendering operations executed simultaneously.
func NewTextBatch ¶ added in v0.2.73
NewTextBatch creates a TextBatch.
func (*TextBatch) Render ¶ added in v0.2.73
func (tb *TextBatch) Render()
Render draws the TextBatch to the screen.