Oxygen Basic

Programming => Example Code => Topic started by: Peter on April 21, 2014, 04:10:24 AM

Title: Sdl Gravity
Post by: Peter on April 21, 2014, 04:10:24 AM
Deleted
Title: Re: Sdl Gravity
Post by: Mike Lobanovsky on April 21, 2014, 10:42:05 AM
Sorry Peter,

A scripted window just flashes for me momentarily in the Go (JIT) mode while a precompiled executable crashes in the ss.dll module on load.
Title: Re: Sdl Gravity
Post by: Aurel on April 21, 2014, 01:09:58 PM
Yes Peter ...Mike have a right
program compile OK but after that just crush because
something is wrong with function LoadImage

! LoadImage     Lib "ss.dll" (bstring iFile,sys frames) as sys

I tried few option but still not work...
Title: Re: Sdl Gravity
Post by: Aurel on April 21, 2014, 01:23:10 PM
Peter
Is your function use something like this:

Code: [Select]
// load sample.png into image
SDL_Surface *image;
SDL_RWops *rwop;
rwop=SDL_RWFromFile("sample.png", "rb");
image=IMG_LoadPNG_RW(rwop);
if(!image) {
    printf("IMG_LoadPNG_RW: %s\n", IMG_GetError());
    // handle error
}
Title: Re: Sdl Gravity
Post by: Mike Lobanovsky on April 21, 2014, 04:58:18 PM
Hello Peter,

Yes, these two latest scripts work nicely for me though SW.INC and SW.DLL are missing from the zip. I used earlier versions from your other submissions.

So the offending code was somewhere in the image loading routine?

P.S.
Quote
Hi Mike,
Try this.
Can someone confirm what Mike said ?

No way. Particle.exe crashes on load displaying a black window. That doesn't require somebody else's confirmation since it happens on all the three Windows platforms that I have. Three identities in perfect harmony - me, myself, and I.  ;)
Title: Re: Sdl Gravity
Post by: Aurel on April 22, 2014, 02:19:53 PM
Peter
I don't know ..i just found this in SDL documentation... :-\
Anyway last example with .bmp work grat  :D

And i don't see any faster exacution over GDI ..or maybe im wrong  ???
Title: Re: Sdl Gravity
Post by: Mike Lobanovsky on April 22, 2014, 03:24:06 PM
Yes Peter,

Bmp works perfect for me too, thank you!