Download Demo/Graphics/Collision.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Graphics/Collision.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Demo/Graphics/Collision.txt
-
curl -L -o Collision.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Graphics/Collision.txt
682 Bytes
| <1>/* Graphics Not Rendered in HTML */ | |
| <2>/* Graphics Not Rendered in HTML */ | |
| U0 DrawIt(CTask *task,CDC *dc) | |
| { | |
| I64 x,y; | |
| x=ms.pos.x-task->pix_left; | |
| y=ms.pos.y-task->pix_top; | |
| Sprite3(dc,x,y,0,<1>); | |
| x=task->pix_width>>1; | |
| y=task->pix_height>>1; | |
| dc->color=ROP_COLLISION; | |
| dc->bkcolor=WHITE; | |
| dc->collision_cnt=0; | |
| Sprite3(dc,x,y,0,<1>); | |
| dc->color=ROP_EQU; | |
| GrPrint(dc,0,(task->pix_height-FONT_HEIGHT)>>1, | |
| "Collisions:%d",dc->collision_cnt); | |
| if (!dc->collision_cnt) | |
| Sprite3(dc,x,y,0,<1>); | |
| else | |
| Sprite3(dc,x,y,0,<2>); | |
| } | |
| U0 Collision() | |
| { | |
| SettingsPush; //See SettingsPush | |
| Fs->draw_it=&DrawIt; | |
| PressAKey; | |
| SettingsPop; | |
| } | |
| Collision; | |