Re: Help Solving SDL2 Wrapper Example

new topic     » goto parent     » topic index » view thread      » older message » newer message

My bad, I'd been fixing things for Phix and forgot those you'd need, in particular points 5 and 6, and probably point 2.

1) enclose all "include std/*" with --/* and --*/, eg

--/* 
include std/machine.e 
--*/ 

2) both BasicEvent.exw and ColorWinDemo.exw contain "free(key)" which needs to be deleted.
3) insert "{} = " or similar before calls to SDL_UpdateWindowSurface, SDL_SetRenderDrawColor, SDL_RenderFillRect, and SDL_RenderClear
4) "format" is reserved in Phix, change atom format and all uses of it in WinImage.exw to (eg) atom fmt
5) also in WinImage.exw, change

procedure calc_rect(atom rect,integer sx,integer sy,integer tx,integer ty) 
 
 poke4(rect,sx) 
-- poke4(rect+2,sy) 
-- poke4(rect+4,tx) 
-- poke4(rect+6,ty) 
 poke4(rect+4,sy) 
 poke4(rect+8,tx) 
 poke4(rect+12,ty) 
     
end procedure 

6) and after x = SDL_BlitSurface(img,srect,surf,drect), change

--if x = 0 then 
if x != 0 then 

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu