Compare commits
2 Commits
4da296a135
...
2b09e5a4f0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b09e5a4f0 | |||
| 6834318639 |
1
TODO.md
1
TODO.md
@@ -1,7 +1,6 @@
|
||||
# For MVP functionality
|
||||
|
||||
- fix coloring issue in UlOS 2 beta 5 (and in OpenOS `dmesg`, it appears color-mapper is wrong)
|
||||
- fix FrostOS crash due to empty syscalls table (unsure what is happening)
|
||||
- make `computer` component use callbacks
|
||||
- make a lot of stuff which likely will need to be indirect actually be indirect (modem comms, computer funcs)
|
||||
- make beeps, power, etc. be callbacks on one shared local state (computer environment)
|
||||
|
||||
@@ -187,7 +187,7 @@ end
|
||||
|
||||
function computer.pullSignal(timeout)
|
||||
timeout = timeout or math.huge
|
||||
timeout = math.max(timeout, 0.05)
|
||||
timeout = math.max(timeout, 0.001)
|
||||
local deadline = computer.uptime() + timeout
|
||||
while true do
|
||||
if computer.uptime() >= deadline then return end
|
||||
@@ -286,7 +286,13 @@ sandbox = {
|
||||
rawlen = rawlen,
|
||||
rawset = rawset,
|
||||
select = select,
|
||||
setmetatable = setmetatable,
|
||||
setmetatable = function(t, meta)
|
||||
if type(meta) == "table" then
|
||||
-- nope
|
||||
rawset(meta, "__gc", nil)
|
||||
end
|
||||
return setmetatable(t, meta)
|
||||
end,
|
||||
tonumber = tonumber,
|
||||
tostring = tostring,
|
||||
type = type,
|
||||
@@ -308,8 +314,8 @@ sandbox = {
|
||||
debug = {
|
||||
getinfo = debug.getinfo,
|
||||
traceback = debug.traceback,
|
||||
getlocal = debug.getlocal,
|
||||
getupvalue = debug.getupvalue,
|
||||
getlocal = function(...) return (debug.getlocal(...)) end,
|
||||
getupvalue = function(...) return (debug.getupvalue(...)) end,
|
||||
print = debug.print,
|
||||
},
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "neonucleus.h"
|
||||
#include "ncomplib.h"
|
||||
#include "glyphcache.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -494,6 +495,7 @@ int main(int argc, char **argv) {
|
||||
nn_mountComponent(c, testDrive, 4, false);
|
||||
nn_mountComponent(c, testFlash, 5, false);
|
||||
int ltx = 0, lty = 0;
|
||||
double scrollBuf = 0;
|
||||
while(true) {
|
||||
if(WindowShouldClose()) break;
|
||||
|
||||
@@ -555,9 +557,14 @@ int main(int argc, char **argv) {
|
||||
if(ltx != tx || lty != ty) {
|
||||
ltx = tx;
|
||||
lty = ty;
|
||||
//scrollBuf = 0;
|
||||
nn_pushDrag(c, scraddr, tx, ty, 0, player);
|
||||
}
|
||||
}
|
||||
if(fabs(scrollBuf) >= 1) {
|
||||
nn_pushScroll(c, scraddr, tx, ty, scrollBuf, player);
|
||||
scrollBuf = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -578,6 +585,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
EndDrawing();
|
||||
|
||||
scrollBuf += GetMouseWheelMove();
|
||||
|
||||
// keyboard input
|
||||
|
||||
// 1: clipboard
|
||||
|
||||
Reference in New Issue
Block a user