#81
Posted 01 July 2013 - 09:45 AM
Recreate it so:
1. Start emulator
2. Type "edit rom/programs/edit
3. See the graphic bug
#82
Posted 01 July 2013 - 08:49 PM
Kingdaro, on 01 July 2013 - 02:46 AM, said:
I don't see a way around that, setfenv is the only "safe" way to sandbox that I'm aware of, especially since the emulator itself is written in lua. What would you suggest as a fix? Can't think of anything atm ( jetlag + very tired )
#84
Posted 02 July 2013 - 09:45 AM
Sorroko, on 01 July 2013 - 08:49 PM, said:
The only thing I can suggest is threads, but we've already been there.
I suppose you would just get a separate script that runs scripts, turn it into a thread, then send a value to the script to tell it what script to run.
Note: the current basic thread functionality is going to be replaced with Channels in the future, and I still don't know how to use Threads or Channels.
#85
Posted 12 July 2013 - 10:59 PM
WHITE = {240,240,240}, ORANGE = {235, 136, 68}, MAGENTA = {195, 84, 205}, LIGHT_BLUE = {102, 137, 211}, YELLOW = {222, 222, 108}, LIME = {65, 205, 52}, PINK = {216, 129, 152}, GRAY = {67,67,67}, LIGHT_GRAY = {153,153,153}, CYAN = {40,118,151}, PURPLE = {123,47,190}, BLUE = {37,49,146}, BROWN = {81,48,26}, GREEN = {59,81,26}, RED = {179,49,44}, BLACK = {0, 0, 0},
#87
#88
Posted 02 August 2013 - 06:18 PM
Edit: Dis was mai 222nd post.
#89
Posted 03 August 2013 - 11:54 PM
Xenthera, on 12 July 2013 - 10:59 PM, said:
-snip-
Icanbreathecode, on 02 August 2013 - 06:18 PM, said:
Thanks everyone, I'm currently on holiday and haven't made any progress however I've got some plans for this when I get back!
#90
Posted 05 August 2013 - 02:45 AM
Change
local text = self.textB[y + 1][x + 1] local offset = self.pixelWidth / 2 - self.font:getWidth(text) / 2 -- Could also create a lookup table of widths on loadto
local text = self.textB[y + 1][x + 1] if text == "\t" then text = " " end if text:byte() < 32 or text:byte() > 126 then text = "?" end local offset = self.pixelWidth / 2 - self.font:getWidth(text) / 2 -- Could also create a lookup table of widths on load
#91
Posted 08 August 2013 - 05:08 PM
But onto some suggestions!
Since you've already included a program of your own (preview) could you implement an API for the emulator, within the emulator? Would it be possible?
Functions like:
emu.titleBar(str) --#Changes the text in the title bar from 'ComputerCraft Emulator' to a provided string. emu.PCsize(int,int) --# Changes the width and height of the PC, like editing the CC config to make the screen bigger.
#92
Posted 09 August 2013 - 06:54 AM
#93
Posted 19 August 2013 - 01:00 PM
It is crashing when using HTTP things like pastebin unfortunately.
And Windows Copy & Paste would be nice
#94
Posted 19 August 2013 - 05:21 PM
#95
Posted 20 August 2013 - 12:50 AM
1. Download thunderhawk via pastebin.
2. run thunderhawk
3. Thunderhawk will run one second and then the thunderhawk file will be deleted.
Edit: after redownloading was HTTP available.
#96
Posted 03 September 2013 - 01:50 PM
- loadstring loads functions into the REAL _G, instead of the one you run bios.lua in. That's a problem. I fixed this in a pull request.
- This thing takes way too much CPU. Both my cores are constantly at ~95% when running this.
EDIT: Or maybe just allow the directory to be set via command line argument.
#97
Posted 03 September 2013 - 02:17 PM
ElvishJerricco, on 03 September 2013 - 01:50 PM, said:
- loadstring loads functions into the REAL _G, instead of the one you run bios.lua in. That's a problem. I fixed this in a pull request.
- This thing takes way too much CPU. Both my cores are constantly at ~95% when running this.
wouldnt this prevent things that were loadstringed to make globals?
#100
Posted 04 September 2013 - 10:59 AM
ElvishJerricco, on 03 September 2013 - 01:50 PM, said:
- loadstring loads functions into the REAL _G, instead of the one you run bios.lua in. That's a problem. I fixed this in a pull request.
- This thing takes way too much CPU. Both my cores are constantly at ~95% when running this.
EDIT: Or maybe just allow the directory to be set via command line argument.
Unfortunately, love2d has a sandbox around the filesystem, they only allow reading/writing inside the love directory :/. There are ways around the sandbox such as using io, however I'd rather stick to the supported filesystem library.
On another note, I haven't forgotten about that update, I'm working on it
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users