ref: c9c18dc389837a2662b96c6b25689dea5db9e853
parent: 8db3ff18d12a303370d95948e176723c062668ea
author: telephil9 <[email protected]>
date: Sun Oct 25 05:22:39 EDT 2020
Fix casing of exported draw constants Endnone, Enddisc, Endsquare and Endarrow were not named properly.
--- a/lua9.c
+++ b/lua9.c
@@ -211,10 +211,10 @@
luaL_newlib(L, libdraw);
pushglobal(L, "Emouse", Emouse);
pushglobal(L, "Ekeyboard", Ekeyboard);
- pushglobal(L, "Endsquare", Endsquare);
- pushglobal(L, "Enddisc", Enddisc);
- pushglobal(L, "Endarrow", Endarrow);
- pushglobal(L, "Endmask", Endmask);
+ pushglobal(L, "END_SQUARE", Endsquare);
+ pushglobal(L, "END_DISC", Enddisc);
+ pushglobal(L, "END_ARROW", Endarrow);
+ pushglobal(L, "END_MASK", Endmask);
return 1;
}
--- a/sample.lua
+++ b/sample.lua
@@ -17,7 +17,7 @@
draw.draw(screen, screen.r, display.white, nil, ZP)
draw.draw(screen, rect(50, 150, 100, 200), display.black, nil, ZP)
draw.string(screen, pt(110, 160), display.black, nil, font, 'Hello LUA')
- draw.line(screen, pt(50, 210), pt(150, 210), draw.Endsquare, draw.Endarrow, 1, display.black, ZP)
+ draw.line(screen, pt(50, 210), pt(150, 210), draw.END_DISC, draw.END_ARROW, 1, display.black, ZP)
draw.ellipse(screen, pt(300, 300), 200, 100, 2, display.black, ZP)
draw.fillellipse(screen, pt(300, 300), 20, 50, red, ZP)
end