MCPcopy Create free account
hub / github.com/demoth/jake2 / Credits_MenuDraw

Method Credits_MenuDraw

client/src/main/java/jake2/client/Menu.java:1783–1822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1781 "names are properties of their", "respective owners.", null };
1782
1783 private static void Credits_MenuDraw() {
1784 int i, y;
1785
1786 /*
1787 * * draw the credits
1788 */
1789 for (i = 0, y = (int) (ClientGlobals.viddef.getHeight() - ((ClientGlobals.cls.realtime - credits_start_time) / 40.0F)); credits[i] != null
1790 && y < ClientGlobals.viddef.getHeight(); y += 10, i++) {
1791 int j, stringoffset = 0;
1792 boolean bold = false;
1793
1794 if (y <= -8)
1795 continue;
1796
1797 if (credits[i].length() > 0 && credits[i].charAt(0) == '+') {
1798 bold = true;
1799 stringoffset = 1;
1800 } else {
1801 bold = false;
1802 stringoffset = 0;
1803 }
1804
1805 for (j = 0; j + stringoffset < credits[i].length(); j++) {
1806 int x;
1807
1808 x = (ClientGlobals.viddef.getWidth() - credits[i].length() * 8 - stringoffset * 8)
1809 / 2 + (j + stringoffset) * 8;
1810
1811 if (bold)
1812 ClientGlobals.re
1813 .DrawChar(x, y,
1814 credits[i].charAt(j + stringoffset) + 128);
1815 else
1816 ClientGlobals.re.DrawChar(x, y, credits[i].charAt(j + stringoffset));
1817 }
1818 }
1819
1820 if (y < 0)
1821 credits_start_time = ClientGlobals.cls.realtime;
1822 }
1823
1824 private static String Credits_Key(int key) {
1825 switch (key) {

Callers 1

Menu_Credits_fMethod · 0.95

Calls 3

getHeightMethod · 0.80
getWidthMethod · 0.80
DrawCharMethod · 0.65

Tested by

no test coverage detected