sprites

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package sprites handles loading and rendering sprites.

Index

Constants

This section is empty.

Variables

View Source
var (
	WhiteBar       = gui.sprite(1, 975, 438.9732, 48, 0.5000305, 0.5)
	WhiteBarCorner = gui.sprite(1, 1004, 20, 20, 0.5, 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 [256]*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)
	Happy           = customCard.sprite(435, 371, 76, 56, 0.5, 0.5)
	Sad             = customCard.sprite(426, 316, 85, 54, 0.5, 0.5)
	DeleteButton    = customCard.sprite(379, 400, 52, 52, 0.5, 0.5)
)

GUI sprites for Spy Cards.

View Source
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.

View Source
var (
	Skybox1 = loadSpriteSheet("img/room/skybox1.png", 100, 1024, 1024, false).sprite(0, 0, 1024, 1024, 0.5, 0.5)

	ELFTanjerin = [...]*Sprite{
		0:  tanjerinSheet.sprite(1, 833, 136, 191, 0.5, 0),
		1:  tanjerinSheet.sprite(142, 833, 136, 188, 0.5, 0),
		2:  tanjerinSheet.sprite(283, 833, 136, 188, 0.5, 0),
		3:  tanjerinSheet.sprite(424, 832, 132, 146, 0.5, 0),
		4:  tanjerinSheet.sprite(562, 832, 131, 144, 0.5, 0),
		5:  tanjerinSheet.sprite(697, 832, 132, 144, 0.5, 0),
		6:  tanjerinSheet.sprite(863, 633, 142, 190, 0.4938195, 0),
		7:  tanjerinSheet.sprite(2, 631, 129, 195, 0.5, 0),
		8:  tanjerinSheet.sprite(135, 630, 128, 194, 0.5, 0),
		9:  tanjerinSheet.sprite(270, 630, 130, 195, 0.5, 0),
		10: tanjerinSheet.sprite(405, 631, 139, 190, 0.5, 0),
		11: tanjerinSheet.sprite(552, 631, 135, 189, 0.5, 0),
		12: tanjerinSheet.sprite(696, 631, 135, 189, 0.5, 0),
		13: tanjerinSheet.sprite(0, 432, 137, 190, 0.5, 0),
		14: tanjerinSheet.sprite(140, 431, 140, 189, 0.5, 0),
		15: tanjerinSheet.sprite(283, 431, 136, 189, 0.5, 0),
		16: tanjerinSheet.sprite(428, 433, 140, 191, 0.5, 0),
		17: tanjerinSheet.sprite(572, 433, 137, 188, 0.5, 0),
		18: tanjerinSheet.sprite(719, 433, 134, 188, 0.5, 0),
		19: tanjerinSheet.sprite(0, 230, 131, 195, 0.5, 0),
		20: tanjerinSheet.sprite(135, 229, 129, 195, 0.5, 0),
		21: tanjerinSheet.sprite(268, 229, 132, 195, 0.5, 0),
		22: tanjerinSheet.sprite(412, 296, 189, 129, 0.7684255, 0.01014902),
		23: tanjerinSheet.sprite(607, 296, 189, 129, 0.7812716, 0.01003387),
		24: tanjerinSheet.sprite(0, 0, 158, 200, 0.593392, -0.006740375),
		25: tanjerinSheet.sprite(168, 1, 196, 203, 0.7019216, 0.003319395),
		26: tanjerinSheet.sprite(412, 153, 189, 131, 0.7648935, 0.0050746),
		27: tanjerinSheet.sprite(607, 152, 189, 130, 0.7777113, 0.0050746),
		28: tanjerinSheet.sprite(860, 429, 160, 196, 0.5383999, 0),
		29: tanjerinSheet.sprite(840, 205, 140, 189, 0.5358146, 0),
	}

	ELFMaki = [...]*Sprite{}/* 113 elements not displayed */

)

Sprites for the ELF prototype.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
var (
	Audience = [7][10]*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),
			audienceBlurSprite(5, 281, 724, 110, 295, 0.5),
			audienceBlurSprite(5, 401, 722, 110, 297, 0.5),
			audienceBlurSprite(10, 896, 724, 110, 295, 0.5),
			audienceBlurSprite(10, 1026, 722, 110, 297, 0.5),
			audienceBlurSprite(15, 1521, 714, 110, 295, 0.5),
			audienceBlurSprite(15, 1661, 712, 110, 297, 0.5),
		},
		{

			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),
			audienceBlurSprite(5, 5, 423, 125, 263, 0.5),
			audienceBlurSprite(5, 140, 421, 125, 265, 0.5),
			audienceBlurSprite(10, 600, 413, 125, 263, 0.5),
			audienceBlurSprite(10, 745, 411, 125, 265, 0.5),
			audienceBlurSprite(15, 1205, 393, 125, 263, 0.5),
			audienceBlurSprite(15, 1360, 391, 125, 265, 0.5),
		},
		{

			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),
			audienceBlurSprite(5, 275, 435, 143, 251, 0.5),
			audienceBlurSprite(5, 275, 435, 143, 251, 0.5),
			audienceBlurSprite(10, 890, 425, 143, 251, 0.5),
			audienceBlurSprite(10, 890, 425, 143, 251, 0.5),
			audienceBlurSprite(15, 1515, 405, 143, 251, 0.5),
			audienceBlurSprite(15, 1515, 405, 143, 251, 0.5),
		},
		{

			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),
			audienceBlurSprite(5, 5, 696, 104, 323, 0.5),
			audienceBlurSprite(5, 119, 696, 152, 323, 0.5),
			audienceBlurSprite(10, 600, 696, 104, 323, 0.5),
			audienceBlurSprite(10, 724, 696, 152, 323, 0.5),
			audienceBlurSprite(15, 1205, 686, 104, 323, 0.5),
			audienceBlurSprite(15, 1339, 686, 152, 323, 0.5),
		},
		{

			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),
			audienceBlurSprite(5, 5, 97, 112, 314, 0.5),
			audienceBlurSprite(5, 127, 98, 113, 313, 0.5),
			audienceBlurSprite(10, 600, 77, 112, 314, 0.5),
			audienceBlurSprite(10, 732, 78, 113, 313, 0.5),
			audienceBlurSprite(15, 1205, 47, 112, 314, 0.5),
			audienceBlurSprite(15, 1347, 48, 113, 313, 0.5),
		},
		{

			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),
			audienceBlurSprite(5, 250, 81, 128, 330, 0.5240864),
			audienceBlurSprite(5, 388, 83, 138, 328, 0.5136719),
			audienceBlurSprite(10, 865, 61, 128, 330, 0.5240864),
			audienceBlurSprite(10, 1013, 63, 138, 328, 0.5136719),
			audienceBlurSprite(15, 1490, 31, 128, 330, 0.5240864),
			audienceBlurSprite(15, 1648, 33, 138, 328, 0.5136719),
		},
		{

			Tanjerin1, Tanjerinc,
			Tanjerin1, Tanjerinc,
			Tanjerin1, Tanjerinc,
			Tanjerin1, Tanjerinc,
			Tanjerin1, Tanjerinc,
		},
	}
)

Audience member sprites.

View Source
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.

View Source
var ButtonStyle internal.ButtonStyle

ButtonStyle determines the icon type used to display buttons in text.

View Source
var (
	CardBattle = loadSpriteSheet("img/room/cardbattle2.png", 25.6, 256, 256, false).sprite(0, 64, 256, 192, 0.5, 0.5)
)

Misc. room sprites.

View Source
var (
	GamepadButton = [10][]*Sprite{
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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),
		},
		input.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 Button

func Button(btn input.Button) string

Button returns a string that will be rendered as a button icon.

func DrawLetter added in v0.2.81

func DrawLetter(tb *Batch, font FontID, letter rune, x, y, z, scaleX, scaleY float32, tint color.RGBA, flags RenderFlag, ry, rz, blur float32)

DrawLetter draws one letter to the screen.

func DrawText

func DrawText(tb *Batch, 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 *Batch, 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 *Batch, 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 *Batch, 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 *Batch, 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 *Batch, 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 *Batch, 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 *Batch, 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 HitTest added in v0.2.82

func HitTest(cam *gfx.Camera, x0, y0, z0, x1, y1, z1, curX, curY float32) bool

HitTest returns true if the cursor is within the rectangle defined by the screen coordinates of (x0, y0, z0) and (x1, y1, z1).

func TextAdvance

func TextAdvance(font FontID, letter rune, scaleX float32) float32

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 NewBatch added in v0.2.72

func NewBatch(cam *gfx.Camera) *Batch

NewBatch starts 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 (sb *Batch) MatchOverview(x, y, z, sx, sy float32, flip bool)

MatchOverview renders the versus screen for the start of a Spy Cards Online recording.

func (*Batch) Render added in v0.2.72

func (sb *Batch) Render()

Render draws the sprite batch to the screen.

func (*Batch) Reset added in v0.2.73

func (sb *Batch) Reset(cam *gfx.Camera)

Reset clears the state of the Batch, but keeps its allocated memory, allowing it to be reused.

func (*Batch) SetCamera added in v0.2.73

func (sb *Batch) SetCamera(cam *gfx.Camera)

SetCamera changes the camera of the batch without changing its contents.

type FontID added in v0.2.73

type FontID uint8

FontID is a font.

const (
	FontD3Streetism FontID = iota
	FontBubblegumSans
)

Available fonts.

func (FontID) String added in v0.2.73

func (i FontID) String() string

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.

func New added in v0.2.73

func New(tex *gfx.AssetTexture, unitPerPx float32, width, height int, x, y, w, h, px, py float32) *Sprite

New creates a new sprite.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL