Author Topic: Smart Phone and LOADBMP problem  (Read 5467 times)

Offline AndyH

  • Dr. Type
  • ****
  • Posts: 383
    • View Profile
    • http://www.ovine.net/
Smart Phone and LOADBMP problem
« on: 2008-Feb-17 »
Hi Gernot

Stu has been testing my game on his HTC Touch smart phone - running Windows 6.  The LOADBMP command doesn't appear to be working, but all other commands (LOADSPRITE etc) are working fine.  I'm storing the pictures (as PNG's) in a shoebox (named ovine.ram) and use:

LOADBMP "ovine/splash.png"

To load it in but on the HTC it is not displayed.  It is working fine on my Pocket PC's and on Windows.

Any ideas?

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10753
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Smart Phone and LOADBMP problem
« Reply #1 on: 2008-Feb-17 »
No idea. Bad.
See the errorlog.txt in the temp folder?

Offline bricky91

  • Mc. Print
  • *
  • Posts: 47
    • View Profile
Smart Phone and LOADBMP problem
« Reply #2 on: 2008-Feb-17 »
i have the same problem but on windows... i write LOADBMP "sfondo.png", but it doesn't work... it shows only a black screen...

Offline Kosta

  • Mr. Polyvector
  • ***
  • Posts: 167
  • nothing.....except 'Kosta'
    • View Profile
    • Kosta's Blog
Smart Phone and LOADBMP problem
« Reply #3 on: 2008-Feb-17 »
Quote from: bricky91
i have the same problem but on windows... i write LOADBMP "sfondo.png", but it doesn't work... it shows only a black screen...
is the Path correct ?

type ...
Code: (glbasic) [Select]
PRINT GETCURRENTDIR$(), 0, 0to get the current path
Intel QuadCore, Geforce8600GT,512MB,4GB Ram, 26" TFT
HP nw8440 Schl├Ąppy
GP2X Mk2 (Firmware 3.0)

GLBASIC Blog:
http://www.glbasic.com/forum/index.php?blog=51.0

Offline BumbleBee

  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 891
    • View Profile
Smart Phone and LOADBMP problem
« Reply #4 on: 2008-Feb-17 »
@bricky91

Works fine on Windows.

You also can do this:
Open the folder where your pictures are, then rightclick in the picture -> copy and then go back to the GLBasic IDE, rightclick and paste.
Result: Right path and name of the picture. (Don't forget the Spritenumber)  But it's for LOADSPRITE not LOADBMP.:D

Cheers
The day will come...

CPU Intel(R) Core(TM) i5-3570k, 3.4GHz, AMD Radeon 7800 , 8 GB RAM, Windows 10 Home 64Bit

Offline bricky91

  • Mc. Print
  • *
  • Posts: 47
    • View Profile
Smart Phone and LOADBMP problem
« Reply #5 on: 2008-Feb-17 »
the path is correct (the png image is in the same folder of the game...), so i don't know why it doesn't work... to show the image as a background i only have to write LOADBMP "filename", haven't i?

Offline Kosta

  • Mr. Polyvector
  • ***
  • Posts: 167
  • nothing.....except 'Kosta'
    • View Profile
    • Kosta's Blog
Smart Phone and LOADBMP problem
« Reply #6 on: 2008-Feb-17 »
Quote from: bricky91
the path is correct (the png image is in the same folder of the game...), so i don't know why it doesn't work... to show the image as a background i only have to write LOADBMP "filename", haven't i?
Did you have an Showscreen (at the end of your main-loop or before an keywait)?
Intel QuadCore, Geforce8600GT,512MB,4GB Ram, 26" TFT
HP nw8440 Schl├Ąppy
GP2X Mk2 (Firmware 3.0)

GLBASIC Blog:
http://www.glbasic.com/forum/index.php?blog=51.0

Offline AndyH

  • Dr. Type
  • ****
  • Posts: 383
    • View Profile
    • http://www.ovine.net/
Smart Phone and LOADBMP problem
« Reply #7 on: 2008-Feb-17 »
LOL thread hi-jack.  The original problem has been resolved with a reset of the smart phone :)

Offline bricky91

  • Mc. Print
  • *
  • Posts: 47
    • View Profile
Smart Phone and LOADBMP problem
« Reply #8 on: 2008-Feb-17 »
Quote from: Kosta
Quote from: bricky91
the path is correct (the png image is in the same folder of the game...), so i don't know why it doesn't work... to show the image as a background i only have to write LOADBMP "filename", haven't i?
Did you have an Showscreen (at the end of your main-loop or before an keywait)?
of course... i can see all the sprites... i don't know why it doesn't work...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10753
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Smart Phone and LOADBMP problem
« Reply #9 on: 2008-Feb-17 »
Can you zip-up the whole project (or a small one that shows the error?)

Offline bricky91

  • Mc. Print
  • *
  • Posts: 47
    • View Profile
Smart Phone and LOADBMP problem
« Reply #10 on: 2008-Feb-18 »
yeah, here's the link
game.zip - 0.35MB

thanks for the help! :)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10753
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Smart Phone and LOADBMP problem
« Reply #11 on: 2008-Feb-18 »
Ok. The file sfondo.png is a jpg file. Even if you rename it to .png. Open it with MSPaint, then re-save it as a png and it works fine.

2nd: You use the LOADBMP in _every_ frame. Wrong. Place the LOADBMP in the Init: SUB, and do this only once at the beginning of the program.

Cheers!

Offline bricky91

  • Mc. Print
  • *
  • Posts: 47
    • View Profile
Smart Phone and LOADBMP problem
« Reply #12 on: 2008-Feb-18 »
thanks a lot, now i can see it :)

bye!