Team Ai
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes847downloads
SpriteRaw.txt40 linesDownload Raw Back to Graphics
1 2//Normally, you make sprites with <CTRL-r>.3//This shows how to build a sprite by hand.4//See ::/Apps/GrModels.5 6class MySprite7{ // See Sprite Elem Types8  CSpriteColor  color;9  CSpritePtPt   line1;10  CSpritePtPt   line2;11  CSpritePtPt   line3;12  CSpritePt     fill;13  CSpriteBase   end;14};15 16 17U0 SpriteRawDemo()18{19  MySprite s;20 21  MemSet(&s,0,sizeof(s));22  s.color.type=SPT_COLOR;23  s.color.color=GREEN;24  s.line1.type=SPT_LINE;25  s.line1.x2=100; s.line1.y2=50;26  s.line2.type=SPT_LINE;27  s.line2.x2=50; s.line2.y2=100;28  s.line3.type=SPT_LINE;29  s.line3.x1=100; s.line3.y1=50;30  s.line3.x2=50; s.line3.y2=100;31  s.fill.type=SPT_FLOOD_FILL;32  s.fill.x1=20; s.fill.y1=20;33  s.end.type=SPT_END;34 35  Sprite(&s);36  "%h13c",'\n';37}38 39SpriteRawDemo;40