Skip to content

Commit

Permalink
Merge pull request Regalis11#100 from ENDSHN/dev
Browse files Browse the repository at this point in the history
Some more bugfixes/optimizations
  • Loading branch information
Regalis11 authored Mar 11, 2018
2 parents 52cb162 + e701147 commit 2ad94a8
Show file tree
Hide file tree
Showing 41 changed files with 278 additions and 181 deletions.
16 changes: 8 additions & 8 deletions Blitz_File_ZipApi.bb
Original file line number Diff line number Diff line change
Expand Up @@ -292,19 +292,19 @@ End Function
Function ZipApi_Compress%(bankHandle%, compressionLevel% = ZIPAPI_DEFAULT_COMPRESSION)

; Check bank input - return 0 if invalid
If bankhandle < 1 Then Return False
If bankHandle < 1 Then Return False
If BankSize(bankHandle) < 1 Then Return False

; Check compression level and limit appropriately
If compressionLevel < 1 Then compressionLevel = 1
If compressionLevel > 9 Then compressionLevel = 9

; Create a bank to place compressed data into
Local destBank = CreateBank(ZlibWapi_CompressBound(BankSize(bankhandle)))
Local destBank = CreateBank(ZlibWapi_CompressBound(BankSize(bankHandle)))

; Create bank to store dest size & populate
Local destSize = CreateBank(4)
PokeInt(destSize, 0, BankSize(destbank))
PokeInt(destSize, 0, BankSize(destBank))

; Compress
Local zipResult = ZlibWapi_Compress2(destBank, destSize, bankHandle, BankSize(bankHandle), compressionLevel)
Expand Down Expand Up @@ -507,7 +507,7 @@ Function ZipApi_ExtractFileAsBank%(zipHandle, fileName$, password$ = "")
If fileName = "" Then Return ZIPAPI_END_OF_LIST_OF_FILE

; Find file & get quick information
Local prevFile.ZipApi_unzFileInfo = ZipApi_GetCurrentFileInfo(zipHandle)
Local prevFile.ZIPAPI_UnzFileInfo = ZipApi_GetCurrentFileInfo(zipHandle)
ZipApi_GotoFirstFile(zipHandle)

; Find file
Expand Down Expand Up @@ -637,9 +637,9 @@ Function ZipApi_GetCurrentFileInfo.ZIPAPI_UnzFileInfo(zipHandle%)
ZlibWapi_UnzGetCurrentFileInfo(zipHandle, tBank, fileNameBank, fileInfo\FileNameLength, extraFieldBank, fileInfo\ExtraFieldLength, commentBank, fileInfo\CommentLength)

; Peek our strings
fileInfo\FileName = peekstring(fileNameBank, 0)
fileInfo\ExtraField = peekstring(extraFieldBank, 0)
fileInfo\Comment = peekstring(commentBank, 0)
fileInfo\FileName = PeekString(fileNameBank, 0)
fileInfo\ExtraField = PeekString(extraFieldBank, 0)
fileInfo\Comment = PeekString(commentBank, 0)

; Cleanup & Return
FreeBank tBank
Expand Down Expand Up @@ -669,7 +669,7 @@ Function ZipApi_GetGlobalInfo.ZIPAPI_GlobalInfo(zipHandle)
Return Null
EndIf

zipInfo = ZipApi_GlobalInfo_FromBank(infoBank)
zipInfo = ZIPAPI_GlobalInfo_FromBank(infoBank)

; Now get the comment
Local commentBank = CreateBank(zipInfo\CommentLength + 1)
Expand Down
32 changes: 32 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
v1.3.10

- Updated the Map Creator (version 2.1)
- Added an option to enable/disable adjacent door spawning in the 3d viewer.
- Revamped the design for the 2d grid a bit.
- Added the ability to scale each zone (by adjusting the checkpoint lines for them).
- Fixed a bug that caused the event chance to be 0% when you select an event of a room while "Set the event for the rooms by default" is disabled.
- Fixed a little visual glitch in which the selected room stats showed an empty event and the event chance when you moved the slider.
- Swapped the "Open map" and "Save map" texts when opening/saving a map (they were incorrectly named).
- Added an alarm sound for each gateway room.
- Changed the texture of the checkpoint lockdown screens slightly.
- Improved SCP-914's document texture.
- Optimized the room light rendering.
- Removed lightmaps from the SCP-1499 dimension buildings, so now the game loads less textures when loading the dimension.

Bug fixes:
- The inventory cannot be opened while the SCP-008 zombie cutscene plays.
- Removed the "room2doors" event from events.ini as the actual event used in the game is called "room2doors173"
- The keycard slot level for the archive rooms will now be saved instead of being generated newly each time.
- The "Battery low" text won't overlap with the "Scanning" text while wearing the blue night vision goggles anymore.
- The event where SCP-173 appears when entering the tunnel room won't pause anymore if you enter it and then leave the room afterwards.
- SCP-173 won't appear in the tunnel room when being contained.
- Added "dplayx.dll" which should prevent the "DirectPlay not enabled" error message from appearing.
- Gate A won't go any higher anymore if you quick-loaded the game.
- Fixed player's rotation when the elevator arrives at Gate A.
- The ending screen won't appear anymore when you go to Gate A or B, load the game and die afterwards.
- SCP-106 won't disappear from Gate A anymore if you use SCP-1499.
- The SCP-1499 dimension won't lag anymore if you saved in it and load the save file from the main menu.
- The player cannot fly in the SCP-1499 dimension anymore.

----------------------------------------------------------------------------------

v1.3.9

- Revamped Map Creator.
Expand Down
Binary file modified GFX/map/dimension1499/1499object1.b3d
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object10.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object10_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object11.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object11_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object12.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object12_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object13.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object13_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object14.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object14_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object15.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object15_lm1.bmp
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object1_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object2.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object2_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object3.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object3_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object4.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object4_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object5.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object5_lm1.bmp
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object5_lm2.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object6.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object6_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object7.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object7_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object8.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object8_lm1.bmp
Binary file not shown.
Binary file modified GFX/map/dimension1499/1499object9.b3d
Binary file not shown.
Binary file removed GFX/map/dimension1499/1499object9_lm1.bmp
Binary file not shown.
134 changes: 68 additions & 66 deletions Main.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11464,74 +11464,76 @@ End Function

Function PlayStartupVideos()

If GetINIInt("options.ini","options","play startup video")=0 Then Return
Return

Local Cam = CreateCamera()
CameraClsMode Cam, 0, 1
Local Quad = CreateQuad()
Local Texture = CreateTexture(2048, 2048, 256 Or 16 Or 32)
EntityTexture Quad, Texture
EntityFX Quad, 1
CameraRange Cam, 0.01, 100
TranslateEntity Cam, 1.0 / 2048 ,-1.0 / 2048 ,-1.0
EntityParent Quad, Cam, 1

Local ScaledGraphicHeight%
Local Ratio# = Float(RealGraphicWidth)/Float(RealGraphicHeight)
If Ratio>1.76 And Ratio<1.78
ScaledGraphicHeight = RealGraphicHeight
DebugLog "Not Scaled"
Else
ScaledGraphicHeight% = Float(RealGraphicWidth)/(16.0/9.0)
DebugLog "Scaled: "+ScaledGraphicHeight
EndIf

Local moviefile$ = "GFX\menu\startup_Undertow"
BlitzMovie_Open(moviefile$+".avi") ;Get movie size
Local moview = BlitzMovie_GetWidth()
Local movieh = BlitzMovie_GetHeight()
BlitzMovie_Close()
Local image = CreateImage(moview, movieh)
Local SplashScreenVideo = BlitzMovie_OpenDecodeToImage(moviefile$+".avi", image, False)
SplashScreenVideo = BlitzMovie_Play()
Local SplashScreenAudio = StreamSound_Strict(moviefile$+".ogg",SFXVolume,0)
Repeat
Cls
ProjectImage(image, RealGraphicWidth, ScaledGraphicHeight, Quad, Texture)
Flip
Until (GetKey() Or (Not IsStreamPlaying_Strict(SplashScreenAudio)))
StopStream_Strict(SplashScreenAudio)
BlitzMovie_Stop()
BlitzMovie_Close()
FreeImage image
If GetINIInt("options.ini","options","play startup video")=0 Then Return

Cls
Flip

moviefile$ = "GFX\menu\startup_TSS"
BlitzMovie_Open(moviefile$+".avi") ;Get movie size
moview = BlitzMovie_GetWidth()
movieh = BlitzMovie_GetHeight()
BlitzMovie_Close()
image = CreateImage(moview, movieh)
SplashScreenVideo = BlitzMovie_OpenDecodeToImage(moviefile$+".avi", image, False)
SplashScreenVideo = BlitzMovie_Play()
SplashScreenAudio = StreamSound_Strict(moviefile$+".ogg",SFXVolume,0)
Repeat
Cls
ProjectImage(image, RealGraphicWidth, ScaledGraphicHeight, Quad, Texture)
Flip
Until (GetKey() Or (Not IsStreamPlaying_Strict(SplashScreenAudio)))
StopStream_Strict(SplashScreenAudio)
BlitzMovie_Stop()
BlitzMovie_Close()

FreeTexture Texture
FreeEntity Quad
FreeEntity Cam
FreeImage image
Cls
Flip
; Local Cam = CreateCamera()
; CameraClsMode Cam, 0, 1
; Local Quad = CreateQuad()
; Local Texture = CreateTexture(2048, 2048, 256 Or 16 Or 32)
; EntityTexture Quad, Texture
; EntityFX Quad, 1
; CameraRange Cam, 0.01, 100
; TranslateEntity Cam, 1.0 / 2048 ,-1.0 / 2048 ,-1.0
; EntityParent Quad, Cam, 1
;
; Local ScaledGraphicHeight%
; Local Ratio# = Float(RealGraphicWidth)/Float(RealGraphicHeight)
; If Ratio>1.76 And Ratio<1.78
; ScaledGraphicHeight = RealGraphicHeight
; DebugLog "Not Scaled"
; Else
; ScaledGraphicHeight% = Float(RealGraphicWidth)/(16.0/9.0)
; DebugLog "Scaled: "+ScaledGraphicHeight
; EndIf
;
; Local moviefile$ = "GFX\menu\startup_Undertow"
; BlitzMovie_Open(moviefile$+".avi") ;Get movie size
; Local moview = BlitzMovie_GetWidth()
; Local movieh = BlitzMovie_GetHeight()
; BlitzMovie_Close()
; Local image = CreateImage(moview, movieh)
; Local SplashScreenVideo = BlitzMovie_OpenDecodeToImage(moviefile$+".avi", image, False)
; SplashScreenVideo = BlitzMovie_Play()
; Local SplashScreenAudio = StreamSound_Strict(moviefile$+".ogg",SFXVolume,0)
; Repeat
; Cls
; ProjectImage(image, RealGraphicWidth, ScaledGraphicHeight, Quad, Texture)
; Flip
; Until (GetKey() Or (Not IsStreamPlaying_Strict(SplashScreenAudio)))
; StopStream_Strict(SplashScreenAudio)
; BlitzMovie_Stop()
; BlitzMovie_Close()
; FreeImage image
;
; Cls
; Flip
;
; moviefile$ = "GFX\menu\startup_TSS"
; BlitzMovie_Open(moviefile$+".avi") ;Get movie size
; moview = BlitzMovie_GetWidth()
; movieh = BlitzMovie_GetHeight()
; BlitzMovie_Close()
; image = CreateImage(moview, movieh)
; SplashScreenVideo = BlitzMovie_OpenDecodeToImage(moviefile$+".avi", image, False)
; SplashScreenVideo = BlitzMovie_Play()
; SplashScreenAudio = StreamSound_Strict(moviefile$+".ogg",SFXVolume,0)
; Repeat
; Cls
; ProjectImage(image, RealGraphicWidth, ScaledGraphicHeight, Quad, Texture)
; Flip
; Until (GetKey() Or (Not IsStreamPlaying_Strict(SplashScreenAudio)))
; StopStream_Strict(SplashScreenAudio)
; BlitzMovie_Stop()
; BlitzMovie_Close()
;
; FreeTexture Texture
; FreeEntity Quad
; FreeEntity Cam
; FreeImage image
; Cls
; Flip

End Function

Expand Down
Binary file added Map Creator/dplayx.dll
Binary file not shown.
Loading

0 comments on commit 2ad94a8

Please sign in to comment.