Path: blob/master/Sonic 1/Scripts/Title/SonicTeam.txt
1484 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Sonic Team Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.timer1213// States14private alias 0 : SONICTEAM_SETUP15private alias 1 : SONICTEAM_FADEIN16private alias 2 : SONICTEAM_SHOWLOGO17private alias 3 : SONICTEAM_FADEOUT181920// ========================21// Events22// ========================2324event ObjectUpdate25switch object.state26case SONICTEAM_SETUP27object.timer = 32028object.state++29if options.region == 130// The sheet's already been loaded in ObjectStartup, which is why it's safe to use this function here without load time fears31LoadSpriteSheet("Title/SonicTeam.gif")32end if3334SetScreenFade(0x00, 0x00, 0x00, 0xFF)35break3637case SONICTEAM_FADEIN38if object.timer > 039object.timer -= 840else41object.state++42end if4344SetScreenFade(0x00, 0x00, 0x00, object.timer)45break4647case SONICTEAM_SHOWLOGO48object.timer++49if object.timer == 12050object.timer = 051object.state++52end if53break5455case SONICTEAM_FADEOUT56if object.timer < 32057object.timer += 858else59ResetObjectEntity(object.entityPos, TypeName[Logo], 0, 0, 0)60end if6162SetScreenFade(0x00, 0x00, 0x00, object.timer)63break6465end switch66end event676869event ObjectDraw70if options.region == 071// Draw the black background72DrawRect(0, 0, screen.xsize, screen.ysize, 0x00, 0x00, 0x00, 0xFF)73end if7475// Draw either Sonic Team Presents or the secret credits screen depending on region76DrawSpriteScreenXY(options.region, screen.xcenter, screen.ycenter)77end event787980event ObjectStartup81// Loads both here so they're both loaded in memory82// It can then load one later and it's just an internal ID change83LoadSpriteSheet("Title/SonicTeam.gif")84LoadSpriteSheet("Title/Title.gif")8586// 0 - Sonic Team presents87SpriteFrame(-76, -24, 148, 40, 174, 259)8889// 1 - Secret Dev Credits90SpriteFrame(-256, -128, 512, 256, 0, 0)91end event929394// ========================95// Editor Events96// ========================9798event RSDKDraw99DrawSprite(0)100end event101102103event RSDKLoad104LoadSpriteSheet("Title/Title.gif")105SpriteFrame(-76, -24, 148, 40, 174, 259)106107SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")108end event109110