{"author_name":"qualia","cat":"LD #22","comments":[{"author_name":"JohnBedlam","time":"December 18, 2011 11:49 am","epoch":1324226940,"text":"I had the exact same problem. It has to do with alpha channels being applied instead of blitted or something.","spam":"N"}],"epoch":1324225740,"likes":0,"metadata":{"p_key":"60818","p_author":"qualia","p_authorkey":"505362","p_urlkey":"96571","p_title":"Uh-oh","p_cat":"LD #22","p_event":"LD22","p_time":"1324225740","p_likes":"0","p_comments":"1","p_status":"UPD5","us_key":"505362","us_name":"qualia","us_username":"qualia","event_start":"1323993600","event_key":"8","event_name":"LD22"},"text":"<p>Hit a massive snag with sprite-loading. We&#8217;re using transparent PNG spritesheets. For, say, the font, the SDL_Surface* _font is loaded, and displays as transparent with no problems.<\/p>\n <p>When blitting parts of _font onto an empty SDL surface, there is no transparency:<br \/>\n <code>SDL_Surface *surface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA, width, height, 32,0xff000000,0x00ff0000,0x0000ff00,0);<\/p>\n <p>SDL_BlitSurface(_font, &amp;srcRect, surface, &amp;destRect);<\/code><br \/>\n results in:<br \/>\n <a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/12\/18\/uh-oh-5\/screenshot-chelonian-island\/\" rel=\"attachment wp-att-96369\"><img src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/Screenshot-Chelonian-Island-289x300.png\" alt=\"\" width=\"289\" height=\"300\" class=\"alignleft size-medium wp-image-96369\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/Screenshot-Chelonian-Island-289x300.png 289w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/Screenshot-Chelonian-Island-550x570.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/Screenshot-Chelonian-Island.png 644w\" sizes=\"(max-width: 289px) 100vw, 289px\" \/><\/a><\/p>\n <p>I&#8217;ve tried every combination of masks imaginable, including _font-&gt;format-&gt;Rmask, etc., to no effect.<\/p>\n <p>If anyone has any idea what I&#8217;m doing wrong, I&#8217;d love to know, even though we&#8217;re very unlikely to make the jam deadline at this point.<\/p>","time":"December 18th, 2011 11:29 am","title":"Uh-oh"}