There is a duplicated block of code now which will fit into it's own function.
function SetPanelSprite( thisPos , thisFrame )
thisSprite = panelIconSprite[ thisPos ]
if thisFrame = 0
setSpriteImage( thisSprite , 0 )
clearSpriteAnimationFrames( thisSprite )
else
setSpriteImage( thisSprite , IconImage() )
setSpriteAnimation( thisSprite , 64 , 64 , 252 )
setSpriteFrame( thisSprite , thisFrame )
endif
endfunction
This was lifted straight out of the group loop, so can simply be replaced with the call
SetPanelSprite( thisPos , thisFrame )
thisSprite = panelIconSprite[ thisPos ]
In the members loop for the objects,
thisSprite = panelIconSprite[ nextIcon ]
setSpriteImage( thisSprite , IconImage() )
setSpriteAnimation( thisSprite , 64 , 64 , 252 )
setSpriteFrame( thisSprite , thisFrame )
Can be replaced with,
SetPanelSprite( nextIcon , thisFrame )
thisSprite = panelIconSprite[ nextIcon ]
Finally, in the remainder loop.
thisSprite = panelIconSprite[ i ]
setSpriteImage( thisSprite , 0 )
clearSpriteAnimationFrames( thisSprite )
Is replaced with,
SetPanelSprite( i , 0 )
thisSprite = panelIconSprite[ i ]
So the function now looks like this.
function SetPanelIcons()
// Process Groups
thisGroups = len(GameGroups()) / 2.0
firstGroupIcon = panelIconMax() - thisGroups + 1
for i=0 to thisGroups-1
thisCode$ = mid( GameGroups() , i * 2 + 1 , 2 )
thisObject = Base96Decode( thisCode$ )
if thisObject = 0
thisFrame = 0
else
thisFrame = ObjectIcon( thisObject )
endif
thisPos = firstGroupIcon + i
SetPanelSprite( thisPos , thisFrame )
thisSprite = panelIconSprite[ thisPos ]
if thisObject = PanelGroup()
setSpriteColorAlpha( thisSprite , PGROUP_ALPHAHI )
else
setSpriteColorAlpha( thisSprite , PGROUP_ALPHA )
endif
next i
// Process Objects
if PanelGroup() > 0
thisString$ = ObjectDetail( PanelGroup() )
thisMembers = len(thisString$) / 2.0
nextIcon = 1
for i=0 to thisMembers - 1
thisCode$ = mid( thisString$ , i * 2 + 1 , 2 )
thisObject = Base96Decode( thisCode$ )
// if ObjectIsKnown( thisObject ) > 0
thisFrame = ObjectIcon( thisObject )
SetPanelSprite( nextIcon , thisFrame )
thisSprite = panelIconSprite[ nextIcon ]
setSpriteColorAlpha( thisSprite , PGROUP_ALPHAHI )
inc nextIcon , 1
if nextIcon >= firstGroupIcon then exit
// endif
next i
// Reset Remainder
for i = nextIcon to firstGroupIcon - 1
SetPanelSprite( i , 0 )
thisSprite = panelIconSprite[ nextIcon ]
setSpriteColorAlpha( thisSprite , PGROUP_ALPHA )
next i
endif
endfunction
TATONIC EZ TATONIC EZ TATONIC EZ TATONIC
ReplyDeleteTATONIC EZ TATONIC EZ TATONIC EZ TATONIC titanium teeth EZ TATONIC EZ TATONIC titanium tubing EZ head titanium ti s6 TATONIC EZ TATONIC EZ croc titanium flat iron TATONIC EZ TATONIC EZ TATONIC everquest titanium EZ TATONIC EZ TONIC EZ T Rating: 4.7 · 1,921 reviews
yp835 fake designer bags,replica bags,replica bags,replica bags designe,fake bags,fake designer bags,nofakebags.ru,fake designer bags,replica bags co403
ReplyDeletehr031 replica bags ht144
ReplyDeleterw636 nfl shop,cheap nfl jerseys,Cheap Jerseys from china,nfl jerseys,jordans shoes,nfl jerseys,Cheap Jerseys free shipping,wholesale nfl jerseys,Cheap Jerseys free shipping wz441
ReplyDelete