;ò _‰;c@s±dkZdkZdkTdkZdkZdZdZdZdZdddfZ ddd fZ d d d fZ d d d fZ d d d fZ e ZdZdfd„ƒYZdS(N(s*ii#i2iPi–iri|iÁiÿi{iÌiSis FastDigitscBs8tZdZeeed„Zdd„Zdd„ZRS(saBuild an array of digit images, and provide a speedy method for converting an integer to an imagecCsŸg|_tii||ƒ}xLtddƒD];}t i ||d|ƒ\}}|ii||gƒq.W|iddi|_|iddi|_dS(Nii s%di(sselfsdigitsspygamesfontsFontsfontpathsfontsizesrangesnumsgfxstexts fontcolorsd_imgsd_rectsappendswidths digitwidthsheights digitheight(sselfsfontpathsfontsizes fontcolorsnumsfontsd_rectsd_img((sH/mnt/gmirror/ports/games/farblazer/work/farblazer-0.7/code/fastdigits.pys__init__s icCsŒg}|djodd|}nd}||}t|ƒdjo|d}nx+|D]#}|it|ƒtdƒƒq]W|SdS( s}convert a number to sequence of digits- handles integers up to 9,999,999; zeropad is number of digits to zeropadis%s0.%dds%diiùÿÿÿs0N( sdigitseqszeropadsfmtsnumssslenscsappendsord(sselfsnumszeropadscsssdigitseqsfmt((sH/mnt/gmirror/ports/games/farblazer/work/farblazer-0.7/code/fastdigits.pys getdigits#s  !cCs½|i||ƒ}ti|it|ƒ|i fƒ}dddf}|i |ƒd}xG|D]?}|i|i|d|dfƒ||i|di7}q`W|iƒ|iƒfSdS(stconvert an integer to an image - pad image with zeros to zeropad places returns image, image.get_rect()iiN(sselfs getdigitssnumszeropadsdigitseqspygamesSurfaces digitwidthslens digitheightsdsurfacesbgds set_colorkeysxsdsblitsdigitsswidthsconvertsget_rect(sselfsnumszeropadsbgdsdsurfacesxsdigitseqsd((sH/mnt/gmirror/ports/games/farblazer/work/farblazer-0.7/code/fastdigits.pys num2image4s% !( s__name__s __module__s__doc__sNonesFONTSIZEsWHITEs__init__s getdigitss num2image(((sH/mnt/gmirror/ports/games/farblazer/work/farblazer-0.7/code/fastdigits.pys FastDigitss  (sosspygames pygame.localssgamesgfxs FONTSIZE_TINYsFONTSIZE_SMALLsFONTSIZE_MEDIUMsFONTSIZE_LARGEsGREYs BLUE_GREYsWHITEsGREENsNonesFONTsFONTSIZEs FastDigits(sFONTSIZE_MEDIUMsgfxs BLUE_GREYsGREYs FastDigitss FONTSIZE_TINYsgamesGREENspygamesFONTSIZE_SMALLsFONTSIZEsWHITEsFONTsossFONTSIZE_LARGE((sH/mnt/gmirror/ports/games/farblazer/work/farblazer-0.7/code/fastdigits.pys?s