Main Menu

Map transpancy problem using mappy

Started by thefrog, November 28, 2007, 09:57:11 AM

Previous topic - Next topic

thefrog

Hello,

I'm having a strange problem when using *.Fmp files in PB V1.71e

Loading a map works, but every Tile number greater than 32 doesnt appear transparent.
The ones below 32 appear transparent


I'm using 128x128 Tiles
The map seems ok in Mapwin


Here is the code

; Include the Mappy File Loader  (only support 2D maps)
   #Include "mappy.pba"


; Dimension The Mappy Type Variable to Hodl the information about
; any loaded maps
Dim Mappy As tMappy
openscreen 800,600,32,2


Filename$="moon3.fmp"

Print "Loading File:";Filename$
Sync

; Load the Mappy File in
Result=LoadMappy(Mappy.tMappy,Filename$)

; create a camera,  This camera will attach it self to the screen
; by default
CreateCamera 1
CameraCls 1,On

Do
; Tell PB to Start capture GFX item to the scene buffer
CaptureToScene
; Clear the buffer
ClsScene
capturedepth 500
boxc  0,0,900,900,1,65535


; draw this map in to the scene at Offset Xpos 0,ypos 0, zpos
DrawMappyLayer Mappy.TMappy,1,%0001,0,0,0

; draw the section of the world the camera sees
DrawCamera 1

; Poll the arrow keys and move the camera is a key is pressed
If DownKey() Then MoveCamera 1,0,2
If UpKey() Then MoveCamera 1,0,-2
If LeftKey() Then MoveCamera 1,-2,0
If RightKey() Then MoveCamera 1,2,0

; Show the Basic info about the Map

Centertext GetScreenWidth()/2,getScreenHeight()/2,"Testing Loading a 24Bit Mappy File"

; Refresh the Screen for the viewer can see it
Sync
Loop


The map is here
http://labarette.free.fr/moon3.rar


When you run the program, you can see that the two top tiles are transparent
and the two bottom ones are not

Thanks for your help




kevin


I'm not sure i understand the problem, as they appear to be transparent here.

thefrog

Hello,

Yes it seem's to work for you
but this is what I get

http://labarette.free.fr/map.jpg


My include file Mappy.pba is Version 0.02     17-19/Apr/2006

Thanks

kevin


Just in case it's changed, here's the Mappy.pba 

thefrog

Thanks for your reply.

I tried the your Mappy include file, but I have the same problem
I tried making an executable and I still have the problem.

but

I tried the executable file on another Computer and it works.
It's a P4 with a Geforce 4 Mx

It doesn't work on my computer which is a Core2duo with a GeForce 7600 GT
I've updated my nVidia drivers


Also, when I compile the Pba file (Testing_24Bit_Map) the executable name is Testing_32Bit_Map.exe

See picture