SpelunkyFan wiki

objects/oIntro/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.

oIntro's draw event, 32 lines of GML.

draw_set_color(c_black);draw_set_alpha(fadeLevel);draw_rectangle(view_xview[0], view_yview[0], view_xview[0]+320, view_yview[0]+240, false);draw_set_alpha(1);if (drawStatus > 0){    draw_set_font(global.myFontSmall);    draw_set_color(c_white);    strLen = string_length(str1)*8;    n = 320 - strLen;    n = ceil(n / 2);    draw_text(n, 116-16, str1);}if (drawStatus > 1){    draw_set_font(global.myFontSmall);    draw_set_color(c_white);    strLen = string_length(str2)*8;    n = 320 - strLen;    n = ceil(n / 2);    draw_text(n, 116, str2);}if (drawStatus > 2){    draw_set_font(global.myFontSmall);    draw_set_color(c_white);    strLen = string_length(str3)*8;    n = 320 - strLen;    n = ceil(n / 2);    draw_text(n, 116+16, str3);}