Author Topic: PIC MISSING even though Picture is present  (Read 4095 times)

0 Members and 1 Guest are viewing this topic.

Offline defmenge

  • LV3 Member (Next: 100)
  • ***
  • Posts: 40
  • Rating: +5/-0
    • View Profile
PIC MISSING even though Picture is present
« on: June 20, 2011, 01:37:43 pm »
When trying to compile DROD8x into a nostub assembly program after having added a tiny piece of debugging code (a single "Text(" command) as the only change in code since the last compile, Axe parser reported "ERR: PIC MISSING" at 5% in the second pass. Pressing PRGM caused it to point at the line which imports "Pic1" to "Pic1T" as a tile map: [Pic1r]->Pic1T
The picture is present in RAM, and commenting out the "Text(" command I added seemed to solve the problem. However, I need it to debug a certain problem which I'm having with the object buffer, but it won't let me compile with that line of code being there.

Any ideas why this is happening?
Spoiler For DROD8x:
Status: Pre-Alpha "ROACHIE" - Progress: 20%
[=====] Graphics: 100% (full greyscale tileset)
[==== ] Tilemapping: 80% (maps load successfully, additional tile data not implemented yet)
[=    ] Storage formats: 20% (planned: segmentable holds, composed of levels, made of up to [presumably] 8x8 rooms)
[==   ] Monsters: 40% (roaches and roach queen AI working; planned: eyes, wubbas, golems and possibly more)
[     ] Gameplay Elements: 0% (walls and floors only)
[     ] GUI: 0% (very bare in-game GUI)
[=    ] Editor: 20% (integrated basic editor)
Project is currently on hold due to lots of homework and tests.

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: PIC MISSING even though Picture is present
« Reply #1 on: June 20, 2011, 01:42:42 pm »
Hm, try removing the r.
[Pic1] -> Pic1T

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: PIC MISSING even though Picture is present
« Reply #2 on: June 20, 2011, 01:43:22 pm »
Can you post what you were trying to do with the Text command?  Most likely something to do with Pic1T, correct?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: PIC MISSING even though Picture is present
« Reply #3 on: June 20, 2011, 01:53:09 pm »
Hm, try removing the r.
[Pic1] -> Pic1T

But that's a different command -- [Pic1r] should be a valid command to import a tilemap.

As graph suggested, can you post the source near that spot?

EDIT: Where's the Text( relative to that line? Above or below?
« Last Edit: June 20, 2011, 01:53:39 pm by Deep Thought »




Offline defmenge

  • LV3 Member (Next: 100)
  • ***
  • Posts: 40
  • Rating: +5/-0
    • View Profile
Re: PIC MISSING even though Picture is present
« Reply #4 on: June 20, 2011, 01:54:18 pm »
Thanks for your replies, but I just found the solution to the problem myself: I simply had to add more code in other places to make it work again. I'm not exactly sure why this happened. I couldn't remove the r anyway because I need it to read the pic as a tilemap/spritemap, not a regular picture. The Text( command was not related to Pic1T either, it simply printed the result of an expression on the screen: Text(2,48,{L1+123}-(I+1)*2>Dec)
I guess it's a bug related to code size then.

EDIT: The [Pic1r] command is actually the first real command, it's in one of the header programs. The Text( is in the main loop of the game.
« Last Edit: June 20, 2011, 01:55:55 pm by defmenge »
Spoiler For DROD8x:
Status: Pre-Alpha "ROACHIE" - Progress: 20%
[=====] Graphics: 100% (full greyscale tileset)
[==== ] Tilemapping: 80% (maps load successfully, additional tile data not implemented yet)
[=    ] Storage formats: 20% (planned: segmentable holds, composed of levels, made of up to [presumably] 8x8 rooms)
[==   ] Monsters: 40% (roaches and roach queen AI working; planned: eyes, wubbas, golems and possibly more)
[     ] Gameplay Elements: 0% (walls and floors only)
[     ] GUI: 0% (very bare in-game GUI)
[=    ] Editor: 20% (integrated basic editor)
Project is currently on hold due to lots of homework and tests.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: PIC MISSING even though Picture is present
« Reply #5 on: June 20, 2011, 03:23:07 pm »
Excellent, glad it was solved for you.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: PIC MISSING even though Picture is present
« Reply #6 on: June 20, 2011, 03:24:41 pm »
Thanks for your replies, but I just found the solution to the problem myself: I simply had to add more code in other places to make it work again. I'm not exactly sure why this happened.

Glad it works, but if you still don't know why it happened you should post your code because it might be an Axe bug. Make sure posting your code doesn't break the contest rules though (if it's for the contest).




Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: PIC MISSING even though Picture is present
« Reply #7 on: June 21, 2011, 03:09:00 am »
Its a bug, it happened to me more. I always have the pic in RAM the first time compiliing then I just can have the pic in archive.
I'm not a nerd but I pretend:

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: PIC MISSING even though Picture is present
« Reply #8 on: June 21, 2011, 03:28:09 am »
That's interesting it happened when the picture was in RAM because I first thought it might be a page boundary issue.  I'll double check the code for tilemap importing.

EDIT: Found it!  Funny bug... the picture tokens are 2 bytes each so it has to call an extra "read byte" routine after the first byte has already been added to the file name buffer.  That's fine, but there's a 1/256 chance that the parser needs to display the current progress (which it checks for during every "read byte").  It just so happens that TI's routine uses the same buffer to display numbers so the filename being built up will get corrupted and you get a "pic missing".  This will be fixed next version, in the mean time, adding/removing a comment before the [Pic] command should get rid of it.
« Last Edit: June 21, 2011, 04:22:09 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: PIC MISSING even though Picture is present
« Reply #9 on: June 21, 2011, 06:56:03 am »
That bug happened to me too, with my pictures in ROM but each time, I just relaunch Axe without modifying anything and it works ???
So it is not a big bug.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s