ok. ill post it. but its only to get debugged. its copyright. =)
i apologize for the inconvenience. i just don't like to post code b/c i know some n00bs out there try to steal it & claim it as theirs. thats why i only post portions.
but in this case, i REALLY need this fixed so ill post the whole thing.
itll be 2 posts, cuz it needs const.bb to run.
PLEASE feel free to do whatever it takes to fix it. take stuff out, i don't care. =)
Here's the main code:
Global debug
a1$ = CommandLine$()
If a1$="\debug" Then
Print "Debug mode is on!"
debug=1
Else
Print "No debugging activated."
debug=0
End If
Delay 1000
Include "Const.bb"
;;Const WM_PAINT = $000F
Global x = -1
Global y = -1
Global z
AppTitle "Particlos"
Graphics3D 1024,768, 32, 2
Global RuntimeWindow_hWnd = WB3D_InitializeGUI(SystemProperty("AppHwnd"),0,0,GraphicsWidth(),GraphicsHeight())
Global copyright$ = "Copyright (c) 2008 - 2009 Photo-Xtreme"+Chr$(13)+" Created by: ~ZeldaX~"
Global w
Global FrameStart
Global DeltaTime# = 0.1
Global GameTime# = 0
Global framesrate#
Const FPS = 220
Global aFPS = 990
Global FPSCount = aFPS
Global timFPS
Global menus
Global req
Global snd
Global snd1
Global snd2
Global PlaySound1
Global playa
Global menu1
Global menuii
Global menuselect = 0
Global file1$
Global keypressed
Global menu
Const NUMCOMETS% = 4
Dim Comets%(NUMCOMETS)
Dim Xspeeds#(NUMCOMETS)
Dim Yspeeds#(NUMCOMETS)
Dim Zspeeds#(NUMCOMETS)
; CREATE AND FEED EMITTERS
Dim TrailEmitters% (NUMCOMETS)
Dim ImpactEmitters% (NUMCOMETS)
Global CometTex = LoadTexture("Media\fountain.jpg")
WB3D_HotKeyEvent MOD_CONTROL,65,1 ; ctrl+a
WB3D_HotKeyEvent MOD_CONTROL,76,78 ; ctrl+l
;WB3D_HotKeyEvent MOD_CONTROL,76,
; menus
menus = WB3D_WindowMenu(RuntimeWindow_hWnd)
file = WB3D_CreateMenu("&File",0,menus,0)
OpenItem = WB3D_CreateMenu("Open",1,file,0)
SaveItem = WB3D_CreateMenu("Save",2,file,0)
WB3D_CreateMenu("",0,file,0)
QuitItem = WB3D_CreateMenu("Quit",3,file,0)
about = WB3D_CreateMenu("About",0,menus,1)
about1 = WB3D_CreateMenu("About...",4,about,0)
compile = WB3D_CreateMenu("Compile Code",5,menus,0)
u=WB3D_UpdateWindowMenu(RuntimeWindow_hWnd)
statusbar = WB3D_CreateStatusBar(RuntimeWindow_hWnd,"")
s1=WB3D_SetStatusParts(statusbar,5+1)
s2=WB3D_StatusPartWidth(statusbar,0,150)
s3=WB3D_StatusPartWidth(statusbar,1,150)
s4=WB3D_StatusPartWidth(statusbar,2,150)
s5=WB3D_StatusPartWidth(statusbar,3,150)
s6=WB3D_StatusPartWidth(statusbar,4,150)
s7=WB3D_StatusPartWidth(statusbar,5,150)
s8=WB3D_StatusPartWidth(statusbar,6,150)
WB3D_UpdateStatusbar(statusbar)
WB3D_FlushEvents()
; setup out quit flag, and loop until the flag is set.
QUIT = 0
Light = CreateLight()
Listener = CreateListener(Cam, .005, 1, 1)
Include "particle candy.bb"
Include "particle types.bb"
cam = CreateCamera()
PositionEntity cam, 0, 1, 0
Global test
;snd=LoadSound(file1$)
p1=InitParticles(cam,"Media\particles.png", 3)
p2=SetParticleUpdateCycle(2)
EM0 = CreateEmitter_Test()
EM1 = CreateEmitter_Rocks()
EM2 = CreateEmitter_Explosion1()
EM3 = CreateEmitter_Explosion2()
EM4 = CreateEmitter_Smoke()
EM5 = CreateEmitter_Torch()
EM6 = CreateEmitter_Sparks()
EM7 = CreateEmitter_FlameThrower()
EM8 = CreateEmitter_Waterfall()
EM9 = CreateEmitter_WaterFontain()
EM10 = CreateEmitter_SmokeFlares()
EM11 = CreateEmitter_Comet(test)
period=1000/FPS
ztime=MilliSecs()-period
test1 = WB3D_CreateWindow("Test",x,y,GraphicsWidth()/8,GraphicsHeight()-71,RuntimeWindow_hWnd, WINDOW_TITLEBAR) ;Or Window_Minimize Or WindowResizable)
WB3D_DragAcceptFiles(RuntimeWindow_hWnd, 1)
WB3D_DragAcceptFiles(test1, 1)
tabber = WB3D_CreateTabber(0,0,240,150,test1,0)
WB3D_SetGadgetIconStrip(tabber,icons)
ss11=WB3D_CreateToolTip(tabber,"Im a tabber tooltip",0)
For loop = 0 To 10
icon_index = Rnd(0,5)
WB3D_AddGadgetItem tabber,"item: "+loop,0,icon_index
Next
panel0 = WB3D_CreateTabberPanel(5,30,200,100,tabber)
button_tab0 = WB3D_CreateButton("Show Panel Splash",5,10,190,40,panel0,0)
WB3D_CreateToolTip button_tab0,"show me the splash",1
font = WB3D_OpenFont("blitz",8,8,True,True,True) ; set bold ,italic ,underline to true
WB3D_Usefont button_tab0,font
panel1 = WB3D_CreateTabberPanel(5,30,150,100,tabber)
button_tab1 = WB3D_CreateButton("Tab1",10,10,100,20,panel1,0)
WB3D_HideGadget panel1
panel2 = WB3D_CreateTabberPanel(5,30,150,100,tabber)
button_tab2 = WB3D_CreateButton("Tab2",10,10,100,20,panel2,0)
WB3D_HideGadget panel2
panel3 = WB3D_CreateTabberPanel(5,30,150,100,tabber)
button_tab3 = WB3D_CreateButton("Tab3",10,10,100,20,panel3,0)
WB3D_HideGadget panel3
blah = WB3D_CreateCheckButton("test", 50, 50, 110, 110, test1, 0)
Global l_surface=CreateSprite(cam)
Global width=GraphicsWidth(),height=GraphicsHeight()
SpriteViewMode l_surface,2
PositionEntity l_surface,0,0,1
EntityOrder l_surface,-100
ScaleSprite l_surface, 1, 0.75
Global l_texture=CreateTexture(width,height,1+256)
TextureBlend l_texture,2
ScaleTexture l_texture, (Float TextureWidth(l_texture)/Float width),(Float TextureHeight(l_texture)/Float Height)
EntityTexture l_surface,l_texture
EntityAlpha l_surface,.3
Global cspeed# = .1
Global cspeed1#
If debug Then t=WB3D_CreateTextArea(GraphicsWidth()/2-550/2, GraphicsHeight()/2-150/2, 550, 150, Runtimewindow_hWnd, 0)
While Not QUIT = 1 Or KeyHit(1)
If debug
WB3D_SetTextAreaText(t, "x="+x+Chr$(13)+"y="+y+Chr$(13)+"z="+z+Chr$(13))
WB3D_SetTextAreaText(t, "Runtimewindow_hWnd="+Runtimewindow_hWnd+Chr$(13))
WB3D_SetTextAreaText(t, "copyright$="+copyright$+Chr$(13))
WB3D_SetTextAreaText(t, " w="+w+Chr$(13))
WB3D_SetTextAreaText(t, "FrameStart="+FrameStart+Chr$(13))
WB3D_SetTextAreaText(t, "DeltaTime#="+DeltaTime#+Chr$(13))
WB3D_SetTextAreaText(t, "GameTime#="+GameTime#+Chr$(13))
WB3D_SetTextAreaText(t, "framerate#="+framesrate#+Chr$(13))
WB3D_SetTextAreaText(t, "FPS="+FPS+Chr$(13))
WB3D_SetTextAreaText(t, "aFPS="+aFPS+Chr$(13))
WB3D_SetTextAreaText(t, "FPSCount="+FPSCount+Chr$(13))
WB3D_SetTextAreaText(t, "timFPS="+timFPS+Chr$(13))
WB3D_SetTextAreaText(t, "menus="+menus+Chr$(13))
WB3D_SetTextAreaText(t, "req="+req+Chr$(13))
WB3D_SetTextAreaText(t, "snd="+snd+Chr$(13))
WB3D_SetTextAreaText(t, "snd1="+snd1+Chr$(13))
WB3D_SetTextAreaText(t, "snd2="+snd2+Chr$(13))
WB3D_SetTextAreaText(t, "PlaySound="+PlaySound1+Chr$(13))
WB3D_SetTextAreaText(t, "playa="+playa+Chr$(13))
WB3D_SetTextAreaText(t, "menu1="+menu1+Chr$(13))
WB3D_SetTextAreaText(t, "menuii="+menuii+Chr$(13))
WB3D_SetTextAreaText(t, "menuselect="+menuselect+Chr$(13))
WB3D_SetTextAreaText(t, "file1$="+file1$+Chr$(13))
WB3D_SetTextAreaText(t, "keypressed="+keypressed+Chr$(13))
WB3D_SetTextAreaText(t, "menu="+menu+Chr$(13))
WB3D_SetTextAreaText(t, "NUMCOMETS="+NUMCOMETS%+Chr$(13))
WB3D_SetTextAreaText(t, "Comets="+Comets%(NUMCOMETS)+Chr$(13))
WB3D_SetTextAreaText(t, "Xspeeds#="+Xspeeds#(NUMCOMETS)+Chr$(13))
WB3D_SetTextAreaText(t, "Yspeeds#="+Yspeeds#(NUMCOMETS)+Chr$(13))
WB3D_SetTextAreaText(t, "Zspeeds#="+Zspeeds#(NUMCOMETS)+Chr$(13))
WB3D_SetTextAreaText(t, "TrailEmitters="+TrailEmitters% (NUMCOMETS)+Chr$(13))
WB3D_SetTextAreaText(t, "ImpactEmitters="+ImpactEmitters% (NUMCOMETS)+Chr$(13))
WB3D_SetTextAreaText(t, "CometTex="+CometTex+Chr$(13))
WB3D_SetTextAreaText(t, "menus="+menus+Chr$(13))
WB3D_SetTextAreaText(t, "file="+file+Chr$(13))
WB3D_SetTextAreaText(t, "OpenItem="+OpenItem+Chr$(13))
WB3D_SetTextAreaText(t, "SaveItem="+SaveItem+Chr$(13))
WB3D_SetTextAreaText(t, "QuitItem="+QuitItem+Chr$(13))
WB3D_SetTextAreaText(t, "about="+about+Chr$(13))
WB3D_SetTextAreaText(t, "about1="+about1+Chr$(13))
WB3D_SetTextAreaText(t, "compile="+compile+Chr$(13))
WB3D_SetTextAreaText(t, "u="+u+Chr$(13))
WB3D_SetTextAreaText(t, "s1="+s1+Chr$(13))
WB3D_SetTextAreaText(t, "s2="+s2+Chr$(13))
WB3D_SetTextAreaText(t, "s3="+s3+Chr$(13))
WB3D_SetTextAreaText(t, "s4="+s4+Chr$(13))
WB3D_SetTextAreaText(t, "s5="+s5+Chr$(13))
WB3D_SetTextAreaText(t, "s6="+s6+Chr$(13))
WB3D_SetTextAreaText(t, "s7="+s7+Chr$(13))
WB3D_SetTextAreaText(t, "s8="+s8+Chr$(13))
WB3D_SetTextAreaText(t, "QUIT="+QUIT+Chr$(13))
WB3D_SetTextAreaText(t, "Light="+Light+Chr$(13))
WB3D_SetTextAreaText(t, "Listener="+Listener+Chr$(13))
WB3D_SetTextAreaText(t, "cam="+cam+Chr$(13))
WB3D_SetTextAreaText(t, "Cam X="+EntityX(cam)+Chr$(13))
WB3D_SetTextAreaText(t, "Cam Y="+EntityY(cam)+Chr$(13))
WB3D_SetTextAreaText(t, "Cam Z="+EntityZ(cam)+Chr$(13))
WB3D_SetTextAreaText(t, "test="+test+Chr$(13))
WB3D_SetTextAreaText(t, "snd="+snd+Chr$(13))
WB3D_SetTextAreaText(t, "p1="+p1+Chr$(13))
WB3D_SetTextAreaText(t, "p2="+p2+Chr$(13))
WB3D_SetTextAreaText(t, "EM0="+EM0+Chr$(13))
WB3D_SetTextAreaText(t, "EM1="+EM1+Chr$(13))
WB3D_SetTextAreaText(t, "EM2="+EM2+Chr$(13))
WB3D_SetTextAreaText(t, "EM3="+EM3+Chr$(13))
WB3D_SetTextAreaText(t, "EM4="+EM4+Chr$(13))
WB3D_SetTextAreaText(t, "EM5="+EM5+Chr$(13))
WB3D_SetTextAreaText(t, "EM6="+EM6+Chr$(13))
WB3D_SetTextAreaText(t, "EM7="+EM7+Chr$(13))
WB3D_SetTextAreaText(t, "EM8="+EM8+Chr$(13))
WB3D_SetTextAreaText(t, "EM9="+EM9+Chr$(13))
WB3D_SetTextAreaText(t, "EM10="+EM10+Chr$(13))
WB3D_SetTextAreaText(t, "EM11="+EM11+Chr$(13))
WB3D_SetTextAreaText(t, "period="+period+Chr$(13))
WB3D_SetTextAreaText(t, "ztime="+ztime+Chr$(13))
WB3D_SetTextAreaText(t, "test1="+test1+Chr$(13))
WB3D_SetTextAreaText(t, "tabber="+tabber+Chr$(13))
WB3D_SetTextAreaText(t, "ss11="+ss11+Chr$(13))
For loop = 0 To 10
icon_index = Rnd(0,5)
item=WB3D_AddGadgetItem(tabber,"item: "+loop,0,icon_index)
WB3D_SetTextAreaText(t, "icon_index "+loop+"="+icon_index+Chr$(13))
Next
WB3D_SetTextAreaText(t, "item="+item+Chr$(13))
WB3D_SetTextAreaText(t, "panel0="+panel0+Chr$(13))
WB3D_SetTextAreaText(t, "button_tab0="+button_tab0+Chr$(13))
WB3D_SetTextAreaText(t, "font="+font+Chr$(13))
WB3D_SetTextAreaText(t, "panel1="+panel1+Chr$(13))
WB3D_SetTextAreaText(t, "button_tab1="+button_tab1+Chr$(13))
WB3D_SetTextAreaText(t, "panel2="+panel2+Chr$(13))
WB3D_SetTextAreaText(t, "button_tab2="+button_tab2+Chr$(13))
WB3D_SetTextAreaText(t, "panel3="+panel3+Chr$(13))
WB3D_SetTextAreaText(t, "button_tab3="+button_tab3+Chr$(13))
WB3D_SetTextAreaText(t, "blah="+blah+Chr$(13))
WB3D_SetTextAreaText(t, "l_surface="+l_surface+Chr$(13))
WB3D_SetTextAreaText(t, "width="+width+Chr$(13))
WB3D_SetTextAreaText(t, "height="+height+Chr$(13))
WB3D_SetTextAreaText(t, "l_surface X="+EntityX(l_surface)+Chr$(13))
WB3D_SetTextAreaText(t, "l_surface Y="+EntityY(l_surface)+Chr$(13))
WB3D_SetTextAreaText(t, "l_surface Z="+EntityZ(l_surface)+Chr$(13))
WB3D_SetTextAreaText(t, "l_texture="+l_texture+Chr$(13))
WB3D_SetTextAreaText(t, "cspeed#="+cspeed#+Chr$(13))
WB3D_SetTextAreaText(t, "cspeed1#="+cspeed1#+Chr$(13))
WB3D_SetTextAreaText(t, "debug="+debug+Chr$(13))
If snd2 = 1 Then WB3D_SetTextAreaText(t, "test="+test+Chr$(13))
WB3D_UpdateTextArea t
EndIf
cspeed1# = (KeyDown(200)-KeyDown(208))*cspeed#
;If cspeed1# >= cspeed# Or cspeed1# <= -cspeed# Then alpha# = 0.9
If debug = 0
If api_IsHungAppWindow(test1) Or api_IsHungAppWindow(Runtimewindow_hWnd) Then WB3D_Notify "WARNING","Window is froze",0 : Exit
mainwindow_x = GraphicsWidth()
mainwindow_y = GraphicsHeight()
mainwindow_x2 = GraphicsWidth()
mainwindow_yii = GraphicsHeight()
window_x = GraphicsWidth()/4
window_y = GraphicsHeight()-71
window_x2 = GraphicsWidth()/4
window_yii = GraphicsHeight()-71
mainmove = api_MoveWindow(Runtimewindow_hWnd, 0, 0, mainwindow_x, mainwindow_y, WM_PAINT)
move = api_MoveWindow(test1, 0, 0, window_x, window_y, WM_PAINT)
EndIf
timeStart=MilliSecs()
WB3D_SetStatusText statusbar,0,"FPS:"+framesrate#
WB3D_SetStatusText statusbar,1,"menu:"+menu
WB3D_SetStatusText statusbar,2,"menu1:"+menu1
WB3D_SetStatusText statusbar,3,"menuii:"+menuii
WB3D_SetStatusText statusbar,4,"playa:"+playa
WB3D_SetStatusText statusbar,5,"chanplay:"+ChannelPlaying(snd1)
t=WB3D_CreateToolTip%(statusbar,"test",0)
WB3D_SetToolTipText(t,"test")
time$ = CurrentTime$()
If time$ >= 12 Then am_pm$ = "PM"
If time$ < 12 Then am_pm$ = "AM"
WB3D_SetStatusText statusbar,6,"Time: "+time$+" "+am_pm$
; get an event of the event queue.
event = WB3D_WaitEvent()
Select event
Case WB3D_EVENT_MENU
Select WB3D_EventData()
Case 1
ext$ = "*.mid"+Chr$(0)+"*.mid"+Chr$(0)+"*.mp3"+Chr$(0)+"*.mp3"+Chr$(0)
file1$ = WB3D_OpenFileRequest("..","..",ext$,"") : test = 1
If FileExtension(file1$) = ".mp3" Or FileExtension(file1$) = ".mid"
req = 1
Else
req = 0
EndIf
If req Then snd = LoadSound(file1$) : request() : test = 1
If test = 1 And ChannelPlaying(snd1)
Emitter_Start(EM8)
EndIf
Case 2
Case 3
QUIT = 1
Case 4
WB3D_Notify "Menu",copyright$,0
Case 5
Write_BB("Test", "Test.bb")
Case 6
Case WB3D_EVENT_DRAGDROP
For do_files = 0 To WB3D_CountDroppedFiles()
file1$ = WB3D_DroppedFileName(do_files)
If FileExtension(file1$) = ".mp3" Or FileExtension(file1$) = ".mid"
req = 1
Else
req = 0
EndIf
Next
End Select
event = WB3D_WaitEvent()
Select event
Case tabber
selectedtab = WB3D_EventData()
Select selectedtab
Case 0
WB3D_ShowGadget panel0
WB3D_HideGadget panel1
WB3D_HideGadget panel2
WB3D_HideGadget panel3
Case 1
WB3D_ShowGadget panel1
WB3D_HideGadget panel0
WB3D_HideGadget panel2
WB3D_HideGadget panel3
Case 2
WB3D_ShowGadget panel2
WB3D_HideGadget panel0
WB3D_HideGadget panel1
WB3D_HideGadget panel3
Case 3
WB3D_ShowGadget panel3
WB3D_HideGadget panel0
WB3D_HideGadget panel1
WB3D_HideGadget panel2
Default
WB3D_Notify "Tab Selected","Tab Selected "+selectedtab,0
WB3D_HideGadget panel0
WB3D_HideGadget panel1
WB3D_HideGadget panel2
WB3D_HideGadget panel3
End Select
End Select
Case WB3D_EVENT_WINDOW_CLOSE
;WB3D_ShowGadget RuntimeWindow_hWnd
Select WB3D_EventSource()
Case RuntimeWindow_hWnd
QUIT = 1
End Select
End Select
Repeat
elapsed=MilliSecs()-ztime
Until elapsed
;how many 'frames' have elapsed
ticks=elapsed/period
;fractional remainder
tween#=Float(elapsed Mod period)/Float(period)
; Frame Update
FrameStart = MilliSecs()
If timFPS < FrameStart Then
aFPS = FPSCount
FPSCount = 0
timFPS = FrameStart + 1000
DeltaTime = 1.0 / Float(aFPS)
GameTime = GameTime + DeltaTime
EndIf
For k=1 To ticks
ztime=ztime+period
If k=ticks Then CaptureWorld
If KeyDown(200) Or KeyDown(208) MoveEntity cam, 0, 0, cspeed1#
If KeyDown(203) Or KeyDown(205) TurnEntity cam, 0, (KeyDown(203)-KeyDown(205))*1, 0
If em8 <> 0
PositionEntity em8, 0, 1, 20
EndIf
x = 0 : y = 0
If em8 > 0 Or em9 > 0 Or em11 > 0 Then
updateParticles()
EndIf
If em8 = 0 Then FreeParticleSystem()
If ChannelPlaying(snd1) = 1 And file1$ Then FreeSound snd
UpdateWorld
Next
; FPSCount = FPSCount + 1
l_update()
RenderWorld tween
timeEnd=MilliSecs()
elapsed=(timeEnd-TimeStart)
framesrate# = ((1000-elapsed)/FPS)
If WB3D_EventData() Then c = c + 1
If WB3D_EventData() Then DebugLog c+" "+WB3D_EventData() : DebugLog event
Text GraphicsWidth()/2, GraphicsHeight()/2+20, event
Text width/2, height/2+40, cspeed1#
Text width/2, height/2+80, cspeed# : Text width/2, height/2+100, test
Text width/2, height/2+120, req
Text GraphicsWidth()/2, GraphicsHeight()/2, wb3d_event_dragdrop
Flip
Wend
; use notify using external winapi constants.
If ChannelPlaying(snd1)
stopm()
EndIf
WB3D_Notify "WB3D GUI Window Example","Bye, Thats It I Quit",MB_OK Or MB_ICONASTERISK
WB3D_EndGUI()
EndGraphics
End
Function l_setAlpha(alpha#)
EntityAlpha l_surface,alpha#
End Function
Function l_update()
CopyRect 0,0,width,Height,0,0,BackBuffer(),TextureBuffer(l_texture)
End Function
Function notify()
WB3D_Notify "WARNING","Sorry, but file "+file1$+" is invalid.",0
End Function
Function request()
If FileExtension(file1$) = ".mp3" Or FileExtension(file1$) = ".mid"
playa = 1
EndIf
If playa Then play()
If test = 1
stopm()
play()
EndIf
Return z
End Function
Function play()
If ChannelPlaying(snd1) = 0 And playa
If FileExtension(file1$) = ".mid"
music = BASS_MIDI_StreamCreateFile(0,file1$,0,0,0,0) : test = 1 ; we load a midi file
If Not BASS_ChannelPlay (music,0) RuntimeError "Midi file not ready!" ; we play the file
Else
If FileExtension(file1$) = ".mp3" And ChannelPlaying(snd1) = 0 Then
load_music()
EndIf
EndIf
Else
If ChannelPlaying(snd1) And playa
stopm()
play()
EndIf
EndIf
If menus = 1
menu1 = file1$
menuii = FileExtension(file1$)
EndIf
End Function
Function stopm()
If playa = 1
StopChannel snd1
EndIf
End Function
Function load_music()
snd1 = PlaySound(snd)
End Function
Function Write_BB(appname$, filedata$)
readme=WriteFile("README.txt")
WriteLine readme, "Please use Blitz3D to compile your project!"
file=WriteFile(filedata$)
WriteLine file, "AppTitle "+Chr$(34)+appname$+Chr$(34)
WriteLine file, ""
WriteLine file, "Graphics3D "+screenwidth+", "+screenheight+", "+screendepth+", "+screenmode
WriteLine file, ""
WriteLine file, "cam = CreateCamera()"
WriteLine file, "CameraRange cam, .1, 1000000"
WriteLine file, "PositionEntity cam, "+xcam+", 1, "+zcam
WriteLine file, ""
WriteLine file, "Land = CreatePlane()"
WriteLine file, ""
WriteLine file, "While Not Keyhit(1)"
WriteLine file, ""
WriteLine file, "If KeyDown(200) Or KeyDown(208) MoveEntity cam, 0, 0, (KeyDown(200)-KeyDown(208))*1"
WriteLine file, "If KeyDown(203) Or KeyDown(205) TurnEntity cam, 0, (KeyDown(203)-KeyDown(205))*1, 0"
WriteLine file, ""
WriteLine file, "UpdateWorld()"
WriteLine file, "RenderWorld()"
WriteLine file, ""
WriteLine file, "Flip"
WriteLine file, ""
WriteLine file, "Wend"
CloseFile file
WB3D_Notify "Menu","Compilation Successful",0
WB3D_Notify "Menu","Compiled file in: "+CurrentDir$(),0
End Function
Function get_menu()
menu = menu + 1
If menu > 43 Then menu = 43
Return menu
End Function
Function File_Extension$(ext$)
For I% = Len(ext$) To 1 Step -1
If Mid$(ext$, I%,1) = "," Then Return "*"+Left(ext$, I%-1)+";"+"*"+ Right$(ext$, I%-1)
Next
End Function
Function FileName$(File$)
For I% = Len(File$) To 1 Step -1
If Mid(File$, I%, 1) = "" Or Mid(File$, I%, 1) = "/" Then Return Mid(File$, I% + 1)
Next
Return File$
End Function
Function FileExtension$(File$)
For I% = Len(File$) To 1 Step -1
If Mid(File$, I%, 1) = "." Return "."+Mid(File$, I% + 1)
If Mid(File$, I%, 1) = "" Or Mid(File$, I%, 1) = "/" Then Return ""
Next
End Function
Function FilePath$(File$)
For I% = Len(File$) To 1 Step -1
If Mid(File$, I%, 1) = "" Or Mid(File$, I%, 1) = "/" Then Return Left(File$, I% - 1)
Next
End Function
; Adds a file extention, if not exists. | F?Et eine Dateiendung hinzu falls noch keine da ist.
Function AddFileExtension$(File$, Extension$)
If FileExtension(File$) = "" Then Return File$ + "." + Extension$ Else Return File$
End Function[/code]
The const.bb file is already posted in 2 posts somewhere above. =)
Thanks again! =)
Also, if you need to take out particle candy for any reason, please comment out the following:
[code]Include "particle candy.bb"
Include "particle types.bb"
Global CometTex = LoadTexture("Media\fountain.jpg")
p1=InitParticles(cam,"Media\particles.png", 3)
p2=SetParticleUpdateCycle(2)
UpdateParticleSystem()and any id with "EM0" through "EM11".
i apologize if this is a bit messed up. im in a hurry. =)
Thanks again! =)
~DarkShadowWing~