objects/oStarsRoom/draw.gml
From spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC, shown whole under the Spelunky User License v1.1b. Extracted by spelunky.ai's tools, an unofficial fan project, one file per script or event; the // ==== lines are the extractor's, naming each action of the event. Some scripts are others' work that Derek Yu credits in the source's readme.txt: Martin Piecyk's platform engine, ChevyRay's view scaling scripts and tsg1zzn's Super Sound System.
oStarsRoom's draw event, 17 lines of GML.
life = global.plife;if (life < 0) life = 0;draw_set_font(global.myFont);draw_set_color(c_white);draw_sprite(sHeart, -1, view_xview[0]+8, view_yview[0]+8);draw_text(view_xview[0]+24, view_yview[0]+8, life);draw_sprite(sShopkeeperIcon, -1, view_xview[0]+64, view_yview[0]+8);draw_text(view_xview[0]+64+16, view_yview[0]+8, kills);if (drawStatus < 3){ draw_set_font(global.myFontSmall); draw_set_color(c_yellow); strLen = string_length("SHOTGUN CHALLENGE BEGINS IN 3...")*8; n = 320 - strLen; n = ceil(n / 2); draw_text(n, 216, "SHOTGUN CHALLENGE BEGINS IN " + string(3-drawStatus) + "...");}