The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Transparency Pixel colour for Sprites on HP Prime
05-20-2021, 09:35 PM
Post: #1
Transparency Pixel colour for Sprites on HP Prime
I had a look here:
https://www.omnimaga.org/hp-calculator-p...hp-prime)/

And downloaded the suggested program in the second post, DIMGROB generator.

I generated a sprite, and assumed that the corners of the ball would be transparent, but they are white, on top of the calc screen:

Code:
EXPORT ball()
BEGIN
    LOCAL COORD:={};
    LOCAL J,K,S,J1,K1;
    J:=160;
    K:=120;
    J1:=J;
    K1:=K;
  DIMGROB_P(G1, 22, 22, {#8000800080008000:64h ,#7FFF800080008000:64h ,#529452946318739C:64h ,#80007FFF6B5A5AD6:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#84252947BDD:64h ,#421000000000000:64h ,#800080007BDE318C:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#56B55EF667387BDE:64h ,#2D6B35AD42104A51:64h ,#739C5EF756B54A52:64h ,#800080007BDE739C:64h ,#8000800080008000:64h ,#56B45AD57BDE8000:64h ,#77BC739B6B5A6318:64h ,#7FFF7FFF739C77BD:64h ,#6F7B77BD7FFF7FFF:64h ,#800080007FFF7BDE:64h ,#252977BD80008000:64h ,
   #6B5967385F173DEF:64h ,#6F7A739C6F7B6B7A:64h ,#7FFF7FFF7BDE7BDD:64h ,#52943DEF77BD7FFF:64h ,#7FFF800080007FFF:64h ,#5EF74E72000035AD:64h ,#739C6B5A6B596738:64h ,#7BDE7BDE631877BC:64h ,#7FFF7FFF7FFF7FFF:64h ,#80006B5A08424A52:64h ,#108404216B5A8000:64h ,#6B5963185EF656D5:64h ,
   #108325296738739B:64h ,#7BDE7FFF7BDE4E73:64h ,#C636B5A7FFF7BDE:64h ,#3DEF80008000294A:64h ,#5AD55AD525290000:64h ,#84246306B7A6318:64h ,#2D6B000000000000:64h ,#739C77BC7BDE6B59:64h ,#6F7B042104216318:64h ,#463000001CE77BDE:64h ,#29495AD65AD55AD5:64h ,#0:64h ,
   #4E720C6300000000:64h ,#294A739B6B596739:64h ,#4216F7B4E730000:64h ,#5AD556B45AD52108:64h ,#C625EF6:64h ,#0:64h ,#6F7B77BD3DEF0000:64h ,#318C00005F17739B:64h ,#56B4463108626739:64h ,#294A5EF756B456B4:64h ,#0:64h ,#5AD6000000000000:64h ,#6F7B6B596B5A739B:64h ,
   #39CD6F7B25292949:64h ,#56B452B452935293:64h ,#420F5AF6:64h ,#0:64h ,#6B596B5A6B5914A5:64h ,#5EF656B467396739:64h ,#52934E724A5277BD:64h ,#52B456B556B45293:64h ,#842:64h ,#6F7A318C00000000:64h ,#5F17631867386739:64h ,#52937BDE673956B4:64h ,#52935293529352B4:64h ,
   #842294A5AD552B4:64h ,#14A510840C630C62:64h ,#5EF65F1767384E72:64h ,#6F7B4E725AD55AF6:64h ,#5EF656B45EF67FFF:64h ,#529352B456B456B5:64h ,#56B4529452934E72:64h ,#5AD556B45EF65AD5:64h ,#5AF65EF65AD65EF6:64h ,#77BD80007BDE5EF6:64h ,#5EF65AD639CD35AD:64h ,#5AD55AD552935AD5:64h ,
   #5AD55AD55AD55AD5:64h ,#6338673856B456B5:64h ,#7FFF6317318C56B4:64h ,#10843DEF80008000:64h ,#56D556B446302529:64h ,#5AF65AD65AD55AD5:64h ,#56B45EF65EF65EF6:64h ,#294A212935AD4A72:64h ,#8000800080006F7B:64h ,#10840C632529739C:64h ,#56B556D556B42528:64h ,#5AD55AD55AD556D5:64h ,
   #1CE718C642305EF6:64h ,#800080005EF72529:64h ,#6F7B800080008000:64h ,#2108042108422529:64h ,#56B456B456B456B4:64h ,#14A542305AD556B4:64h ,#800056B5252918C6:64h ,#8000800080008000:64h ,#3DEF77BD80008000:64h ,#4E721CE7042114A5:64h ,#3DEE52944E934E93:64h ,#631835AD20E814A5:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#4210673980008000:64h ,#4A514A5146302D6B:64h ,#5AD635AD39CE4A51:64h ,#80008000800077BD:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#6F7B7BDD80008000:64h ,#739C6B5A6B596B59:64h ,#8000800080007BDE:64h ,#8000800080008000:64h });

DIMGROB_P(G2, 22, 22, {#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,#8000800080008000:64h ,
   #8000800080008000:64h ,#8000800080008000:64h });


REPEAT

    BLIT_P(G2,J1,K1);       //TRANSPARENT PIXELS THE SAME SIZE AS BALL (ERASE BALL)
    BLIT_P(G1,J,K);        //DRAW BALL
    J1:=J;                  //STORE PREVIOUS LOCATION
    K1:=K;                 //      "            "              "
    WAIT(0.005);        //WAIT A BIT TO LET THE USER APPRECIATE THE SPRITE
 REPEAT
  IF ISKEYDOWN(7) THEN J:=J-1;S:=1; END;                //CURSOR KEY MOVEMENTS
  IF ISKEYDOWN(8) THEN J:=J+1;S:=1; END;
  IF ISKEYDOWN(2) THEN K:=K-1;S:=1; END;
  IF ISKEYDOWN(12) THEN K:=K+1;S:=1; END;
  UNTIL S=1;
  S:=0;
UNTIL 0;
    
END;


Is there another colour code that actually will appear transparent on top of the screen, and is there a way to have the ball not wipe out the screen on G0?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Transparency Pixel colour for Sprites on HP Prime - matalog - 05-20-2021 09:35 PM



User(s) browsing this thread: 2 Guest(s)