Path: blob/master/Sonic 1/Scripts/LevelSelect/HexNo.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Hex No Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.number12private alias object.value1 : object.highlighted // not true/false but 0/16 instead, check out below aliases1314// (Not really used in this script, but MenuControl uses them so these are copied here for reference too)15private alias 0 : HEXNO_HIGHLIGHT_FALSE16private alias 16 : HEXNO_HIGHLIGHT_TRUE171819// ========================20// Events21// ========================2223event ObjectDraw24// First digit25temp0 = object.number26temp0 >>= 427temp0 += object.highlighted28temp1 = object.xpos29DrawSpriteScreenXY(temp0, temp1, object.ypos)3031// Second digit32temp1 += 833temp0 = object.number34temp0 &= 1535temp0 += object.highlighted36DrawSpriteScreenXY(temp0, temp1, object.ypos)37end event383940event ObjectStartup41LoadSpriteSheet("LevelSelect/Text.gif")4243// Using loops to automate Sprite Framing4445// 0-9 Numbers, Unhighlighted White46temp0 = 047while temp0 < 8048SpriteFrame(0, 0, 8, 8, temp0, 24)49temp0 += 850loop5152// A-F Letters, Unhighlighted White53temp0 = 854while temp0 < 5655SpriteFrame(0, 0, 8, 8, temp0, 32)56temp0 += 857loop5859// 0-9 Numbers, Highlighted Yellow60temp0 = 061while temp0 < 8062SpriteFrame(0, 0, 8, 8, temp0, 152)63temp0 += 864loop6566// A-F Letters, Highlighted Yellow67temp0 = 868while temp0 < 5669SpriteFrame(0, 0, 8, 8, temp0, 160)70temp0 += 871loop72end event737475// ========================76// Editor Events77// ========================7879event RSDKDraw80object.number = 0x1281object.highlighted = HEXNO_HIGHLIGHT_FALSE8283temp0 = object.number84temp0 >>= 485temp1 = object.ixpos86temp1 <<= 1687DrawSpriteXY(temp0, temp1, object.ypos)8889temp1 = object.ixpos90temp1 += 891temp0 = object.number92temp0 &= 1593temp1 <<= 1694DrawSpriteXY(temp0, temp1, object.ypos)95end event969798event RSDKLoad99LoadSpriteSheet("LevelSelect/Text.gif")100101temp0 = 0102while temp0 < 80103SpriteFrame(0, 0, 8, 8, temp0, 24)104temp0 += 8105loop106107temp0 = 8108while temp0 < 56109SpriteFrame(0, 0, 8, 8, temp0, 32)110temp0 += 8111loop112113temp0 = 0114while temp0 < 80115SpriteFrame(0, 0, 8, 8, temp0, 152)116temp0 += 8117loop118119temp0 = 8120while temp0 < 56121SpriteFrame(0, 0, 8, 8, temp0, 160)122temp0 += 8123loop124125SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")126end event127128129