Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug Reports
#21
Use REDIM or '$DYNAMIC. Plain ol' static DIM requires a constant, it's in the keyword file.
Reply
#22
i noted somthing strange while final finshing up my little pixl ploting fucation for sdl .

Pset screen ,X,Y,23+X,43+Y,X,255

everything works nice and good untill i add an extra verablie into the fucation like

Pset screen ,X,Y,23+X,43+Y,X + Y ,255
once i do this the compiler spits out stuff about

test2.asm: Assembler messages:
test2.asm:196: Error: Unrecognized token '(null)'
test2.asm:200: Error: Unrecognized token '(null)'
test2.asm:201: Error: Unrecognized token '(null)'
test2.asm:202: Error: Unrecognized token '(null)'
test2.asm:206: Error: Unrecognized token '(null)'
Reply
#23
ow, v1c i told you don't throw that bag of bugs onto ppl. post the entire source or put it on a server, otherwise v1c can't reproduce the error
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#24
Windows 98

If you have a graphical window focused, or are in fullscreen, inkey$ doesent work.. at all...

You have to select the console window to be able to press keys...


Annoying.. lots..
Reply
#25
ehm how do you generate the window? sdl?
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#26
defint a-z
option explicit

'$include: "sdl\sdl.bi"
'$include: "gl\gl.bi"
'$include: "gl\glu.bi

declare sub PSET (screen as SDL_Surface ptr , x as integer , y as integer, R as UBYTE , G as UBYTE, B as UBYTE, A as UBYTE)

dim screen as SDL_Surface ptr
dim a as string
Dim X as integer
Dim Y as integer
Dim T as UBYTE
screen = SDL_SetVideoMode( 640, 480, 32, SDL_HWSURFACE or SDL_DOUBLEBUF)
if screen = 0 then
SDL_Quit
end 1
end if



do
a = inkey$
if a = chr$(27) then exit do
SDL_LockSurface (screen)

For X = 1 to 100
for Y = 1 to 100
Pset screen ,X,Y,23+X,43+Y,X,255 ' <-- add +X +Y anywhere in
next ' the parmitor list or even
next ' a +10 or somthing

SDL_unlocksurface (screen)
SDL_Flip screen
loop

SDL_Quit
end


sub PSET (screen as SDL_Surface ptr , x as integer , y as integer, R as UBYTE , G as UBYTE, B as UBYTE, A as UBYTE)
dim cl as uinteger ptr
dim colkey as uinteger
dim Colptr as UBYTE ptr

colptr = @colkey : *colptr = R
colptr = @colkey + 1 : *colptr = G
colptr = @colkey + 2 : *colptr = B
colptr = @colkey + 3 : *colptr = A
cl = screen->pixels + y * screen->pitch + x * len( integer )
*cl = colkey
end sub
Reply
#27
Quote:ehm how do you generate the window? sdl?

Yes
Reply
#28
@zire well then inkey won't work, as it won't work if you do a win32 api window. cause as you create a window you also have to handle a message loop. i did a hack around that in my qbgfx legacy lib, sterling did so too in his lib, so you could still use inkey$ if you have a graphical window (would be like invoking SCREEN), but it won't work with pure sdl. that's not a bug, nor do you have to blame fb. that's windows programming
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#29
doesn't SDL have input handleing ?
Reply
#30
yeah and? whats the point? the thing is inkey$ is a runtime library function. it must be overwritten when you use sdl, or win32 api or whatever other graphical api that comes to your mind, that starts a message queue
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)