Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
LVL file format

 
Post new topic   Reply to topic Printable version
 View previous topic  TileSets Post :: Post changing the burst lvz  View next topic  
Author Message
NewGuy
Guest


Offline

PostPosted: Sat Jun 26, 2004 12:06 am    Post subject: LVL file format Reply to topic Reply with quote

Can someone point to me to a document which explains the LVL file format, or teach me here?
Back to top
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Sat Jun 26, 2004 12:22 am    Post subject: Reply to topic Reply with quote

http://www4.ncsu.edu:8030/~rniyenga/subspace/old/lvlformat.html
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
2dragons
Novice


Joined: Feb 17 2004
Posts: 95
Offline

PostPosted: Sat Jun 26, 2004 1:35 am    Post subject: Reply to topic Reply with quote

If bitmap for tileset is included expect:

/*
* [File Header]
* offset length info
*-------------------------------------------
* 0 2 Type of file "BM"
* 2 4 Total file size
* 6 2 Reserved
* 8 2 Reserved
* 10 4 Bitmap offset
*
* [Info Header]
* offset length info
*-------------------------------------------
* 14 4 Bitmap info size
* 18 4 Width
* 22 4 Height
* 26 2 Bitplane size
* 28 2 Bit count
* 30 4 Compression type
* 34 4 Image size
* 38 4 Pixels per meter
* 42 4 Pixels per meter
* 46 4 Colors used
* 50 4 Colors important
*
* [Color Table] for( i = 0; i < 256; i++ )
* 54*i+0 1 Red
* 54*i+1 1 Green
* 54*i+2 1 Blue
* 54*i+3 1 Not used
*
* Notes:
* Type == BM
* Compression == 0
* Width == 304
* Height == 160
* Bits == 8
*
*/

After that just follow from the other guys link or here's the code I used:

while( available(4) ) {
byte[] b = readIn( 4 );
ByteArray array = new ByteArray( b );
int i = array.readLittleEndianInt( 0 );
int tile = i >> 24 & 0x00ff;
int y = (i >> 12) & 0x03FF;
int x = i & 0x03FF;
m_level[x][y] = tile;
}

Should be enough for you to figure it out
Back to top
View users profile Send private message Add User to Ignore List
NewGuy
Guest


Offline

PostPosted: Sat Jun 26, 2004 1:55 pm    Post subject: Reply to topic Reply with quote

Yeah, seems pretty easy. I'm just not good with windows bmp files, so I'll have to look over that.

Oh, and the color table. Not too sure what to do there.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> LVZ/LVL Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 88 page(s) served in previous 5 minutes.

phpBB Created this page in 0.435279 seconds : 28 queries executed (94.8%): GZIP compression disabled