ahh okay..
what about the .height and .floor in the code what are they for and how can I make them possible in blitz maybe types??
also can you convert these to another coding format..??
m = MM_LookUp( fx,
fy + (Map[(my >= 0) ? my : 0][(mx >= 0) ? mx : 0].Height << (3 - m_Size)),
Map[(my >= 0) ? my : 0][(mx >= 0) ? mx : 0].Floor);
tfy = (fy +
(Map[(my >= 0) ? my : 0][(mx >= 0) ? mx : 0].Height << (3 - m_Size)));
if( ( fx >= 0 ) && ( tfy >= 0 ) && ( fx < ( m_Size == 1 ? 32 : 64 ) ) &&
( tfy < ( m_Size == 1 ? 32 : 64 ) ) )
{
if( tfy >= ( m_Size == 1 ? 32 : 64 ) )
{
m = MM_SOUTH;
TileWalk( mx, my, ISO_SOUTH );
fy -= ( m_Size == 1 ) ? 16 : 32;
}
}
or tell me what there doing in plan if then else not shortcuted
EDIT: Im starting to think that your coding might be to advance for Blitz to do it, but thats just me thinking.. but if maybe you can explain whats going on more then I might be able to understand it
[edited by - fbepyon on June 10, 2004 3:12:05 PM]
[edited by - fbepyon on June 10, 2004 11:43:12 PM]
Iso Mouse Mapping
lol, I love p2p networks, I got a copy of the help files for blitz which will be deleted as soon as I finnish helping you . But unfortunatly they are just grabs from the website, and probably out of date...
OK blitz is a basic language and therefor can not handle some of the more advanced stuff c can do, but a quick re-write of the way the code is written and blitz does the same thing...
So, for example, taking the last line fy -= (m_Size == 1) ? 16 : 32 this can be we-written to:
or
ok the array map in c is defined as an array of struct _Map_Tile, and _Map_Tile is defined as :
and in bltiz this would be (I think) :
I''m not sure how you do linked lists in Blitz, but you should look into it as this will allow you to add tiles onto the base tile, i.e your ground tile is constant and you can change the image on top of that tile to show something building for example, or add bits at different hights (like a weird shaped building being split up and put only in the right places).
ok now back to your code snippet above...
Again this code is not tested, as blitz demo keeps crashing...
When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."
OK blitz is a basic language and therefor can not handle some of the more advanced stuff c can do, but a quick re-write of the way the code is written and blitz does the same thing...
So, for example, taking the last line fy -= (m_Size == 1) ? 16 : 32 this can be we-written to:
if m_Size = 1 fy = fy - 16else fy = fy - 32end if
or
tms = 32 shr m_size ; that''s if this bit of code works...fy = fy - tms
ok the array map in c is defined as an array of struct _Map_Tile, and _Map_Tile is defined as :
typedef struct _Map_Tile{ BYTE Floor; BYTE Height; BYTE Flags; BYTE Object; _Map_Tile *Next;} MapTile, *pMapTile;
and in bltiz this would be (I think) :
Type _Map_TileField Tile ; This was Floor, but I noticed that Floor is a reserved name.Field HeightField FlagsField ObjectEnd Type
I''m not sure how you do linked lists in Blitz, but you should look into it as this will allow you to add tiles onto the base tile, i.e your ground tile is constant and you can change the image on top of that tile to show something building for example, or add bits at different hights (like a weird shaped building being split up and put only in the right places).
ok now back to your code snippet above...
tmx = mxtmy = myts = 3 - m_Sizetms = 64 SHR m_Size ; I''m not sure if this will work...if tmx < 0 then tmx = 0if tmy < 0 then tmy = 0m = MM_LookUp( fx, fy + ( Map( tmy, tmx )\Height shl ts ), Map( tmy, tmx )\Tile )tfy = ( fy + ( Map( tmy, tmx )\Height shr ts ) )if ( fx >= 0 ) And ( tfy >= 0 ) And ( fx < tms ) And ( tfy < tms ) if ( tfy >= tms ) m = MM_SOUTH TileWalk( mx, my, ISO_SOUTH ) fy = fy - ( tms shr 1 ) EndIfEndIf
Again this code is not tested, as blitz demo keeps crashing...
When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."
Most of all of that code, runs now..
there is one minor thing what is the Vars that go into map
Map( tmy, tmx )\Height
Map( tmy, tmx )\Tile
there is one minor thing what is the Vars that go into map
Map( tmy, tmx )\Height
Map( tmy, tmx )\Tile
Map( tmy, tmx )\Height - height above the ground
Map( tmy, tmx )\Tile - the tile image
these are used in the map drawing function to display the correct image at the right height offset on the map.
When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."
Map( tmy, tmx )\Tile - the tile image
these are used in the map drawing function to display the correct image at the right height offset on the map.
When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement