Path: blob/main/Scripts/LBoards/LEntry.txt
1319 views
//--------------Sonic CD Leaderboards Entry Script------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//3//------------------Only exist in WP7 Versions----------------//45// Aliases6#alias Object.Value0 : Object.HTimer7#alias Object.Value3 : Object.Index8#alias Object.Value4 : Object.VTimer9#alias Object.Value5 : Object.SavedXPos1011// Menu Control Alias12#alias Object[0].State : MenuControl.State1314// Next and previous LEntry's15#alias Object.State : PrevLEntry.State16#alias Object.State : NextLEntry.State1718// States19#alias 0 : LENTRY_BLANK20#alias 1 : LENTRY_MOVE_RIGHT21#alias 2 : LENTRY_SCROLL_ENTRIES_R22#alias 3 : LENTRY_STOP_SCROLL_R23#alias 4 : LENTRY_MOVE_LEFT24#alias 5 : LENTRY_SCROLL_ENTRIES_L25#alias 6 : LENTRY_STOP_SCROLL_L26#alias 7 : LENTRY_MOVE_DOWN27#alias 8 : LENTRY_SCROLL_ENTRIES_D28#alias 9 : LENTRY_STOP_SCROLL_D29#alias 10 : LENTRY_MOVE_UP30#alias 11 : LENTRY_SCROLL_ENTRIES_U31#alias 12 : LENTRY_STOP_SCROLL_U3233// Menu Control States34#alias 2 : MENUCONTROL_CONTROLS3536// Priority37#alias 1 : PRIORITY_ACTIVE3839// Ink Effect40#alias 2 : INK_ALPHA4142// Text Info type43#alias 0 : TEXTINFO_TEXTDATA44#alias 1 : TEXTINFO_TEXTSIZE4546// Online Menus47#alias 1 : ONLINEMENU_LEADERBOARDS4849// Property Values50#alias 0 : ENTRY_151#alias 1 : ENTRY_252#alias 2 : ENTRY_353#alias 3 : ENTRY_454#alias 4 : ENTRY_5555657sub ObjectMain58switch Object.State59case LENTRY_BLANK60break6162case LENTRY_MOVE_RIGHT63Object.SavedXPos = Object.XPos64Object.Priority = PRIORITY_ACTIVE65Object.State++66break6768case LENTRY_SCROLL_ENTRIES_R69Object.XPos -= 0x30000070if Object.HTimer < 2571Object.HTimer++72if Object.PropertyValue < 473if Object.HTimer == 574PrevLEntry[+1].State = LENTRY_MOVE_RIGHT75if Object.PropertyValue == ENTRY_276Leaderboard.ID++77Leaderboard.ID %= 2278LoadOnlineMenu(ONLINEMENU_LEADERBOARDS)79end if80end if81end if82else83Object.HTimer = 084Object.iXPos = Screen.XSize85Object.XPos += 0x10000086Object.State++87end if88break8990case LENTRY_STOP_SCROLL_R91Object.XPos -= 0x30000092if Object.XPos < Object.SavedXPos93Object.XPos = Object.SavedXPos94Object.State = LENTRY_BLANK95if Object.PropertyValue == ENTRY_596MenuControl.State = MENUCONTROL_CONTROLS97end if98end if99break100101case LENTRY_MOVE_LEFT102Object.SavedXPos = Object.XPos103Object.Priority = PRIORITY_ACTIVE104Object.State++105break106107case LENTRY_SCROLL_ENTRIES_L108Object.XPos += 0x300000109if Object.HTimer < 25110Object.HTimer++111if Object.PropertyValue < 4112if Object.HTimer == 5113PrevLEntry[+1].State = LENTRY_MOVE_LEFT114if Object.PropertyValue == ENTRY_3115Leaderboard.ID--116if Leaderboard.ID < 0117Leaderboard.ID = 21118end if119LoadOnlineMenu(ONLINEMENU_LEADERBOARDS)120end if121end if122end if123else124Object.HTimer = 0125Object.iXPos = -232126Object.XPos -= 0x100000127Object.State++128end if129break130131case LENTRY_STOP_SCROLL_L132Object.XPos += 0x300000133if Object.XPos > Object.SavedXPos134Object.XPos = Object.SavedXPos135Object.State = LENTRY_BLANK136if Object.PropertyValue == ENTRY_5137MenuControl.State = MENUCONTROL_CONTROLS138end if139end if140break141142case LENTRY_MOVE_DOWN143if Object.VTimer < 95144Object.VTimer += 5145end if146Object.Alpha = 255147Object.State++148break149150case LENTRY_SCROLL_ENTRIES_D151Object.InkEffect = INK_ALPHA152Object.Alpha = 224153Object.State++154break155156case LENTRY_STOP_SCROLL_D157if Object.Alpha > 0158Object.Alpha -= 32159if Object.PropertyValue < 4160if Object.Alpha == 128161PrevLEntry[+1].State = LENTRY_MOVE_DOWN162end if163end if164else165Object.State = LENTRY_BLANK166if Object.PropertyValue == ENTRY_5167MenuControl.State = MENUCONTROL_CONTROLS168end if169end if170break171172case LENTRY_MOVE_UP173if Object.VTimer > 0174Object.VTimer -= 5175end if176Object.Alpha = 255177Object.State++178break179180case LENTRY_SCROLL_ENTRIES_U181Object.InkEffect = INK_ALPHA182Object.Alpha = 224183Object.State++184break185186case LENTRY_STOP_SCROLL_U187if Object.Alpha > 0188Object.Alpha -= 32189if Object.PropertyValue < 4190if Object.Alpha == 128191PrevLEntry[+1].State = LENTRY_MOVE_UP192end if193end if194else195Object.State = LENTRY_BLANK196if Object.PropertyValue == ENTRY_5197MenuControl.State = MENUCONTROL_CONTROLS198end if199end if200break201202end switch203end sub204205206sub ObjectDraw207DrawSprite(142)208209Object.Index = Object.PropertyValue210Object.Index += Object.VTimer211ArrayPos0 = 0212213GetTextInfo(TempValue1, MENU_1, TEXTINFO_TEXTSIZE, Object.Index, 0)214TempValue2 = Object.XPos215TempValue2 += 0x80000216TempValue3 = 0217while TempValue3 < 4218GetTextInfo(TempValue0, MENU_1, TEXTINFO_TEXTDATA, Object.Index, ArrayPos0)219switch TempValue0220default221Object.Frame = 0222if TempValue0 > 47223if TempValue0 < 58224Object.Frame = TempValue0225Object.Frame -= 15226end if227end if228229if Object.Frame > 0230Object.Frame += 71231DrawSpriteXY(Object.Frame, TempValue2, Object.YPos)232end if233break234235case 34236DrawSpriteXY(100, TempValue2, Object.YPos)237break238239case 39240DrawSpriteXY(99, TempValue2, Object.YPos)241break242243case 46244DrawSpriteXY(98, TempValue2, Object.YPos)245break246247end switch248ArrayPos0++249TempValue3++250TempValue2 += 0x80000251loop252253TempValue1 -= 4254while TempValue1 > 0255GetTextInfo(TempValue0, MENU_1, TEXTINFO_TEXTDATA, Object.Index, ArrayPos0)256switch TempValue0257default258Object.Frame = 0259if TempValue0 > 64260if TempValue0 < 91261Object.Frame = TempValue0262Object.Frame -= 64263end if264end if265266if TempValue0 > 96267if TempValue0 < 123268Object.Frame = TempValue0269Object.Frame -= 54270end if271end if272273if TempValue0 > 47274if TempValue0 < 58275Object.Frame = TempValue0276Object.Frame -= 15277end if278end if279280if Object.Frame > 0281DrawSpriteXY(Object.Frame, TempValue2, Object.YPos)282end if283break284285case 34286DrawSpriteXY(29, TempValue2, Object.YPos)287break288289case 39290DrawSpriteXY(28, TempValue2, Object.YPos)291break292293case 45294DrawSpriteXY(69, TempValue2, Object.YPos)295break296297case 46298DrawSpriteXY(27, TempValue2, Object.YPos)299break300301end switch302ArrayPos0++303TempValue1--304TempValue2 += 0x80000305loop306307if Object.State > LENTRY_STOP_SCROLL_L308DrawSpriteFX(143, FX_INK, Object.XPos, Object.YPos)309end if310end sub311312313sub ObjectStartup314LoadSpriteSheet("LBoards/Leaderboards.gif")315LoadTextFile(MENU_1, "Data/Game/LeaderboardText.txt", 0)316Leaderboard.ID = 0317LoadOnlineMenu(ONLINEMENU_LEADERBOARDS)318319SpriteFrame(0, 0, 8, 10, 118, 298) // #0 - Blank Space320321// (#1 - #70) - Alphabet322TempValue1 = 254323while TempValue1 < 308324TempValue0 = 127325while TempValue0 < 253326SpriteFrame(-3, -5, 8, 10, TempValue0, TempValue1)327TempValue0 += 9328loop329TempValue1 += 11330loop331332SpriteFrame(0, 0, 8, 10, 118, 298) // #72 - Blank Space333334// (#73 - #141) Alphabet Highlight335TempValue1 = 254336while TempValue1 < 308337TempValue0 = 1338while TempValue0 < 127339SpriteFrame(-3, -5, 8, 10, TempValue0, TempValue1)340TempValue0 += 9341loop342TempValue1 += 11343loop344345SpriteFrame(0, -10, 232, 21, 1, 309) // #142 - Button346SpriteFrame(0, -10, 232, 21, 1, 232) // #143 - Button Flash347end sub348349350// ========================351// Editor Subs352// ========================353354sub RSDKDraw355DrawSprite(0)356end sub357358359sub RSDKLoad360LoadSpriteSheet("LBoards/Leaderboards.gif")361362SpriteFrame(0, -10, 232, 21, 1, 309) // #142 - Button363364SetVariableAlias(ALIAS_VAR_PROPVAL, "entry")365end sub366367368