Oxygen Basic
Programming => Example Code => Topic started by: Peter on October 25, 2010, 09:22:53 AM
-
Deleted
-
Many Thanks Peter!
This is a very significant first for Oxygen.
My survival time is around 4 seconds - I might improve with practice. In between bouts of hardcore programming.
Your game works fine on my PC with Alpha018 but not with Alpha019 which I am working on at present. 019 has had a complete rework of the string management and garbage collection system correcting a few more memory leaks.. So I would advise including Alpha018 Oxygen.dll with your game as a complete package. I will Also retain 018 on SourceForge for a while.
Charles
-
Thanks Peter.
O2 can read C headers but It will be good to have a cmpact 'MinWin' with all the essentials for accessing the Windows API.
I wonder if Linux uses the same keyboard mappings. - if most of these are scan-codes direct from the keyboard..
Charles
-
Very cool Peter. Ran smoothly here and is fun. I have yet to beat it, but got close, got all the yellow pills and atoms, couldn't lay any bombs, so I am doing something wrong. Got killed trying to lay a bomb.
-
Hi Peter,
Oxygen strings are dynamic - which means indirect bstring. Try this:
Dim song as long
Dim snd as string
snd = "tada.wav"
song = *snd
push 1
push 0
push song
call PlaySound
-
You could use a zstring buffer instead:
Dim song as long
Dim snd[128] as zstring
snd = "tada.wav"
song = &snd
push 1
push 0
push song
call PlaySound
or even a string literal:
push 1
push 0
"tada.wav"
push eax
call PlaySound
Charles