Thank you, Weedpacket, for the reply... 😉
First of all, I just want to say that I am at the stage of just starting to learn PHP... It's abit hard, but interesting one to learn... I mainly use PHP for my Flash project, and this one is one of that instance... 😉
Um... The problem is that all those 'X' are there just to explain the problem... Those are not there actually... When it is in the file, they are also all '1's...
Maybe sample will be better to tell you what I want to do...
The JPEG file has been parsed and all the black spots in the JPEG file, walls, are indicated as '1' later in the text file... I am not sure how, but maybe there is way to indicate actual 'X' in each corner via the JPEG parse routine???
Anyways... What I am trying to do is to create hotspots, walls, from the JPEG file and have that hotspots imported into Flash... and I am thinking of creating SWF file with Ming, but I cannot do it because I do not know the coordinates... 🙁
I only have one diagonal wall in that JPEG file, but I have at least one or two diagonal walls on each floor plan, so I cannot just disregard it...
Again, I'm assuming boxes are rectangular, and never share corners
Yes... and no... Actually all the walls share its corners, but I am manually removing one pixel width of the wall in Photoshop before I run the JPEG file under the PHP script... It would be wonderful if I don't have to, but I thikn it will be impossible thing to do... (At least to me it is...) So, yes... All the walls are rectangular and never share corners...
(and that the X's do mark corners)
Yes... They are corners, but that's there just for your eyes as I have mentioned already... They are all '1's actually... Maybe it will be possible to put 'X' instead of '1' if it is a corner from the script that I have and that makes things easier??? 😃
Oh, Mordecai... That's a cute pacman... 🙂 Hehe... It won't be the case though... The blocks, walls, are all rectangular, but it could be diagonal ones like this...
0000000000000000000000000000001100
0000000000000000000000000000001100
0000000000000000000000000000001100
0000000000000000000000000000001100
0000000000000000000000000000001100
0000000000000000000000000000001100
0000000000000000000000000000100000
0000000000000000000000000001110000
0000000000000000000000000011100000
0000000000000000000000000111000000
0000000000000000000000001110000000
0000000000000000000000011100000000
0000000000000000000000111000000000
0000000000000000000001110000000000
0000000000000000000011100000000000
0000000000000000000111000000000000
0000000000000000001110000000000000
0000000000000000011100000000000000
0000000000000000011000000000000000
0001111111111111000000000000000000
0001111111111111100000000000000000
0001111111111111000000000000000000
0000000000000000000000000000000000
It is 45' rotated wall at the corner... (Hm... I see that this corner will make top left to bottom right algorithm confused, I guess???)
Thank you for your time... Much appreciated... 😉