"Image does not exist"


👉Blast3D is now FREE👈

Support Future Updates by Becoming a Blitz Backer on Patreon.

 

Tweet
dispenacode

Hello. It's been a while :D
I kinda need help urgently... You should recognise some of this code, it is the menu for the Wings Ring game
My two images jammit1.png & jammit2.png (depicting the background) are the main problem: They work, until I change either the window or resolution through the options menu.
It gives me a crash, and I'm wondering what's wrong with my code?

;Globals

AppTitle "Mouse Obby!"

Global width=1024,height=768,depth=32,mode=1
Graphics3D width,height,depth,mode
SetBuffer BackBuffer()

SeedRnd MilliSecs()

; --------------
; Menu variables
; --------------

; Menu background & images
Global jammit1,logo_width,logo_height,tile_y    ; Logo-related variables
Global jammit2,logo_width2,logo_height2,tile_y2
Global jammitPath$ = "media\jammit.png"
Global psx
Global pso

; Menu text spacing
Global y_space#=height/18,option=4,screen
Global x_space=width/71,x_nos=((width/4)-((9*3)/2)),x_names=((width/2)-((9*5)/2)),x_scores=((width/1.33)-((9*5)/2))

; Graphics modes
Global count_gfx_modes=CountGfxModes(),gfx_mode_option,mode_option=1

; Arrays
Dim gfx_modes(0,2)
Dim names$(11),scores(11) : scores(11)=0

; High score rank
Global rank

; Fonts
Global small_font,large_font
large_font=LoadFont("Blitz",48,True)
small_font=LoadFont("Blitz",16)

; Title colour change
Global r = 255: Global g = 255: Global b = 255
Global gcnt = 0

; Music
Global music

; Sounds
Global explode

; GetPort
Global JoyPort = 0

; Input Delay to reduce sensitivity
Global readytogo

; Create 3D cube for screen transition
Global skrcube,menucam

Global Debug=True

InitMenus()

While Not KeyHit(1)
;Cls

    Background()

    ; Screen functions
    Select screen
        Case 4 : Startcubetrans;no_players=1 : Game()
        Case 5 : HighScores()
        Case 6 : Options()
        Case 7 : Quit()

        Default : Credits()
    End Select
        ;Text"Button pressed:", + button,1

    UpdateWorld
    Flip

    Cls
Wend

End ; End of program.

Function InitMenus()

    For i = 1 To 2
        ; Load logo/get info
        jammit = LoadImage("media\jammit" + (i) + ".png") ; Load background 'block'
        logo_width = ImageWidth(jammit)
        logo_height = ImageHeight(jammit)

        ; Store the loaded images in global variables
        If i = 1 Then
            jammit1 = jammit
        Else
            jammit2 = jammit
        EndIf
    Next

    ; ps symbols
     psx = LoadImage("media\psex.png")
     pso = LoadImage("media\pso.png")

    ; Get graphics mode info
    count_gfx_modes=CountGfxModes()

    For g=1 To count_gfx_modes
        If GfxMode3D(g)=True Then gm3d=gm3d+1
    Next

    Dim gfx_modes(gm3d,2) : gm3d=0

    For g=1 To count_gfx_modes
        If GfxMode3D(g)=True
            gg=gg+1
            gfx_modes(gg,0)=GfxModeWidth(g)
            gfx_modes(gg,1)=GfxModeHeight(g)
            gfx_modes(gg,2)=GfxModeDepth(g)
            If gfx_modes(gg,0)=width And gfx_modes(gg,1)=height And gfx_modes(gg,2)=GraphicsDepth() Then gfx_mode_option=gg
        EndIf
    Next

    ; Load high score data
    load_file=ReadFile("media\high_scores.sav")
    For s=1 To 10
        names$(s)=ReadLine(load_file)
        scores(s)=ReadLine(load_file)
    Next
    CloseFile load_file

    ; Play music
    ;music=PlayMusic("media\tune1.mid")
    music=PlayMusic("media\i dont got.mp3")

    ; 3D
    skrcube = CreateCube()
    menucam = CreateCamera()

End Function

; -------------------
; Background function
; -------------------

Global current_image = 1 ; Variable to track which image is currently being displayed

Function Background()
    ; Display the current image
    If current_image = 1 Then
        TileImage jammit1, 0, tile_y
    Else
        TileImage jammit2, 0, tile_y
    EndIf

    ; Increment the tile_y for scrolling effect
    tile_y = tile_y + 2

    ; Switch images when tile_y exceeds 2000
    If tile_y > 2000 Then
        tile_y = 0 ; Reset tile_y
        current_image = 1 - current_image ; Switch between 1 and 2!!
    EndIf

    ; Debug output
If Debug = True
    Color 255, 255, 255
    Text 10, 10, "Current Image: " + current_image
    Text 10, 30, "Tile Y: " + tile_y
    Text 10, 50, "Screen + Option: " + screen + "" + option

button$="No"
For t = 1 To 20
    If JoyDown(t, JoyPort) Then button$=Str(t)
Next
Text 0,0, button$ + " joystick button pressed!"
EndIf
End Function
; ----------------
; Credits function
; ----------------
Function Quit()
;White text first
Debug = False
SetFont large_font
Color 0,0,0
Text (width/2)+1,(y_space*1)+1,"Are you sure you want to quit the game?",1

Color 255,255,255
Text (width/2)+0,(y_space*1)+0,"Are you sure you want to quit the game?",1
;Shadow text

;controller icons
SetFont small_font
DrawImage psx,(width/4)+1,(y_space*5)+1
Color 0,0,0
Text (width/4)-20+1,(y_space*8)+10+1,"Press square to return to menu"
Color 255,255,255
Text (width/4)-20+0,(y_space*8)+10+0,"Press square to return to menu"

DrawImage pso,(width/2)+100,(y_space*5)+1
Color 0,0,0
Text (width/2)+1,(y_space*8)+10+1,"Press circle to quit the application"
Color 255,255,255
Text (width/2)+0,(y_space*8)+10+0,"Press circle to quit the application"

    Delay 40
    If JoyDown(1, JoyPort) = True
    option = 4 : screen = 0 : Debug = True
    ;Credits(); Back
    EndIf
    If JoyDown(3, JoyPort) Then RuntimeError("lol ur gay") ;Kike symbol
    If option>7 Then option=7
    If option<4 Then option=4

    ; Enter option
    ;If JoyDown(3, JoyPort)=True
        ;;If option=1 Then ExecFile "http://www.si-design.co.uk/index.htm?referrer=wing_ring"
        ;If option=2 Then ExecFile "http://www.blitzbasic.com"
        ;If option=3 Then ExecFile "http://www.blitz3d.co.uk/index.htm?referrer=wing_ring"
        ;If option>3 Then screen=option
    ;EndIf

End Function

Function Startcubetrans()
PositionEntity skrcube,0,0,0
End Function

Function Credits()

    ; Shadow text
    SetFont large_font
    ;Color r,g,b
    Color 0,0,0
    Text (width/2)+1,(y_space*1)+1,"Mouse Obby 3D",1
    SetFont small_font
    ;Color 0,0,0
    Text (width/2)+1,(y_space*3)+1,"Credits",1
    Text (width/2)+1,(y_space*5)+1,"By Chika",1
    Text (width/2)+1,(y_space*6)+1,"For College",1
    Text (width/2)+1,(y_space*9)+1,"In Blitz3D",1
    If option=1 Then Text (width/2)+1,(y_space*7)+1,"> www.blitzbasic.org <",1 Else Text (width/2)+1,(y_space*7)+1,"www.blitzbasic.org",1
    If option=2 Then Text (width/2)+1,(y_space*10)+1,"> www.syntaxbomb.com <",1 Else Text (width/2)+1,(y_space*10)+1,"www.syntaxbomb.com",1
    If option=3 Then Text (width/2)+1,(y_space*11)+1,"> www.blitz3d.co.uk <",1 Else Text (width/2)+1,(y_space*11)+1,"www.blitz3d.co.uk",1
    If option=4 Then Text (width/2)+1,(y_space*13)+1,"> New Game <",1 Else Text (width/2)+1,(y_space*13)+1,"New Game",1
    If option=5 Then Text (width/2)+1,(y_space*14)+1,"> High Scores <",1 Else Text (width/2)+1,(y_space*14)+1,"High Scores",1
    If option=6 Then Text (width/2)+1,(y_space*15)+1,"> Options <",1 Else Text (width/2)+1,(y_space*15)+1,"Options",1
    If option=7 Then Text (width/2)+1,(y_space*16)+1,"> Quit <",1 Else Text (width/2)+1,(y_space*16)+1,"Quit",1

    ; White text
    SetFont large_font
    Color r,g,b
    ;Color 255,255,255
    Text (width/2)+0,(y_space*1)+0,"Mouse Obby 3D",1

    If MilliSecs() - oldtime > 1 Then
        r = r - Rand(1,10)
        If r < 0 Then r = Rand(0, 255)

        g = g - Rand(1,10)
        If g < 0 Then g = Rand(0, 255)

        b = b - Rand(1,10)
        If b < 0 Then b = Rand(0, 255)
        oldtime = MilliSecs()
         ; Update oldtime only when colors are changed
    EndIf

    SetFont small_font
    Color 255,255,255
    Text (width/2)+0,(y_space*3)+0,"Credits",1
    Text (width/2)+0,(y_space*5)+0,"By Chika",1
    Text (width/2)+0,(y_space*6)+0,"For College",1
    Text (width/2)+0,(y_space*9)+0,"In Blitz3D",1
    If option=1 Then Text (width/2)+0,(y_space*7)+0,"> www.blitzbasic.org <",1 Else Text (width/2)+0,(y_space*7)+0,"www.blitzbasic.org",1
    If option=2 Then Text (width/2)+0,(y_space*10)+0,"> www.syntaxbomb.com <",1 Else Text (width/2)+0,(y_space*10)+0,"www.syntaxbomb.com",1
    If option=3 Then Text (width/2)+0,(y_space*11)+0,"> www.blitz3d.co.uk <",1 Else Text (width/2)+0,(y_space*11)+0,"www.blitz3d.co.uk",1
    If option=4 Then Text (width/2)+0,(y_space*13)+0,"> New Game <",1 Else Text (width/2)+0,(y_space*13)+0,"New Game",1
    If option=5 Then Text (width/2)+0,(y_space*14)+0,"> High Scores <",1 Else Text (width/2)+0,(y_space*14)+0,"High Scores",1
    If option=6 Then Text (width/2)+0,(y_space*15)+0,"> Options <",1 Else Text (width/2)+0,(y_space*15)+0,"Options",1
    If option=7 Then Text (width/2)+0,(y_space*16)+0,"> Quit <",1 Else Text (width/2)+0,(y_space*16)+0,"Quit",1

    ; Up/down option
    ;Delay 40
    If JoyDown(4, JoyPort) Then option=option-1 ;Tri Symbol
    If JoyDown(2, JoyPort) Then option=option+1 ;X Symbol
    If option>7 Then option=7
    If option<4 Then option=4

    ; Enter option
    If JoyDown(3, JoyPort)=True
        If option=1 Then ExecFile "http://www.si-design.co.uk/index.htm?referrer=wing_ring"
        If option=2 Then ExecFile "http://www.blitzbasic.com"
        If option=3 Then ExecFile "http://www.blitz3d.co.uk/index.htm?referrer=wing_ring"
        If option>3 Then screen=option
    EndIf

End Function

; -------------------
; Highscores function
; -------------------

Function HighScores()

    ; Shadow text
    Color 0,0,0
    Text (width/2)+1,(y_space*1)+1,"Mouse Obby 3D",1
    Text (width/2)+1,(y_space*3)+1,"High Scores",1
    If option=1 And rank=1 Then Text x_nos-17,(y_space*5)+1,"> 1." Else Text x_nos+1,(y_space*5)+1,"1."
    If option=1 And rank=2 Then Text x_nos-17,(y_space*6)+1,"> 2." Else Text x_nos+1,(y_space*6)+1,"2."
    If option=1 And rank=3 Then Text x_nos-17,(y_space*7)+1,"> 3." Else Text x_nos+1,(y_space*7)+1,"3."
    If option=1 And rank=4 Then Text x_nos-17,(y_space*8)+1,"> 4." Else Text x_nos+1,(y_space*8)+1,"4."
    If option=1 And rank=5 Then Text x_nos-17,(y_space*9)+1,"> 5." Else Text x_nos+1,(y_space*9)+1,"5."
    If option=1 And rank=6 Then Text x_nos-17,(y_space*10)+1,"> 6." Else Text x_nos+1,(y_space*10)+1,"6."
    If option=1 And rank=7 Then Text x_nos-17,(y_space*11)+1,"> 7." Else Text x_nos+1,(y_space*11)+1,"7."
    If option=1 And rank=8 Then Text x_nos-17,(y_space*12)+1,"> 8." Else Text x_nos+1,(y_space*12)+1,"8."
    If option=1 And rank=9 Then Text x_nos-17,(y_space*13)+1,"> 9." Else Text x_nos+1,(y_space*13)+1,"9."
    If option=1 And rank=10 Then Text x_nos-17,(y_space*14)+1,"> 10." Else Text x_nos+1,(y_space*14)+1,"10."
    Text x_names+1,(y_space*5)+1,names$(1)
    Text x_names+1,(y_space*6)+1,names$(2)
    Text x_names+1,(y_space*7)+1,names$(3)
    Text x_names+1,(y_space*8)+1,names$(4)
    Text x_names+1,(y_space*9)+1,names$(5)
    Text x_names+1,(y_space*10)+1,names$(6)
    Text x_names+1,(y_space*11)+1,names$(7)
    Text x_names+1,(y_space*12)+1,names$(8)
    Text x_names+1,(y_space*13)+1,names$(9)
    Text x_names+1,(y_space*14)+1,names$(10)
    If option=1 And rank=1 Then Text x_scores+1,(y_space*5)+1,scores(1)+" <" Else Text x_scores+1,(y_space*5)+1,scores(1)
    If option=1 And rank=2 Then Text x_scores+1,(y_space*6)+1,scores(2)+" <" Else Text x_scores+1,(y_space*6)+1,scores(2)
    If option=1 And rank=3 Then Text x_scores+1,(y_space*7)+1,scores(3)+" <" Else Text x_scores+1,(y_space*7)+1,scores(3)
    If option=1 And rank=4 Then Text x_scores+1,(y_space*8)+1,scores(4)+" <" Else Text x_scores+1,(y_space*8)+1,scores(4)
    If option=1 And rank=5 Then Text x_scores+1,(y_space*9)+1,scores(5)+" <" Else Text x_scores+1,(y_space*9)+1,scores(5)
    If option=1 And rank=6 Then Text x_scores+1,(y_space*10)+1,scores(6)+" <" Else Text x_scores+1,(y_space*10)+1,scores(6)
    If option=1 And rank=7 Then Text x_scores+1,(y_space*11)+1,scores(7)+" <" Else Text x_scores+1,(y_space*11)+1,scores(7)
    If option=1 And rank=8 Then Text x_scores+1,(y_space*12)+1,scores(8)+" <" Else Text x_scores+1,(y_space*12)+1,scores(8)
    If option=1 And rank=9 Then Text x_scores+1,(y_space*13)+1,scores(9)+" <" Else Text x_scores+1,(y_space*13)+1,scores(9)
    If option=1 And rank=10 Then Text x_scores+1,(y_space*14)+1,scores(10)+" <" Else Text x_scores+1,(y_space*14)+1,scores(10)
    If option=0 Then Text (width/2)+1,(y_space*16)+1,"> Back <",1 Else Text (width/2)+1,(y_space*16)+1,"Back",1

    ; White text
    Color 255,255,255
    Text (width/2)+0,(y_space*1)+0,"Mouse Obby 3D",1
    Text (width/2)+0,(y_space*3)+0,"High Scores",1
    If option=1 And rank=1 Then Text x_nos-18,(y_space*5)+0,"> 1." Else Text x_nos+0,(y_space*5)+0,"1."
    If option=1 And rank=2 Then Text x_nos-18,(y_space*6)+0,"> 2." Else Text x_nos+0,(y_space*6)+0,"2."
    If option=1 And rank=3 Then Text x_nos-18,(y_space*7)+0,"> 3." Else Text x_nos+0,(y_space*7)+0,"3."
    If option=1 And rank=4 Then Text x_nos-18,(y_space*8)+0,"> 4." Else Text x_nos+0,(y_space*8)+0,"4."
    If option=1 And rank=5 Then Text x_nos-18,(y_space*9)+0,"> 5." Else Text x_nos+0,(y_space*9)+0,"5."
    If option=1 And rank=6 Then Text x_nos-18,(y_space*10)+0,"> 6." Else Text x_nos+0,(y_space*10)+0,"6."
    If option=1 And rank=7 Then Text x_nos-18,(y_space*11)+0,"> 7." Else Text x_nos+0,(y_space*11)+0,"7."
    If option=1 And rank=8 Then Text x_nos-18,(y_space*12)+0,"> 8." Else Text x_nos+0,(y_space*12)+0,"8."
    If option=1 And rank=9 Then Text x_nos-18,(y_space*13)+0,"> 9." Else Text x_nos+0,(y_space*13)+0,"9."
    If option=1 And rank=10 Then Text x_nos-18,(y_space*14)+0,"> 10." Else Text x_nos+0,(y_space*14)+0,"10."
    Text x_names+0,(y_space*5)+0,names$(1)
    Text x_names+0,(y_space*6)+0,names$(2)
    Text x_names+0,(y_space*7)+0,names$(3)
    Text x_names+0,(y_space*8)+0,names$(4)
    Text x_names+0,(y_space*9)+0,names$(5)
    Text x_names+0,(y_space*10)+0,names$(6)
    Text x_names+0,(y_space*11)+0,names$(7)
    Text x_names+0,(y_space*12)+0,names$(8)
    Text x_names+0,(y_space*13)+0,names$(9)
    Text x_names+0,(y_space*14)+0,names$(10)
    If option=1 And rank=1 Then Text x_scores+0,(y_space*5)+0,scores(1)+" <" Else Text x_scores+0,(y_space*5)+0,scores(1)
    If option=1 And rank=2 Then Text x_scores+0,(y_space*6)+0,scores(2)+" <" Else Text x_scores+0,(y_space*6)+0,scores(2)
    If option=1 And rank=3 Then Text x_scores+0,(y_space*7)+0,scores(3)+" <" Else Text x_scores+0,(y_space*7)+0,scores(3)
    If option=1 And rank=4 Then Text x_scores+0,(y_space*8)+0,scores(4)+" <" Else Text x_scores+0,(y_space*8)+0,scores(4)
    If option=1 And rank=5 Then Text x_scores+0,(y_space*9)+0,scores(5)+" <" Else Text x_scores+0,(y_space*9)+0,scores(5)
    If option=1 And rank=6 Then Text x_scores+0,(y_space*10)+0,scores(6)+" <" Else Text x_scores+0,(y_space*10)+0,scores(6)
    If option=1 And rank=7 Then Text x_scores+0,(y_space*11)+0,scores(7)+" <" Else Text x_scores+0,(y_space*11)+0,scores(7)
    If option=1 And rank=8 Then Text x_scores+0,(y_space*12)+0,scores(8)+" <" Else Text x_scores+0,(y_space*12)+0,scores(8)
    If option=1 And rank=9 Then Text x_scores+0,(y_space*13)+0,scores(9)+" <" Else Text x_scores+0,(y_space*13)+0,scores(9)
    If option=1 And rank=10 Then Text x_scores+0,(y_space*14)+0,scores(10)+" <" Else Text x_scores+0,(y_space*14)+0,scores(10)
    If option=0 Then Text (width/2)+0,(y_space*16)+0,"> Back <",1 Else Text (width/2)+0,(y_space*16)+0,"Back",1

    ; Input routine

    If rank>=1 And rank<=10
    gk=GetKey()

        If Len(names$(rank))<=4 Or gk=8 ; If size of string is less than six characters long or backspace key is pressed

        Select gk
            Case 0 ; Nothing! Just stops no key press (0) being used with the default option which results in ||| being shown
            Case 13 ; Stops return key being used
            Case 28 ; Stops up cursor key being used
            Case 29 ; Stops down cursor key being used
            Case 8 : If Len(names$(rank))>0 Then names$(rank)=Left$(names$(rank),Len(names$(rank))-1)                   
            Default : names$(rank)=names$(rank)+Chr$(gk)
        End Select

        EndIf

    EndIf

    ; Up/down option
    Delay 40
    If JoyDown(4, JoyPort) Then option=option-1
    If JoyDown(2, JoyPort) Then option=option+1

    ; Choice of options depending on whether high score is yet to be entered or not
    If rank<1 Or rank>10
        If option>0 Then option=0
        If option<0 Then option=0
    Else
        If option>1 Then option=0
        If option<0 Then option=1
    EndIf

    ; Enter option

    If JoyDown(3, JoyPort)=True

        If option=0 Then screen=option : option=6 ; Back

        ; Save scores
        If option=1
            save_file=WriteFile("high_scores.sav")
            For s=1 To 10
                WriteLine save_file,names$(s)
                WriteLine save_file,scores(s)
            Next
            CloseFile save_file
            rank=11
        EndIf

    EndIf

End Function

; ----------------
; Options function
; ----------------

Function Options()

    kh=JoyHit(1,JoyPort)

    ; Shadow text

    Color 0,0,0

    Text (width/2)+1,(y_space*1)+1,"Mouse Obby 3D",1
    Text (width/2)+1,(y_space*3)+1,"Options",1
    Text (width/2)+1,(y_space*5)+1,"Graphics Mode:",1
    Text (width/2)+1,(y_space*8)+1,"Windowed:",1

    If option=1
        Text (width/2)+1,(y_space*6)+1,">"+gfx_modes(gfx_mode_option,0)+"x"+gfx_modes(gfx_mode_option,1)+"x"+gfx_modes(gfx_mode_option,2)+"<",1
    Else
        Text (width/2)+1,(y_space*6)+1,gfx_modes(gfx_mode_option,0)+"x"+gfx_modes(gfx_mode_option,1)+"x"+gfx_modes(gfx_mode_option,2),1
    EndIf

    If option=2
        If Windowed3D()=False
            Text (width/2)+1,(y_space*9)+1,"> Unavailable <",1
        Else
            If mode_option=1 Then Text (width/2)+1,(y_space*9)+1,"> No <",1
            If mode_option=2 Then Text (width/2)+1,(y_space*9)+1,"> Yes <",1
        EndIf
    Else
        If Windowed3D()=False
            Text (width/2)+1,(y_space*9)+1,"Unavailable",1
        Else
            If mode_option=1 Then Text (width/2)+1,(y_space*9)+1,"No",1
            If mode_option=2 Then Text (width/2)+1,(y_space*9)+1,"Yes",1
        EndIf
    EndIf

    If option=0 Then Text (width/2)+1,(y_space*16)+1,"> Press Square to go Back <",1 Else Text (width/2)+1,(y_space*16)+1,"Back",1

    ; White text

    Color 255,255,255

    Text (width/2)+0,(y_space*1)+0,"Mouse Obby 3D",1
    Text (width/2)+0,(y_space*3)+0,"Options",1
    Text (width/2)+0,(y_space*5)+0,"Graphics Mode:",1
    Text (width/2)+0,(y_space*8)+0,"Windowed:",1

    If option=1
        Text (width/2)+0,(y_space*6)+0,">"+gfx_modes(gfx_mode_option,0)+"x"+gfx_modes(gfx_mode_option,1)+"x"+gfx_modes(gfx_mode_option,2)+"<",1
    Else
        Text (width/2)+0,(y_space*6)+0,gfx_modes(gfx_mode_option,0)+"x"+gfx_modes(gfx_mode_option,1)+"x"+gfx_modes(gfx_mode_option,2),1
    EndIf

    If option=2
        If Windowed3D()=False
            Text (width/2)+0,(y_space*9)+0,"> Unavailable <",1
        Else
            If mode_option=1 Then Text (width/2)+0,(y_space*9)+0,"> No <",1
            If mode_option=2 Then Text (width/2)+0,(y_space*9)+0,"> Yes <",1
        EndIf
    Else
        If Windowed3D()=False
            Text (width/2)+0,(y_space*9)+0,"Unavailable",1
        Else
            If mode_option=1 Then Text (width/2)+0,(y_space*9)+0,"No",1
            If mode_option=2 Then Text (width/2)+0,(y_space*9)+0,"Yes",1
        EndIf
    EndIf

    If option=0 Then Text (width/2)+0,(y_space*16)+0,"> Press Square to go Back <",1 Else Text (width/2)+0,(y_space*16)+0,"Back",1

    ; Up/down option
    Delay 40
    If JoyDown(4, JoyPort) Then option=option-1
    If JoyDown(2, JoyPort) Then option=option+1
    If option>2 Then option=0
    If option<0 Then option=2

    ; Enter option
    If kh=True And option=1 Then gfx_mode_option=gfx_mode_option+1 : If gfx_mode_option=>count_gfx_modes Then gfx_mode_option=1
    If kh=True And option=2 And Windowed3D()=True ; Only allow user to toggle windowed mode option if windowed 3d mode is available
        If mode_option=1 Then mode_option=2 Else mode_option=1
    EndIf
     If kh = True And option = 0 Then
        screen = option
        w = gfx_modes(gfx_mode_option, 0)
        h = gfx_modes(gfx_mode_option, 1)
        d = gfx_modes(gfx_mode_option, 2)
        If width <> w Or height <> h Or depth <> d Or mode_option <> mode Then
            width = w : height = h : depth = d : mode = mode_option
            Graphics3D width, height, depth, mode
            ;If FileType(jammitPath$) = 1 Then
                ;jammit = LoadImage(jammitPath$)
            ;Else
                ;RuntimeError "Image file not found: " + jammitPath$
            ;EndIf
            y_space#=height/18
            x_space=width/71 : x_nos=((width/4)-((9*3)/2)) : x_names=((width/2)-((9*5)/2)) : x_scores=((width/1.33)-((9*5)/2))

            ; LoadMedia() : CreateEntities() : InitCollisions()
        EndIf
    EndIf
End Function

Reply To Topic (minimum 10 characters)

Please log in to reply