Subversion Repositories forest

Compare Revisions

No changes between revisions

Regard whitespace Rev 1 → Rev 2

/trunk/_private/Code Tests/Jump/Application.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/_private/Code Tests/Jump/Jump.dbpro
0,0 → 1,68
; **** Dark BASIC Professional Project File ****
; **** Written by Synergy Editor ****
version=DBP1.00
project name=Jump
 
; **** source file information ****
main=Untitled1.dba
LineMain=0
 
; **** Executable Information ***
; build types: exe, media, installer, alone
executable=Application.exe
build type=exe
; ** Media file compression **
compression=NO
 
; ** Media file encryption **
encryption=NO
; ** Display the card options screen window? **
card options window=NO
 
; **** debugger information ****
; If the editor sets this to yes, it is running in debug mode
CLI=NO
CommandLineArguments=
 
; **** display mode information ****
app title=Dark Basic Pro Project
 
; graphics mode options: fullscreen, window, desktop, fulldesktop, hidden
graphics mode=window
fullscreen resolution=640x480x32
 
; arbitrary sizes are valid for windowed mode
window resolution=640x480
 
; **** External Files Information ****
 
; **** Media ****
; Example entries: media1=graphics\*.jpg
media root path=D:\tdn\_private\CodeTests\Jump\
 
; **** Icons ****
 
; **** Cursors ****
 
; **** Version Info ****
VerComments=
VerCompany=
VerFileDesc=
VerFileNumber=
VerInternal=
VerCopyright=
VerTrademark=
VerFilename=
VerProduct=
VerProductNumber=v1.0
 
; **** To Do ****
 
; **** Comments ****
comments1=
 
; **** Advanced (setup.ini) configuration ****
RemoveSafetyCode=NO
SafeArrays=YES
LocalTempFolder=NO
ExternaliseDLLS=NO
/trunk/_private/Code Tests/Jump/Untitled1.BAK
0,0 → 1,61
Rem Setup sync
Sync On
Sync Rate 30
 
Rem Create matrix
Make Matrix 1,2000,2000,50,50
 
Rem Position Camera above the matrix
Position Camera 0,1000,0
 
JumpKeyStatePrev = 0
 
positionY = 175.0
velocityY = 0.0
gravity = 1
onGround = 1
 
Do
JumpKeyStateNow=leftkey()
if (JumpKeyStatePrev=0) and (JumpKeyStateNow=1)
gosub startJump
ENDIF
 
if (JumpKeyStatePrev=1) and (JumpKeyStateNow=0)
gosub endJump
ENDIF
 
JumpKeyStatePrev = JumpKeyStateNow
 
 
gosub JumpUpdate
position camera 0, positionY, 0
 
Sync
Loop
 
StartJump:
if onGround=1
velocityY = 25.0
onGround = 0
endif
return
 
EndJump:
if velocityY > 6.0 then velocityY = 6.0
return
 
JumpUpdate:
dec velocityY, gravity
inc positionY, velocityY
if positionY < 175.0
positionY = 175.0
velocityY = 0.0
onGround = 1
endif
return
 
 
 
/trunk/_private/Code Tests/Jump/Untitled1.dba
0,0 → 1,61
Rem Setup sync
Sync On
Sync Rate 30
 
Rem Create matrix
Make Matrix 1,2000,2000,50,50
 
Rem Position Camera above the matrix
Position Camera 0,1000,0
 
JumpKeyStatePrev = 0
 
positionY = 175.0
velocityY = 0.0
gravity = 1
onGround = 1
 
Do
JumpKeyStateNow=leftkey()
if (JumpKeyStatePrev=0) and (JumpKeyStateNow=1)
gosub PressJumpKey
ENDIF
 
if (JumpKeyStatePrev=1) and (JumpKeyStateNow=0)
gosub ReleaseJumpKey
ENDIF
 
JumpKeyStatePrev = JumpKeyStateNow
 
 
gosub JumpUpdate
position camera 0, positionY, 0
 
Sync
Loop
 
PressJumpKey:
if onGround=1
velocityY = 25.0
onGround = 0
endif
return
 
ReleaseJumpKey:
if velocityY > 6.0 then velocityY = 6.0
return
 
JumpUpdate:
dec velocityY, gravity
inc positionY, velocityY
if positionY < 175.0
positionY = 175.0
velocityY = 0.0
onGround = 1
endif
return