Re: Type check failure (New problem now)

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

One thing I'd add, is that maybe it's a bit easier on the end user to put the bytes_to_int call inside your wrapper.

public constant xClearBackground = define_c_proc(ray,"+ClearBackground",{C_UINT}) 
 
public procedure ClearBackground(object col) 
 
  if sequence( col ) then 
    col = bytes_to_int( col ) 
  end if 
 
  c_proc(xClearBackground,{col}) 
	 
end procedure 
--Example 
without warning 
 
include flags.e 
include Euraylib.ew 
 
atom width = 800 
atom height = 450 
 
InitWindow(width,height,"Input") 
 
SetTargetFPS(60) 
 
while not WindowShouldClose() do 
 
	BeginDrawing() 
	 
	ClearBackground({0,255,0,255}) 
	 
	EndDrawing() 
	 
end while 
 
CloseWindow() 

-Greg

Thanks for the idea, Greg.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu