Re: TileEngine Wrapper Issue

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

Ah I see. Well that makes more sense. Also, I wasn't trying to jab at you, I was just saying.

Lol I know, it's all in good fun.

Icy_Viking said...

I'm surprised Robert Craig didn't think of adding in some sorta struct type when he adding the ability to wrap DLLs in Euphoria. I know there is a simple way to wrap structs or use them through peek and poke, etc, but its still pretty primitive compared to other programming languages.

I think that under Rob's direction there just wasn't as much incentive to add that kind of feature compared to today. Especially when everything was 32-bit it might have been not "much" work, but trying to support 32-bit and 64-bit requires using ifdef blocks and effectively wrapping most structures twice. Yikes!

Icy_Viking said...

Anyways I've almost got an example going except nothing shows up on the window.

One thing I can help you with is this:

TLN_CreateWindow("",0) --NOTE: Adding NULL caused it to crash 

Allow the overlay parameter to be an object and then check if it's a sequence and then allocate it into memory if necessary.

public constant xTLN_CreateWindow = define_c_func(tile,"+TLN_CreateWindow",{C_POINTER,C_INT},C_BOOL) 
 
 
public function TLN_CreateWindow(object overlay,integer flags) 
 
 if sequence(overlay) then 
  overlay = allocate_string(overlay,1) 
 end if 
  
 return c_func(xTLN_CreateWindow,{overlay,flags}) 
	 
end function 
Icy_Viking said...

The above example almost works, except the map doesn't show, its just a blank window.

I will test it out when I have some time and see if I can track down the issue.

-Greg

Thanks Greg. Your notes are always helpful.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu