hschumann2/TempleOS-Source-Code
0832
1 2 3<1>/* Graphics Not Rendered in HTML */4 5 6 7 8I64 x=0;9 10U0 DrawIt(CTask *,CDC *dc)11{12 Sprite3(dc,x%100,100,0,<1>);13}14 15U0 KeyDownBitMapDemo()16{17//This conversion routine is slow.18 I64 i_sc=Char2ScanCode('i');19 20 "Press and hold $GREEN$'i'$FG$.\n";21 while (!Bt(kbd.down_bitmap,i_sc))22 Yield;23 24 SettingsPush; //See SettingsPush25 Fs->draw_it=&DrawIt;26 27 //kbd.down_bitmap is indexed with the28 //merged scan code. (left shift and29 //right shift combined for example.)30 //kbd.down_bitmap2 is indexed with the31 //distinct scan code. See Char and Scan Codes.32 33 while (Bt(kbd.down_bitmap,i_sc)) {34 x++;35 Sleep(10);36 }37 SettingsPop;38 FlushMsgs;39}40 41KeyDownBitMapDemo;42 