#105826 - 2003-10-14 02:48 AM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Maybe I posted too soon or too good of a score and everyone is running scared? [ 14. October 2003, 02:49: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#105828 - 2003-10-14 03:51 AM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Using KixForms...(First time). Had learn about and figure out how colors and palattes worked too.
After I think this approach has been tightened up sufficiently, I may explore alternative methods.
This was not that difficult of a task. It looked as though it would be very difficult at first (see my initial posts.) But after breaking it down into little pieces and attacking each pieces it all fell together nicely. [ 14. October 2003, 04:31: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#105830 - 2003-10-14 04:18 AM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If it wasn't fun, I would not have ripped through the issues and posted first. I just wanted to show that if a dummy like me with no image or KixForms experience could do it anyone could. [ 14. October 2003, 04:32: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#105832 - 2003-10-14 01:34 PM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Hopefully Jens will answer favorably to my position. I put the smarts and effort into the ability to read, understand, and render these files. Since his script does not check for any return codes or errors, I did not include that in my code. But the solution I provided should render any valid PxM (P1, P2, or P3) file.
Valid input produces valid output. Garbage in/Garbage out (my error checking).
|
Top
|
|
|
|
#105833 - 2003-10-14 02:23 PM
Re: KiXgolf: PxMagic
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
quote: k, some questionary on the rules (reading them now): -do we need to verify that the file indeed is PxM image?
If it is not a PxM image then you can't display it and you might need to return an appropriate error code. Covered in the "Inputs & Outputs" section. quote:
-what level of error reporting we need to have? I mean, do we need to check error after each pixel and stuff?
That is entirely up to you, however, the rules say, if you can't display it (for any reason) then an appropriate error code needs to be returned. quote:
-do we need to check for open file handle or can we just open any handle?
Again, if you can't display the image, then return the error code quote:
-can there be whitespace in the file BEFORE the header?
According to the file format defnition, the first two bytes of the file are the "magic identifyer" Px with 0<x<7. quote:
-do we need to close anything? like can we leave the files open etc.
Whaty happens if I run 15 images through the test suite? quote:
-how well we should scan the files for whitespace? as example, the feep-file could be 100k in size with a lot of whitespace in midst of it. should we code around this?
The way I read the PxM definitions, they alwasy talk about a single whitespace as delimiters as they never use the plural of whitespace in anything.
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#105835 - 2003-10-14 02:51 PM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
don't forget about those pesky comments that could appear most anywhere
|
Top
|
|
|
|
#105837 - 2003-10-14 02:58 PM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Oh, we have another playing teeing off.
Per your MSN comments...I expect to see you score posted in an hour.
|
Top
|
|
|
|
#105839 - 2003-10-14 07:10 PM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Bummer J'Lo.
Sorry to hear that I am still in the lead.
|
Top
|
|
|
|
#105842 - 2003-10-14 09:38 PM
Re: KiXgolf: PxMagic
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You know some times one does not have anything better to do. [ 14. October 2003, 21:39: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 366 anonymous users online.
|
|
|