Author Topic: Terrains to map limit?  (Read 4458 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Terrains to map limit?
« on: November 08, 2014, 02:04:02 pm »
Is there a limit to how many terrains can be associated with a map?

For example these are the terrains associated to the "URBAN00" map:
ROADS URBITS URBAN FRNITURE

could it also be something like:
ROADS URLOL URMISC URWALL URDOOR URDERP URKEK URFOO URBAR STUFF1 STUFF2 DETAILS SUPERCALIFRAGILISTICEXPIALIDOCIOUS

This of course provided that the total amount (sum) of all the MCDs remains within the limit.

Thanks

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Terrains to map limit?
« Reply #1 on: November 08, 2014, 02:42:18 pm »
all mapblockentries entries share the same mapDataSets list
so changing mapDataSets to "ROADS URLOL URMISC ..." for only URBAN00 map(block) is not possible
you can add stuff at the end of the mapDataSets list but the only limit i know of is the 256 mcd entries in all "mapDataSets" entries
i would love to see  a code change like this
Code: [Select]
if (mapheight > 64){
height=mapheight-64
read2bytes=true
}else{
height=mapheight
read2bytes=false
}

took a look at "src/Battlescape/BattlescapeGenerator.cpp"
shouldnt be too hard to do this
problem is convincing warbooy/susuper + mapeditor devs to both allow that

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Terrains to map limit?
« Reply #2 on: November 08, 2014, 03:03:34 pm »
the only limit i know of is the 256 mcd entries in all "mapDataSets" entries
That's the limit I know too.

I used URBAN00 just as an example, I'm actually working on new maps.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Terrains to map limit?
« Reply #3 on: November 08, 2014, 06:23:50 pm »
That's the limit I know too.

I used URBAN00 just as an example, I'm actually working on new maps.

Just a drive by fanboy moment:  Robin: You are awesome!  I love seeing the work that you are doing, and I'm delighted we have such a skilled map maker working in the community!


Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Terrains to map limit?
« Reply #4 on: November 09, 2014, 10:34:23 am »
It's definately a thing that should (and would) be handled someday.

Just not that (>64) way.

Perhaps using bit7 of the Z

map16bit = mapheight & 0x80;
mapheight &= 0x7f;

There's no problem with adding that into OpenXcom, the main problem is to update map editor to work with that.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Terrains to map limit?
« Reply #5 on: November 09, 2014, 06:24:50 pm »
I have another scary doubt:

The 256 MCD entries limit applies just to the single map file, or also to the whole assembled battelscape map (so the sum of "terrains + ufo + craft" MCDs)?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Terrains to map limit?
« Reply #6 on: November 09, 2014, 06:46:54 pm »
it only applies to the mapblock
you can make a craft using 256 mcd entries
you can make a ufo using 256 mcd entries
you can make a bunch of mapblocks for one terrain  using 256 mcd entries
so best case 768 mcd entries in one "real" map
the limit is the map file format (one byte to link mcd entries)
in the oxc code its read as int (at least 2147483648 entries)
with two bytes in a new mapfile format you coudllink 65536 entries per mapblock
that can fill a 90x90 map(block) with height 2 and all tiles have different ground/wall(E/W)/object  mcd entries (should be enough :) )

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Terrains to map limit?
« Reply #7 on: November 09, 2014, 06:51:05 pm »
Phew, safe. I suddenly noticed I accumulated lots of tiles, and got really scared.