トピック

#SPADD

I really like this forums section, apparently. Anyways, what is the "additive synthesis" in #SPADD? Because I want to know how to use it correctly.
0そうだね
プレイ済み
返信[1]
親投稿
Alex MrCashews
The #SPADD constant corresponds to a flag in the sprite attribute bits, which is the last argument to SPDEF or SPSET. By setting this flag, you set the sprite to add blending mode. What additive blending does is adds the color values of whatever draws under the sprite to the sprite itself. To give an example, if the sprite is red and is drawn over a blue background, it would look purple.
1そうだね
プレイ済み
返信[2]
親投稿
Alex MrCashews
Keep in mind that this model is based on RGB channel colors. Trying to add white to anything or anything to white will just be white again. Adding red to red would just be a brighter red, or the same red. It depends. E.g. if the background is RGB 10,10,10 and the sprite is RGB 5,20,0 then the sprite will be RGB 15,30,10 with add enabled.
1そうだね
プレイ済み
返信[3]
親投稿
*J.P.*[P]£ aj2003aj
thats cool! learned something new today!
0そうだね
プレイ済み
返信[4]
親投稿
i tried changing the color of the screen with BACKCOLOR and GCLS (using RGB values), but it still came up with just an invisible sprite.
0そうだね
プレイ済み
返信[5]
親投稿
Alex MrCashews
You have to use #SPSHOW+#SPADD
1そうだね
プレイ済み
返信[6]
親投稿
oh, ok. so basically, #SPADD is a way to give a brighter transparency to a sprite?
1そうだね
プレイ済み
返信[7]
親投稿
thanks for helping. now i can finally use #SPADD.
1そうだね
プレイ済み