? How to edit GLOAD array (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

How to edit GLOAD array

  • #1 ✎ 175 DFrost Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength when you edit a GLOAD array and render it, its distorted. What custom function would you use to edit it? Posted
  • #2 ✎ 194 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Weird, it doesn't happen... for me... Wait, did you use something like PUSH or POP? Editing the array with Array[Offset]=Color works fine and won't distort the image. Posted
  • #3 ✎ 175 DFrost Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength OK just for an example I have a GSAVE array of the strawberry(GRP4) I FILL it with #RED and GLOAD it at (0,0) now the strawberry is transparent insead of filled with red. Posted
  • #4 ✎ 194 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself It depends on the "Color conversion flag". #RED is treated as hex 0×FFF80000. Using 16-bits (flag is 1) rather than 32 (flag is 0), it will push #RED into the 16-bit range therefore making it transparent (It is 0x0000 then). You'd need a 16-bit color code which there are no constants for it. Instead you can use these commonly found in FONTDEF strings. Examples: 16-bit RED: &HF801 16-bit WHITE: &HFFFF 16-bit BLUE: &H00FF ... Fun fact: I actually made a DEF privately that allows you to use 16-bit color codes that it converts to the 32-bit logical version. You either have the flag set to 0 (use 32-bit colors) or you have to use 16-bit colors with the flag set to 1. Posted Edited by CyberYoshi64