sprites

package
v0.3.26 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 15 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)
	Berries        = gui.sprite(776, 6, 81, 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),
	}
	CardFront   = gui.sprite(540, 1225, 174, 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)
	Damage      = gui.sprite(1788, 9, 258, 256, 0.5131046, 0.4544878)
	Heal        = gui.sprite(1794, 539, 247, 250, 0.4998799, 0.5567427)
	Freeze      = gui.sprite(5, 374, 89, 87, 0.5, 0.5)
	Poison      = gui.sprite(99, 373, 67, 79, 0.5, 0.5)
	Numb        = gui.sprite(169, 369, 95, 89, 0.5, 0.5)
	Sleep       = gui.sprite(268, 371, 97, 87, 0.5, 0.5)
	Burn        = gui.sprite(1257, 356, 71, 85, 0.4837148, 0.3773563)
	Dizzy       = gui.sprite(516, 260.0513, 85, 87.94868, 0.5, 0.4997081)
	Dizzy2      = gui.sprite(517, 177.0761, 76, 78.92388, 0.5, 0.4931825)
	Fortify     = gui.sprite(611, 174, 81, 88, 0.5, 0.5)
	Break       = gui.sprite(699, 263, 81, 90, 0.5, 0.5)
	Empower     = gui.sprite(788, 267, 73, 83, 0.5, 0.5)
	Enfeeble    = gui.sprite(704, 174, 72, 86, 0.5, 0.5)
	Tablet      = gui.sprite(973, 187, 56, 84, 0.5214061, 0.4624701)
	Meter       = gui.sprite(2, 744, 517, 150, 0.06385988, 0.6441321)
	MeterLong   = gui.sprite(0, 1502, 786, 152, 0.04200072, 0.6407889)
	WoodenOrb   = gui.sprite(1552, 606, 229, 301.9665, 0.4842348, 0.371527)

	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(176, 459, 122, 26, 0.5, 0.5)
	TribeBubbleWide = customCard.sprite(176, 487, 252, 25, 0.5, 0.5)
	Description     = customCard.sprite(177, 329, 201.5, 130, 0.5, 0.5)
	BackToken       = customCard.sprite(1, 36, 174, 237, 0.5, 0.5)
	BackAttacker    = customCard.sprite(177, 36, 174, 237, 0.5, 0.5)
	BackEffect      = customCard.sprite(353, 36, 174, 237, 0.5, 0.5)
	BackMiniBoss    = customCard.sprite(529, 36, 174, 237, 0.5, 0.5)
	BackBoss        = customCard.sprite(705, 36, 174, 237, 0.5, 0.5)
	FrontToken      = customCard.sprite(514, 401, 40, 110, 0.5, 0.2)
	FrontAttacker   = customCard.sprite(556, 401, 40, 110, 0.5, 0.2)
	FrontEffect     = customCard.sprite(598, 401, 40, 110, 0.5, 0.2)
	FrontMiniBoss   = customCard.sprite(514, 289, 40, 110, 0.5, 0.2)
	FrontBoss       = customCard.sprite(556, 289, 40, 110, 0.5, 0.2)
	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, 374, 52, 52, 0.5, 0.5)
	CheapCoin       = customCard.sprite(881, 145, 128, 128, 0.5, 0.5)
	MenuIcon        = [6]*Sprite{
		customCard.sprite(599, 341, 49, 57, 0.5, 0.5),
		customCard.sprite(180, 276, 44, 44, 0.5, 0.5),
		customCard.sprite(227, 276, 41, 44, 0.5, 0.5),
		customCard.sprite(275, 284, 71, 27, 0.5, 0.5),
		customCard.sprite(352, 278, 44, 45, 0.5, 0.5),
		customCard.sprite(600, 279, 50, 60, 0.5, 0.5),
	}
)

GUI sprites for Spy Cards.

View Source
var (
	Red      = Color{255, 0, 0, 255}
	Yellow   = Color{255, 235, 4, 255}
	Green    = Color{0, 255, 0, 255}
	Gray     = Color{127, 127, 127, 255}
	LGray    = Color{191, 191, 191, 255}
	DGray    = Color{31, 31, 31, 255}
	White    = Color{255, 255, 255, 255}
	Black    = Color{0, 0, 0, 255}
	Rainbow  = Color{1, 1, 1, 0} // special case
	MKStone  = Color{229, 102, 0, 255}
	MKPurple = Color{127, 0, 165, 255}
	MKBlue   = Color{127, 127, 255, 255}
)

Colors for sprites.

View Source
var (
	Skybox1 = loadSpriteSheet("img/room/skybox1.webp", 100, 1024, 1024, false).sprite(0, 0, 1024, 1024, 0.5, 0.5)
	Skybox4 = loadSpriteSheet("img/room/skybox4.webp", 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 (
	FoodLeafRaw    = aphidFestivalSheet.sprite(7, 633, 61, 63, 0.5, 0.5)
	FoodShroomRaw  = aphidFestivalSheet.sprite(3, 568, 50, 59, 0.5, 0.5)
	FoodHoneyRaw   = aphidFestivalSheet.sprite(3, 514, 54, 51, 0.5, 0.5)
	FoodLeafCooked = [3]*Sprite{
		aphidFestivalSheet.sprite(77, 644, 63, 48, 0.5, 0.5),
		aphidFestivalSheet.sprite(150, 641, 60, 47, 0.5, 0.5),
		aphidFestivalSheet.sprite(222, 638, 56, 57, 0.5, 0.5),
	}
	FoodShroomCooked = [3]*Sprite{
		aphidFestivalSheet.sprite(71, 581, 56, 52, 0.5, 0.5),
		aphidFestivalSheet.sprite(143, 584, 55, 48, 0.5, 0.5),
		aphidFestivalSheet.sprite(203, 573, 60, 58, 0.5, 0.5),
	}
	FoodHoneyCooked = [3]*Sprite{
		aphidFestivalSheet.sprite(68, 510, 60, 63, 0.5, 0.5),
		aphidFestivalSheet.sprite(138, 513, 60, 58, 0.5, 0.5),
		aphidFestivalSheet.sprite(209, 519, 58, 50, 0.5, 0.5),
	}
	TanjerinIdle    = aphidFestivalSheet.sprite(4, 307, 136, 191, 0.5, 0.5)
	TanjerinHide    = aphidFestivalSheet.sprite(3, 111, 142, 190, 0.5, 0.5)
	TanjerinCheer   = aphidFestivalSheet.sprite(150, 307, 139, 190, 0.5, 0.5)
	FestivalWordArt = aphidFestivalSheet.sprite(1, 0, 568, 101, 0.5, 0.5)
	KutIdle         = aphidFestivalSheet.sprite(307, 270, 190, 326, 0.3734586, 0.5)
	KutSlice        = [10]*Sprite{
		aphidFestivalSheet.sprite(443, 684, 238, 327, 0.5, 0.5),
		aphidFestivalSheet.sprite(696, 690, 245, 326, 0.5, 0.5),
		aphidFestivalSheet.sprite(960, 689, 254, 323, 0.5, 0.5),
		aphidFestivalSheet.sprite(523, 203, 230, 458, 0.5, 0.3657597),
		aphidFestivalSheet.sprite(779, 189, 239, 458, 0.5, 0.3629283),
		aphidFestivalSheet.sprite(1043, 177, 238, 460, 0.5, 0.3635217),
		aphidFestivalSheet.sprite(1248, 679, 462, 319, 0.5, 0.4638758),
		aphidFestivalSheet.sprite(1329, 214, 169, 363, 0.5104937, 0.4366591),
		aphidFestivalSheet.sprite(1540, 210, 167, 349, 0.5065678, 0.4506916),
		aphidFestivalSheet.sprite(1739, 217, 159, 338, 0.5195193, 0.5),
	}
	SmokeParticle = [2]*Sprite{
		aphidFestivalSheet.sprite(164, 126, 125, 128, 0.5, 0.5),
		aphidFestivalSheet.sprite(321, 145, 70, 72, 0.5, 0.5),
	}
	Joy       = aphidFestivalSheet.sprite(322, 612, 90, 412, 0.5, 0.5)
	AphidBody = [3]*Sprite{
		aphidFestivalSheet.sprite(0, 919, 140, 105, 0.5, 0.5),
		aphidFestivalSheet.sprite(0, 820, 156, 98, 0.5, 0.5),
		aphidFestivalSheet.sprite(0, 712, 148, 105, 0.5, 0.5),
	}
	AphidLeg = [3]*Sprite{
		aphidFestivalSheet.sprite(141, 919, 140, 105, 0.5, 0.5),
		aphidFestivalSheet.sprite(158, 818, 156, 98, 0.5, 0.5),
		aphidFestivalSheet.sprite(158, 709, 148, 105, 0.5, 0.5),
	}

	BtnHistory  = gui.sprite(444, 355, 128, 129, 0.5, 0.5)
	BtnPibu     = gui.sprite(879, 355, 130, 128, 0.5, 0.5)
	BtnKut      = gui.sprite(588, 355, 129, 127, 0.5, 0.5)
	BtnTanjerin = gui.sprite(4, 181, 166, 169, 0.5, 0.5)
	BtnWifeMode = gui.sprite(1120, 1330, 70, 102, 0.5, 0.5)
	BtnSave     = gui.sprite(990, 489, 128, 128, 0.5, 0.5)
	BtnQuit     = gui.sprite(1379, 446, 166, 170, 0.5, 0.5)
)

Aphid Festival sprites.

View Source
var (
	AudienceShadow = audienceBlur.sprite(1857, 466, 131, 131, 0.5, 0.5)

	Audience = [8][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, Tanjerinb,
			Tanjerinc, Tanjerinb,
			Tanjerinb, Tanjerinb,
			Tanjerinb, Tanjerinb,
			Tanjerinb, Tanjerinb,
		},
		{

			Kabbu0, Kabbub,
			Kabbuc, Kabbub,
			Kabbub, Kabbub,
			Kabbub, Kabbub,
			Kabbub, Kabbub,
		},
	}
)

Audience member sprites.

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)

	Kabbu0    = characters2.sprite(508, 1796, 128, 250, 0.5, 0.0)
	Kabbub    = characters2.sprite(780, 1799, 128, 247, 0.5, 0.0)
	Kabbuc    = characters2.sprite(638, 1795, 140, 251, 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(1850, 314, 137, 266, 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)
	Tanjerinb = characters2.sprite(1894, 1858, 152, 188, 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 (
	Main1 = func() *gfx.AssetTexture {
		tex := gfx.NewAssetTexture("img/main1.webp", false, false)
		tex.DownScale--

		return tex
	}()
	Main2   = gfx.NewAssetTexture("img/main2.webp", false, false)
	TreeTex = gfx.NewAssetTexture("img/treetex.webp", false, false)
	Water1  = func() *gfx.AssetTexture {
		tex := gfx.NewAssetTexture("img/water1.webp", false, false)
		tex.NoClamp = true

		return tex
	}()
	Water3 = func() *gfx.AssetTexture {
		tex := gfx.NewAssetTexture("img/water3.webp", false, false)
		tex.NoClamp = true

		return tex
	}()
	Hue   = gfx.NewAssetTexture("img/hue.webp", false, false)
	Grass = gfx.NewAssetTexture("img/grass.webp", false, false)

	TablesFry         = bugTablesSheet.sprite(1, 1753, 248, 294, 0.5, 0)
	TablesDoppel      = bugTablesSheet.sprite(251, 1786, 130, 261, 0.5, 0)
	TablesCrisbee     = bugTablesSheet.sprite(383, 1758, 223, 289, 0.5, 0)
	TablesKut         = bugTablesSheet.sprite(608, 1721, 190, 326, 0.5, 0)
	TablesJayde       = bugTablesSheet.sprite(800, 1715, 163, 332, 0.5, 0)
	TablesMasterSlice = bugTablesSheet.sprite(965, 1782, 213, 265, 0.5, 0)
	TablesMicrowave   = bugTablesSheet.sprite(1180, 1795, 336, 252, 0.5, 0)

	TablesMadameButterfly = bugTablesSheet.sprite(1518, 1782, 187, 265, 0.5, 0)
	TablesCricketly       = bugTablesSheet.sprite(1707, 1732, 134, 315, 0.5, 0)
	TablesSandy           = bugTablesSheet.sprite(1, 1562, 208, 189, 0.5, 0)
	TablesClaire          = bugTablesSheet.sprite(211, 1502, 120, 249, 0.5, 0)
	TablesNeil            = bugTablesSheet.sprite(333, 1511, 153, 245, 0.5, 0)
	TablesXic             = bugTablesSheet.sprite(488, 1380, 141, 376, 0.5, 0)
	TablesGein            = bugTablesSheet.sprite(631, 1377, 142, 342, 0.5, 0)
	TablesYumnum          = bugTablesSheet.sprite(775, 1492, 182, 221, 0.5, 0)
	TablesSkirby          = bugTablesSheet.sprite(959, 1576, 167, 191, 0.5, 0)
	TablesCherryGuy       = bugTablesSheet.sprite(1128, 1532, 176, 248, 0.5, 0)
	TablesTyna            = bugTablesSheet.sprite(1306, 1469, 192, 324, 0.5, 0)
	TablesRina            = bugTablesSheet.sprite(1843, 1730, 122, 317, 0.5, 0)
	TablesSnail           = bugTablesSheet.sprite(775, 1177, 279, 313, 1, 0)
	TablesSnailTired      = bugTablesSheet.sprite(351, 962, 423, 161, 1, 0)

	TablesAnt        = bugTablesSheet.sprite(1498, 1495, 188, 285, 0.5, 0)
	TablesCelia      = bugTablesSheet.sprite(1688, 1494, 199, 236, 0.5, 0)
	TablesMothiva    = bugTablesSheet.sprite(1, 1257, 213, 303, 0.5, 0)
	TablesSlacker    = bugTablesSheet.sprite(1, 753, 348, 502, 0.5, 0)
	TablesMaki       = bugTablesSheet.sprite(1889, 1414, 154, 314, 0.5, 0)
	TablesSnakemouth = bugTablesSheet.sprite(501, 1125, 249, 250, 0.5, 0)

	TablesBugariaCommercial    = bugTablesSheet.sprite(1, 257, 256, 192, 0.5, 0)
	TablesDefiantRoot          = bugTablesSheet.sprite(259, 257, 256, 192, 0.5, 0)
	TablesUndergroundTavern    = bugTablesSheet.sprite(517, 257, 256, 192, 0.5, 0)
	TablesBeeCafeteria         = bugTablesSheet.sprite(775, 257, 256, 192, 0.5, 0)
	TablesGoldenSettlementFine = bugTablesSheet.sprite(1033, 257, 256, 192, 0.5, 0)
	TablesWaspKingdomCart      = bugTablesSheet.sprite(1291, 257, 256, 192, 0.5, 0)
	TablesDineMite             = bugTablesSheet.sprite(1549, 257, 256, 192, 0.5, 0)
	TablesMetalIsland          = bugTablesSheet.sprite(1, 451, 256, 192, 0.5, 0)
	TablesApartment            = bugTablesSheet.sprite(259, 451, 256, 192, 0.5, 0)
	TablesColosseum            = bugTablesSheet.sprite(517, 451, 256, 192, 0.5, 0)

	TablesItems = [...]*Sprite{}/* 105 elements not displayed */

)

Bug Tables sprites.

View Source
var (
	AttractMK = loadSpriteSheet("img/arcade/game1.webp", 14, 256, 128, true).sprite(0, 0, 256, 128, 0.52, 0.3)
	AttractFJ = loadSpriteSheet("img/arcade/game2.webp", 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.webp", 100, 128, 128, false).sprite(4.026751, 7.026751, 119.9219, 114.9465, 0.5001024, 0.4956501)
	ParticleSmoke            = loadSpriteSheet("img/arcade/sprite-smoke-sheet.webp", 100, 128, 256, false).sprite(0.0761205, 22.02675, 127.9239, 233.9733, 0.4997025, 0.4529289)
	ParticleGrassPlaceholder = loadSpriteSheet("img/arcade/grass placeholder particle.webp", 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 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 with a width and height of 1 pixel.

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

View Source
var (
	CardBattle = loadSpriteSheet("img/room/cardbattle.webp", 102.4, 1024, 1024, false).sprite(0, 0, 1024, 1024, 0.5, 0.625)
)

Misc. room sprites.

View Source
var ErrTooManySheets = errors.New("sprite: too many sprite sheets in batch")

ErrTooManySheets is panic-ed when attempting to Append a sprite that uses a unique texture sheet to a batch that already has the maximum number of textures.

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, flags RenderFlag, rx, ry, rz float32)

DrawLetter draws one letter to the screen.

func DrawText

func DrawText(tb *Batch, font FontID, text string, x, y, z, scaleX, scaleY float32, tint Color)

DrawText draws a string to the screen.

func DrawTextBorder added in v0.3.10

func DrawTextBorder(tb *Batch, font FontID, text string, x, y, z, scaleX, scaleY float32, textColor, borderColor Color, centered bool) float32

DrawTextBorder draws text to the screen with an outline on each letter.

func DrawTextCentered

func DrawTextCentered(tb *Batch, font FontID, text string, x, y, z, scaleX, scaleY float32, tint Color, 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, getColor func(rune) Color, shadow bool)

DrawTextCenteredFunc 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)

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, flags RenderFlag, rx, ry, rz float32) float32

DrawTextFuncEx draws a string to the screen.

func DrawTextShadow

func DrawTextShadow(tb *Batch, font FontID, text string, x, y, z, scaleX, scaleY float32, tint Color)

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, getColor func(rune) Color)

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 LetterSupported added in v0.3.14

func LetterSupported(font FontID, letter rune) bool

LetterSupported returns true if a letter can be rendered in a given font.

func PreloadText

func PreloadText() error

func SpriteHitTest added in v0.3.7

func SpriteHitTest(cam *gfx.Camera, sprite *Sprite, x, y, z, sx, sy, curX, curY float32) bool

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.

func TextReady added in v0.3.5

func TextReady() bool

func TextTexture added in v0.3.19

func TextTexture() *gfx.AssetTexture

Types

type Batch added in v0.2.72

type Batch struct {
	BaseX float32
	BaseY float32
	BaseZ float32

	AvoidTextureFeedback bool
	// 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)

Append adds a sprite to the batch.

func (*Batch) AppendEx added in v0.3.10

func (sb *Batch) AppendEx(s *Sprite, x, y, z, sx, sy float32, tint Color, flags RenderFlag, rx, ry, rz float32)

AppendEx 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) Record added in v0.3.19

func (sb *Batch) Record() func() *BatchSnapshot

func (*Batch) Render added in v0.2.72

func (sb *Batch) Render()

Render draws the sprite batch to the screen.

func (*Batch) ReserveTexture added in v0.3.19

func (sb *Batch) ReserveTexture(tex *gfx.AssetTexture) bool

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.

func (*Batch) SetFunHouse added in v0.3.15

func (sb *Batch) SetFunHouse(data *[8]float32)

type BatchSnapshot added in v0.3.19

type BatchSnapshot struct {
	// contains filtered or unexported fields
}

func (*BatchSnapshot) Replay added in v0.3.19

func (bs *BatchSnapshot) Replay(sb *Batch) bool

type Color added in v0.3.17

type Color struct {
	R, G, B, A uint8
}

Color is equivalent to image/color.RGBA, but is a different type to avoid having to import the entire package for one structure definition.

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 (
	FlagRainbow   RenderFlag = 1 << 0
	FlagMKFog     RenderFlag = 1 << 1
	FlagNoDiscard RenderFlag = 1 << 2
	FlagBorder    RenderFlag = 1 << 3
	FlagIsMTSDF   RenderFlag = 1 << 4
	FlagHalfGlow  RenderFlag = 1 << 5
)

Constants for RenderFlag.

type Sprite

type Sprite struct {
	S0, S1   float32
	T0, T1   float32
	X0, X1   float32
	Y0, Y1   float32
	S0u, S1u uint16
	T0u, T1u uint16
	// 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.

func (*Sprite) Crop added in v0.3.12

func (s *Sprite) Crop(left, top, right, bottom float32) *Sprite

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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