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
mapnewsdl.c

 
Post new topic   Reply to topic Printable version
 View previous topic  Security suggestion for AS3 regarding ... Post :: Post Missing source files when loading with...  View next topic  
Author Message
L.C.
Server Help Squatter


Age:26
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 572
Location: Missouri, US
Offline

PostPosted: Sun Mar 07, 2010 12:00 pm    Post subject: mapnewsdl.c Reply to topic Reply with quote

Code: Show/Hide
   if (!data)
   {
      /* emergency hardcoded map: */
      byte emergencymap[] =
      {
         0x2a, 0x74, 0x69, 0x6e, 0x79, 0x6d, 0x61, 0x70,
         0x2e, 0x6c, 0x76, 0x6c, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x78, 0x9c, 0x63, 0x60, 0x60, 0x60, 0x04,
         0x00, 0x00, 0x05, 0x00, 0x02
      };

      lm->LogA(L_WARN, "mapnewsdl", arena, "can't load level file, falling back to tinymap.lvl");
      data = amalloc(sizeof(*data));
      data->checksum = 0x5643ef8a;
      data->uncmplen = 4;
      data->cmplen = sizeof(emergencymap);
      data->cmpmap  = amalloc(sizeof(emergencymap));
      memcpy(data->cmpmap, emergencymap, sizeof(emergencymap));
      astrncpy(data->filename, "tinymap.lvl", sizeof(data->filename));
   }

This results in tinymap.lvl with HEX data 00 00 00 01.

This is what I want to do: change it to either 00 00 00 00 (uses no tile instead of Tile#1) or 00 00 00 FE (uses Tile#254 instead of Tile#1), depending on the first choice working or not.

Could someone explain to me how this code works, line for line, and what it does?

I also want to change tinymap.lvl to _blank.lvl or _asss.lvl, but I think this is as easy as replacing "tinymap" with "_blank" or "_asss".
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Dr Brain
Flip-flopping like a wind surfer


Age:31
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sun Mar 07, 2010 12:42 pm    Post subject: Reply to topic Reply with quote

Most likely the map has been compressed with zlib.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS 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: 64 page(s) served in previous 5 minutes.

phpBB Created this page in 0.091663 seconds : 27 queries executed (73.7%): GZIP compression disabled