News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Pages (27): « First < Previous 1 2 [3] 4 5 6 7 Next > Last »
Search Results
Post Author Forum Replies Views Posted []
  Thread: puzzle remix
Post: RE: puzzle remix

The initial file is the image that is loaded directly, so it makes sense that it would be okay. I'm wondering if the PNG might have an alpha channel...I haven't tested that. I've had one or two test...
mikshaw MurgaLua - General 10 94,654 01-11-2011, 05:18 AM
  Thread: puzzle remix
Post: RE: puzzle remix

After spending an hour or so on a big puzzle, I realized that a feature to save/load the current state of the puzzle would be a handy thing, so I put aside my image reading troubles for now and added ...
mikshaw MurgaLua - General 10 94,654 01-11-2011, 01:02 AM
  Thread: puzzle remix
Post: RE: puzzle remix

I replaced the Fl_Image:getTiles() with a loop that draws a section of the buffer at a time, according to the coordinates I had already created when laying out the tile buttons. It still doesn't work...
mikshaw MurgaLua - General 10 94,654 01-10-2011, 08:28 AM
  Thread: puzzle remix
Post: RE: puzzle remix

Oh yeah...maybe i'm not as awake as I thought. This version doesn't work either, since it tries to grab onscreen data from a window that may be partly offscreen, resulting in blank tiles (or in the p...
mikshaw MurgaLua - General 10 94,654 01-10-2011, 05:17 AM
  Thread: puzzle remix
Post: RE: puzzle remix

Weird things mess up your logic when you stay up too late pulling your hair out. After a restful sleep I spent 5 minutes looking at this, and almost immediately found what I think is a solution. O...
mikshaw MurgaLua - General 10 94,654 01-10-2011, 05:04 AM
  Thread: puzzle remix
Post: RE: puzzle remix

A little progress. I can now use RGB images of any dimensions without having to scale them into the tile grid, so no more crunchy pixels. Unfortunately I don't know how to make it work for GIF image...
mikshaw MurgaLua - General 10 94,654 01-09-2011, 01:09 PM
  Thread: puzzle remix
Post: RE: puzzle remix

I got the tiling-without-scaling-the-image part sorta working. It now crops the original image to dimensions that are as close to the original as I know how to get them, rather than scaling the image...
mikshaw MurgaLua - General 10 94,654 01-09-2011, 04:16 AM
  Thread: puzzle remix
Post: RE: puzzle remix

odd...it seems using a relative file path such as "../filename.jpg" doesn't work. Does anyone know what [b]fl_filename_absolute (char *to, const char *from)[/b] means? Also, it returns an integer, s...
mikshaw MurgaLua - General 10 94,654 01-08-2011, 04:37 AM
  Thread: puzzle remix
Post: puzzle remix

Remixed the slide puzzle into something more closely resembling a jigsaw puzzle, giving a little different gameplay, and making the code a little lighter and less complex...scrambling is less restrict...
mikshaw MurgaLua - General 10 94,654 01-08-2011, 04:17 AM
  Thread: converting seconds to %H:%M:%S
Post: RE: converting seconds to %H:%M:%S

Apparently the os.date() function doesn't do what I thought it did. I found this function posted on a message board: [code]function SecondsToClock(sSeconds) local nSeconds = tonumber(sSeconds) i...
mikshaw MurgaLua - General 1 10,650 01-08-2011, 03:18 AM
  Thread: converting seconds to %H:%M:%S
Post: converting seconds to %H:%M:%S

Maybe this has already been asked? I don't recall. It seems like there's something wrong here...when I attempt to use os.date() to convert seconds into hours:minutes:seconds, the minutes and seconds ...
mikshaw MurgaLua - General 1 10,650 01-08-2011, 02:55 AM
  Thread: slide puzzle
Post: slide puzzle

Dug out the slide puzzle I was working on a couple of years ago, and made a couple of changes. It will now accept commandline options to set the image width (-iw <num>) and tile count (-tc <num>). T...
mikshaw MurgaLua - General 0 4,783 01-05-2011, 01:53 PM
  Thread: Vim syntax file
Post: RE: Vim syntax file

Two months later and I still haven't gotten back to it. So I'll just post what I have now, since I probably won't get back to it again for a while. http://www.murga-projects.com/forum/attachment.php?...
mikshaw MurgaLua - General 7 16,144 01-01-2011, 12:59 AM
  Thread: Transcribe.lua
Post: RE: Transcribe.lua

Crash when you cancel the file open dialog. [code]local filename=fltk.fl_file_chooser("Open transcript","*.txt","transcript.txt",0) local test = io.open(filename,"r")[/code] You're testing to see if f...
mikshaw MurgaLua - General 3 8,014 12-29-2010, 06:02 AM
  Thread: Build process
Post: RE: Build process

Okay then... What about ln -s /usr/include/FL /usr/local/include/FL I don't know if this will help, considering fltk-config is probably still pointing to /usr/include You might end up having to...
mikshaw MurgaLua - General 9 33,736 12-29-2010, 02:40 AM
  Thread: Build process
Post: RE: Build process

I'm no compiling wizard, but maybe add -I/usr/include to CXXFLAGS in Makefile
mikshaw MurgaLua - General 9 33,736 12-29-2010, 02:09 AM
  Thread: access to media files on a LAN server
Post: RE: access to media files on a LAN server

Some changes/improvements... * Moved the temp files into user directory...it seems Vista was having trouble writing to the files when using os.tmpname(). * Added checks to see if the server and media ...
mikshaw MurgaLua - General 19 196,081 12-29-2010, 01:40 AM
  Thread: socket.http bug or aminotdoinitrite?
Post: RE: socket.http bug or aminotdoinitrite?

I think I found a solution of some kind, by testing the server first, and then the files on it [code] host="somehostname" -- check is server is available testy=socket.protect(function() local c = so...
mikshaw MurgaLua - General 3 19,792 12-28-2010, 02:07 PM
  Thread: socket.http bug or aminotdoinitrite?
Post: socket.http bug or aminotdoinitrite?

In the LuaSocket docs: [code]-- tries to connect to server "wrong.host" to retrieve "/" -- and fails because the host does not exist. r, e = http.request("http://wrong.host/") -- r is nil, and e r...
mikshaw MurgaLua - General 3 19,792 12-28-2010, 01:14 PM
  Thread: Listing availiable storage devices
Post: RE: Listing availiable storage devices

Another Linux option is to check /etc/mtab, which is a list of all currently mounted filesystems. [code]for line in io.lines("/etc/mtab") do if string.find(line,"^/dev/") then dev,_=string.gsub(lin...
mikshaw MurgaLua - General 3 7,223 12-28-2010, 10:16 AM
Pages (27): « First < Previous 1 2 [3] 4 5 6 7 Next > Last »