0 Members and 1 Guest are viewing this topic.
All numbers in the numerical part of the system (ie not in the CAS) are BCD encoded.
EXPORT Sprite()BEGINFOR Z FROM 0 TO 239 DORECT_P(G0,304,Z,319,Z+1,RGB(INT(RANDOM(256)),Z,240-Z));END;WHILE 1 DOFOR X FROM 0 TO 18 DOFOR Y FROM 0 TO 14 DO16*INT(RANDOM(14))->V;BLIT_P(G0,16*X,16*Y,G0,304,V,320,V+16);END;END;END;END;
EXPORT spritetest2()BEGINDIMGROB_P(G1,120,48,RGB(0,0,0));TEXTOUT_P("HELLO",G1,0,0,7);FOR Z FROM 1 TO 800 DORECT_P(RGB(Z/4,Z/4,255));BLIT_P(G0,0,0,Z,Z,G1,RGB(80,255,255));WAIT(0.03);END;END;
EXPORT scrollingtest()BEGINDIMGROB_P(G1,800,800);FOR Z FROM 0 TO 800 DORECT_P(G1,0,Z,800,Z+1,RGB(INT(RANDOM(125)),INT(Z/7),0));END;FOR Z FROM 0 TO 800 STEP 4 DORECT_P(G1,Z,0,Z+1,800,RGB(INT(Z/6),INT(RANDOM(156)),INT(RANDOM(156))));END;0▶X;0▶Y;1▶Z;WHILE 1 DOY-(ISKEYDOWN(2))+(ISKEYDOWN(12))▶Y;X-(ISKEYDOWN(7))+(ISKEYDOWN(8))▶X;Z-(0.1*ISKEYDOWN(45))+(0.1*ISKEYDOWN(50))▶Z;BLIT_P(G0,0,0,INT(320/Z),INT(240/Z),G1,X,Y,320+X,240+Y);WAIT(0.02);END;END;
EXPORT Sprite()BEGINDIMGROB_P(G2,4,4,{ #7C0003E0001F0000:64, #0, #0, #7C0003E0001F0000:64 });BLIT_P(G0,20,20,100,100,G2,RGB(0,0,0));WAIT(3);END;
By the way, is there any image<>hex converter that supports A1R5G5B5 format or something that can convert JPEG/BMP/GIF to exactly that image format?
Quote from: DJ Omnimaga on August 12, 2013, 04:06:06 amBy the way, is there any image<>hex converter that supports A1R5G5B5 format or something that can convert JPEG/BMP/GIF to exactly that image format? Do you have any sample HEX strings? Just to see what endianness is needed. Once I got this I'll add an export option to my TI-Nspire sprite editor as Nspire Lua also uses A1R5G5B5 for its sprites.