Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 22.04.2005, 05:46   #26
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

#note 2

this is lv1 water garden map (middle tower portion)
could kill mob near to the middle tower portion

but if u want to kill mob on lv2, or use the whole city, u'll need lv2 geodata

LineageII C2 Map
--------------------------------------------------
Region: 22_25
MapType: LV 1 [Single Layer/Single Surface]

Available safe transfer point:

N: 82826, 248553, -10879
E: 86056, 250996, -10879
S: 80701, 254739, -10879
W: 79582, 250838, -10879

http://bbs.99nets.com/job.php?action...0725&aid=79301
Digital is offline  
Old 22.04.2005, 07:35   #27
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

so new ideals probably.
i'll take 24_19 as the example. (3,105 kb)

as usual the first 2 bits are 18 13 -> which is 24 19 in DEC

then the next standard 16 bits (which i'm still not really sure of some, would be good if someone would explain/research on it)
80 00 10 00 89 A5 14 00 0C FB 00 00 C1 AE 00 00
i know the first 4 bits here are quite standard to 128,0,16,0,etc

next up is the first position (from top left? from top right? from bottom left? or bottom right? still unsure as well as usual hope someone would tell me again :x)
00 00 78 F1 78 F1 <- first xy's height
then it continues for abit until
00 00 88 F1 78 F1 <- appears and is probably an increase in the height
00 00 90 F1 78 F1 <- probably it's a up slope hill?
00 00 90 F1 80 F1
00 00 A0 F1 90 F1
.... and finally
00 00 D0 F1 B8 F1 <- end of slope
40 00 9F E3 9F E3 9F E3 <- probably multi layered start 40HEX->64DEC, therefore each layer difference is just 64 points difference?
8F E3 8F E3 8F E3 8F E3 <- notice the different bits used.
7F E3 9F E3 8F E3 8F E3 <- probably going down hill again
... until
40 00 7F E3 6F E3 5F E3 <- probably the same 2nd layer. but like this \_/- a drain
... until
00 00 90 F1 80 F1 <- probably like what i said eariler on \_|- but a trench
40 00 1F E3 2F E3 3F E3 <- like i said a trench
....

so what i'm trying to say here is..
the map is just 1 big surface. and we go according to it's xy one by one.
so at each xy we'll have to specify the layers there and pile all the layers of that xy on it. (this is my guess, correct me if i'm wrong)
probably have to look into cruma towers 20_21

P.S i'm probably wrong looking at 20_21
40 00 is probably the indictator of a new layer w/o any other accompanied bits, that makes the rest of whatever's in 40 00 layer correct as in forms a exact 16 bit line each.
so it's like at x,y there's z0,z1,z2,z3,z4,z5,z6,z7 layers

btw the chinese threads above are translated.
Digital is offline  
Old 22.04.2005, 08:09   #28
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

what i believe is...
40 00 is an indicator of a new layer.. and it MIGHT read in a fixed sized block of data for that single xy of a certain square size.

next up is the the even higher layer. the 80 00 indicator which is of 128 bit height and above

so now we have base layer 00, height of 64 using 40 00, height at 128 using 80 00

and 80 00 data is like
80 00 <- indicator
02 00 8F EA 3F E3
02 00 6F EA 3F E3
02 00 5F EA 3F E3
...

still looking for more clues.. will post if i find anything
Digital is offline  
Old 22.04.2005, 08:34   #29
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

some interesting websites
http://www.unrealized.com/main/tools...n=Level+Design
http://www.leveldesigner.com/index.p...ocPrint&ID=165
http://astronomy.swin.edu.au/~pbourk...ormats/unreal/
Digital is offline  
Old 22.04.2005, 10:26   #30
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

ok.. finally all those chinese stuff are making sense to me
are are indeed 3 levels in geodata

Lv1 = 00 base level - single surface, single layer
Lv2 = 40 00 - single surface, multi layer
Lv3 = 80 00 - multi surface, multi layer

as we have seen, lv1 data structure is like this
00 00 78 F1 78 F1 <- the first 2 bits 00 00 is actually the SURFACE info. meaning the base layer 00 00
78 F1 78 F1 <- is of cuz the height data as we know

then we'll look at Lv2,
40 00 <- first the indictor
9F E3 9F E3 <- then the height information directly... notice that there's no indication of surface cuz as said before Lv2 uses the same surface (REMEMBER: single surface, multiple layer)

then we shall look at Lv3
80 00 <- indicator
02 00 8F EA 3F E3 <- notice the first 2 bits? it's 02 00, stating that it's the 2nd surface or there might be 2 surfaces
and of cuz 8F EA 3F E3 is the height information for that XY

more to come,
Digital is offline  
Old 22.04.2005, 11:24   #31
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

more stuff.
i'm sure u guys have noticed this as well
on lv1 y is there 00 00 XX YY?
i'll take one n discuss it with u guys

if it's only a flat area.. most of the time it's gonna be 00 00 XX XX
but when do we encounter 00 00 XX YY?

example taken from 20_21
00 00 78 F1 78 F1 <- flat ground 00 00 XX XX
00 00 70 F1 60 F1 <- changed? isnt it?
00 00 70 F1 50 F1 <-78F1=30961, 70F1=28913, 60F1=24817, 50F1=20721
00 00 60 F1 40 F1 <- so from what we could see here is, the top n bottom height, mostly used Lv2 maps
40 00 AF E2 9F E2 <- see? Lv2 indictor already
-- -- 9F E2 9F E2 <- surprisingly it's the same for lv2 each height is stacked ontop of each other.
....

there's probably something to do with the 128,0,16,0 but havent successfully come with terms with it yet.

other than that is, what we have done so far
our idea b4 of creating conv.dat from client maps couldnt work out
by using the G layer, we used that to construct the 00 00 base layer
but in actual fact. that layer does not everything on it.
that's y when we tested the map, we fell thru the bridge into the river right?
simple fact is... objects are not on the G layer (bridges, walls, etc), it's in another file that's y it's impossible to get the entire map by just converting the G layer.

what i do know is... jiaqiang probably use a pathnoder to record down the coords for different floors.
then using that information, make an area and fill it up with the the color of the height
then using a program to convert that into height data for every XY
then place that information into the geodata to create multi leveled maps
(this is entirely my guess after reading what he have said)

well... i've posted 5 post one after another and i do hope someone reply me if i'm wrong or something
Digital is offline  
Old 22.04.2005, 17:11   #32
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

hmm.. might have some mistakes in my theory tho...
40 00 doesnt seem to be lv2... in fact...
it looks for like a code segement for an object, i.e bridge, wall, etc

and for lv3... it doesnt just start from 80 00
it basically starts from 41 00
but the layering behind is quite accurate i believe, at
01 00
02 00
03 00
04 00
05 00, for 20_21 cruma towers

so basically for indicators
00 00 is base....
40 00 is walkable object height (probably? bridges and stuff)
41~80 00 is probably multiple surfaces at different height

for layering
01 00
02 00
....
for each layer identification.

-end of my observation n research for now-
-now require proof of theory, if possible someone help me out with this-

P.S geodata doesnt have non-walkable stuff info
Digital is offline  
Old 23.04.2005, 07:25   #33
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

Quote:
Originally Posted by Digital
more stuff.
i'm sure u guys have noticed this as well
on lv1 y is there 00 00 XX YY?
i'll take one n discuss it with u guys

if it's only a flat area.. most of the time it's gonna be 00 00 XX XX
but when do we encounter 00 00 XX YY?

example taken from 20_21
00 00 78 F1 78 F1 <- flat ground 00 00 XX XX
00 00 70 F1 60 F1 <- changed? isnt it?
00 00 70 F1 50 F1 <-78F1=30961, 70F1=28913, 60F1=24817, 50F1=20721
00 00 60 F1 40 F1 <- so from what we could see here is, the top n bottom height, mostly used Lv2 maps
40 00 AF E2 9F E2 <- see? Lv2 indictor already
-- -- 9F E2 9F E2 <- surprisingly it's the same for lv2 each height is stacked ontop of each other.
....
extra info - hope it will give some help

XX is ground height
YY is underwater breathing trigger height. Mean if you are lower than YY breath-countdown is starting for you.
At most cases YY-height is 32 points or so lower then ground what means that there are no water at that area.

Thanks vaskes for giving an idea and cooperating
Stazis is offline  
Old 26.04.2005, 05:08   #34
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

some basic info

maps are seperated into tiles
and each maps have 65536 tiles
and it's defined as 256x256 = 665536

and every tile has 128 points/pixels/whateveryouliketocallit
(256x128)x(256x128) = 32768 x 32768 = 1072741824

this is the structure for every single map.
□□x256 tiles
□
x256 tiles

so the problem lies here.
AA BB XX YY
which statement for tiles and which statement is for points?
according to a couple of chinese, they believe it's tiles...
Digital is offline  
Old 26.04.2005, 12:53   #35
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

more translations... (might not be correct, shrugs)

Lv3 is just Lv2 with layers and walls
it isnt difficult, just that it might not have the effect u want

and this "protection layer" concept, on the client side is not needed at all
because on the client itself, the maps already restricted the area where the player could move.

if u really need to add this layer, which is the same as on Lv3 as how the server restrict the player's movement area.
(could this be 40 00???)

NPC movement is not restricted by the client -- they could move through objects, etc
1) by setting npcpos the area for spawning them
2) by setting pathnode to fix the direction of npc movement
3) by setting on Lv3 where they could move
Digital is offline  
Old 26.04.2005, 13:46   #36
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

I thought thats we discussed earlier about level code 80, as being no walkable area, but maybe a a point the you cannot walk past, for example a raised step in cruma, that stop you falling off the edge.

Yellowperil
yellowperil is offline  
Old 26.04.2005, 14:05   #37
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

somehow it doesnt seem to be so... tho
80 00 seems walkable... just like 41 00 ~ 79 00
instead 40 00 doesnt if u looked into it..
Digital is offline  
Old 26.04.2005, 14:25   #38
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

ok, we maybe looking at this in 2 ways.

1 for the mobs to walk (server side)
2 for the client were they can walk

we know for a fact that all movement is controlled party by both sides dependant on the object, mob or item.

Can walk into areas even though the data doesnt exist on the server.

What we would need to clarify is do yu fall through a bridge from the client side, or is it just mobs, summons and items.

I know this may sound like a repeatition off old questions but its always good to go over the stuff we already know.
yellowperil is offline  
Old 26.04.2005, 14:38   #39
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

as we have already clarified before.
[Qn]y do u fall through the bridge?
[Ans] look at the conv.dat, it's a FLAT ground.
meaning there's no information on the server end telling there's an existence of a bridge.
and so the client accepts it, and presume the ground location as said in the conv.dat and falls thru into the river cuz the client could handle difference in ground n water level that's w/o too much of a height.

this fact wun change. and is already proven. so lets not dwell on it again shall we
Digital is offline  
Old 28.04.2005, 16:28   #40
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default



some interesting stuff. lol...
oh well... i suppose the data is read from left to right... top down.
Digital is offline  
Old 30.04.2005, 04:34   #41
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

well some c3 maps' /loc using l2j...
apparently not really correct

这是从SYL的JAVA版服务端里抄出来的,� ��这要谢谢SYL大大


三章地区

-84460 111315 -3135 黎明之神殿

-84700 87200 -3430 黄昏之神殿

-41570 209666 -5086 苦行者之地下古墓

45990 127215 -3645 祭品之地下古墓

109710 173900 -3445 烈士之地下古墓

-26255 77395 -3360 巡礼者之地下古墓

-55310 79890 -3030 圣者之地下古墓

112625 131860 -2870 殉教者之地下古墓

81190 209095 -3670 参拜者之地下古墓

169755 -17955 -3130 使徒之地下古墓

43135 171270 -3670 凶兆之地下宫殿

39615 144475 -3595 异端者之地下宫殿

74059 77240 -3335 烙印之地下宫殿

137290 78530 -3465 异教徒之地下宫殿

-22150 13650 -3150 密启之地下宫殿

110630 82285 -2860 魔道之地下宫殿
Digital is offline  
Old 30.04.2005, 05:55   #42
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

one more idea how to get layer 00 data

there is an ValidatePosition packet in protocol wich makes client to report current pawn position.

What is to write a program teleporting a character point by point with step of 128 and getting data from this ValidatePosition packet.

One of L2J developers i know just collects this data but not forced.

His players just play the game and one of java-classes hooks the data from packets.
Stazis is offline  
Old 30.04.2005, 06:49   #43
flakka
Архивный участник
 
Join Date: Mar 2005
Posts: 1,143
Default

I was thinking about something. How does L2J do it? There's no geodata files for the emu, yet you can freely walk on the surfaces as long as you have the client that supports the areas. Maybe it will be easier to convert that string of code and find out how to make it tick? It would probably save a lot of trouble in the long run when clients get updated as well.

Just a thought. Someone slap me if I'm talking out of my ass. :P
flakka is offline  
Old 30.04.2005, 06:55   #44
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

from what I beleive l2j has items and mobs falling through the floor, also if a mob has to change its hieght to much, it also has problems.

I dont know if these were fixed or not now though.
yellowperil is offline  
Old 30.04.2005, 07:22   #45
flakka
Архивный участник
 
Join Date: Mar 2005
Posts: 1,143
Default

Well they disabled the keyboard movement functions, so it's all pretty much fixed. The problem was the world collision boxes they were having with the Z axis. When you used the keyboard to move and then stop, your character would skip one step forward and fall through. Same with the loot. It didn't calculate the Z axis where the mob was so when it spawned items, it dropped through. It's something they could never fix, so they just disabled them I guess. :roll:

Now here's something interesting.

Code:
package net.sf.l2j.gameserver.clientpackets;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;

import net.sf.l2j.gameserver.ClientThread;
import net.sf.l2j.gameserver.Connection;
import net.sf.l2j.gameserver.model.L2MonsterInstance;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2PcInstance;
import net.sf.l2j.gameserver.model.L2World;
/**
 * This class ...
 * 
 * @version $Revision: 1.13 $ $Date: 2004/10/05 20:02:47 $
 */
public class ValidatePosition extends ClientBasePacket
{
	private static Logger _log = Logger.getLogger(ValidatePosition.class.getName());
	private static final String _C__48_VALIDATEPOSITION = "[C] 48 ValidatePosition";
	/**
	 * packet type id 0x48
	 * format:		cddddd
	 * @param decrypt
	 */
	public ValidatePosition(byte[] decrypt, ClientThread client) throws IOException
	{
		super(decrypt);
		int x  = readD();
		int y  = readD();
		int z  = readD();
		int heading  = readD();
		int data  = readD();
		
		
		L2PcInstance activeChar = client.getActiveChar();
		if (activeChar != null)
		{
			Connection con = client.getConnection();
			
			int realX = activeChar.getX();		
			int realY = activeChar.getY();		
			int realZ = activeChar.getZ();		
			int realHeading = activeChar.getHeading();
			
			//TODO we have to trust the client on the z-coord right now, so just copy the value we got back
			activeChar.setZ(z);
			
			//		_log.fine("client pos: "+ x + " "+y+ " "+z +" head "+heading);
			//		_log.fine("server pos: "+ realX + " "+realY+ " "+realZ +" head "+realHeading);
			
			// check for objects that are now out of range
			activeChar.updateKnownCounter += 1;
			if (activeChar.updateKnownCounter >3)
			{
				int delete = 0;
				List known = activeChar.getKnownObjects();
				ArrayList toBeDeleted = new ArrayList();
				
				for (int i = 0; i < known.size(); i++)
				{
					L2Object obj = (L2Object) known.get(i);
					if (distance(activeChar, obj) > 4000*4000)
					{
						toBeDeleted.add(obj);
						delete++;
					}
				}
				
				if (delete >0)
				{
					for (int i = 0; i < toBeDeleted.size(); i++)
					{
						activeChar.removeKnownObject((L2Object) toBeDeleted.get(i));
						if (toBeDeleted.get(i) instanceof L2MonsterInstance)
						{
							((L2MonsterInstance)toBeDeleted.get(i)).removeKnownObject(activeChar);
						}
						else
						{
							((L2Object)toBeDeleted.get(i)).removeKnownObject(activeChar);
						}
						
					}
					_log.fine("deleted " +delete+" objects");
				}
				
				
				// check for new objects that are now in range
				int newObjects = 0;
				L2Object[] visible = L2World.getInstance().getVisibleObjects(activeChar, 3000);
				for (int i = 0; i < visible.length; i++)
				{
					if (! activeChar.knownsObject(visible[i]))
					{
						activeChar.addKnownObject(visible[i]);
						visible[i].addKnownObject(activeChar);
						newObjects++;
					}
				}
				
				if (newObjects >0)
				{
					_log.fine("added " + newObjects + " new objects");
				}
				activeChar.updateKnownCounter = 0;	
			}
		}
	}
	
	
	private long distance(L2Object a, L2Object b)
	{
		long dX = a.getX() - b.getX();
		long dY = a.getY() - b.getY();
		return ( dX*dX + dY*dY );
	}
	
	/* (non-Javadoc)
	 * @see net.sf.l2j.gameserver.clientpackets.ClientBasePacket#getType()
	 */
	public String getType()
	{
		return _C__48_VALIDATEPOSITION;
	}
	
}
I know java sucks, but maybe we can use L2J's coding to our advantage, LOL. Here's the thing. Maybe we can use the code looking at the geodata files and strip it down and use L2J's coordinates code to go back and forth from the client and the server? It sounds simple, but maybe it's doable? We could use the code the guy made for the L2 C# and see where he changed it and maybe apply them. I think it would be more functional and less of a hassle than stripping down the geodata files. I can't make any friggin sense from those files, lol.

I'll dig more info up and see if I can find something.

[highlight=red:d78ab1de78]EDIT[/highlight:d78ab1de78] Whoa... I found some stuff.

Here's what the guy put in the C# server code for ValidatePosition. As you can see, it's 100x better than the java code, using real mathematical equations.

Code:
using System;
using net.sf.l2cs.logging;
using net.sf.l2cs.gameserver.l2class;

namespace net.sf.l2cs.gameserver.clientpackets
{
	/// <summary>
	/// Summary description for ValidatePosition.
	/// </summary>
	public class ValidatePosition:ClientBasePacket
	{
		private const string _C__48_VALIDATEPOSITION = "[C] 48 ValidatePosition";
		private int[][] testarea = new int[][]
		{
			new int[]{-72791,257365},
			new int[]{-72099,256792},
			new int[]{-72256,256529},
			new int[]{-73011,257148}
		};
		public ValidatePosition(byte[] decrypt, ClientThread client):base(decrypt)
		{
			int x  = ReadD();
			int y  = ReadD();
			int z  = ReadD();
			client.ActiveChar.X = x;
			client.ActiveChar.Y = y;
			client.ActiveChar.Z = z;
		}
		/// <summary>
		/// Reference from http://ouray.cudenver.edu/~na0alber/computational_geometry/Project.htm
		/// </summary>
		/// <param name="x"></param>
		/// <param name="y"></param>
		/// <param name="area"></param>
		/// <returns></returns>
		public bool CheckInArea(int x, int y, int[][] area)
		{
			int i=0, j=0;
			double angle = 0.0;
			double cross_product = 0.0;
			double magnitude1, magnitude2;
			double temp0x, temp0y;
			double temp1x, temp1y;
			for(i = 0; i < area.Length; i++)
			{
				j++;
				if (j==area.Length) j = 0;
				// the following will make equations more readable below
				temp0x = area[i][0] - x;
				temp0y = area[i][1] - y;
				temp1x = area[j][0] - x;
				temp1y = area[j][1] - y;
				// check to see if test point is same as vertex
				if((temp0x == 0 && temp0y == 0) || (temp1x == 0 && temp1y == 0))return true;
				// calculate the dot product and magnitudes for equation
				cross_product = (temp0x * temp1x) + (temp0y * temp1y);
				magnitude1 = Math.Sqrt(Math.Pow(temp0x,2) + Math.Pow(temp0y,2));
				magnitude2 = Math.Sqrt(Math.Pow(temp1x,2) + Math.Pow(temp1y,2));
				// check to see if turning left or right
				if (((temp0x * temp1y) - (temp1x * temp0y)) > 0.0  )

				{

					angle += Math.Acos((double)cross_product/(magnitude1*magnitude2));

				}

				else

				{

					angle -= Math.Acos((double)cross_product/(magnitude1*magnitude2));

				}

 

			}

			angle /= 2*Math.PI;

			angle = Math.Abs(angle);

 
			if (angle > 0.0001) // angle should be close to zero if point outside

			{

				return true;

			}

			else 

			{

				return false;

			}

 

		}

		public override string GetType()
		{
			return _C__48_VALIDATEPOSITION;
		}
	}
}
As you know, he converted the L2J stuff to C#. Now if you look at this code, you'll notice this website, it starts to make a bit more sense. He used this equation.
http://ouray.cudenver.edu/~na0alber/...ry/Project.htm

Now is there any way we can disassemble the server.exe or perhaps compare the two? I have no clue about VS or how to use it... yet. Can someone maybe check out the older post I made in the General section of the modders forum so they can maybe let me know if I'm talking out of my ass? LOL. :shock:
flakka is offline  
Old 01.05.2005, 10:20   #46
badjoe
Архивный участник
 
Join Date: Feb 2005
Posts: 72
Default

Quote:
Originally Posted by Digital


some interesting stuff. lol...
oh well... i suppose the data is read from left to right... top down.
only 4 layers for ToI ? Oo
badjoe is offline  
Old 01.05.2005, 16:17   #47
yellowperil
Архивный участник
 
Join Date: Mar 2005
Posts: 114
Default

the main issue here in not in the exe files, but were we can extract the data from.
Reading through this post you can see we are almost 90% sure how the data file is created, the next main step would be to find a way to extract this information out into a file that can then be converted into a conv.dat

I have spoken to digital abou this, and we cam to the same conclusion, its gonna be tough extracting this data.

For example if we can get each layers out as an image, not a B&W one, but a grayscal hieght map image for each layer (this would give us the max and minimum hieght for that layer), we can really move forward on this, as I believe vaskes has already been able to convert some data from a table like this already.

Until we can get our hands on this type of data, we are gonna end up running around in circles.

The only other possible solution I could come up with, is for a bot to walk the entire area and log each and every walkable x,y,z. then we could xtract the data we need and convert it into the conv.dat.

Anyways I aint supposed to be here atm, see you in a couple of days.

Yellowperil
yellowperil is offline  
Old 09.05.2005, 11:12   #48
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

thx to torune

on lv2 map maker... lets look thru this shall we

/*
MAP GENERATOR V1.0
CODED BY TORUNE(torune @ gmail . com)
*/
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <stdio.h>

int main () {

int MAP_HEIGHT[] = {
//38-3F
(0xE318E318), (0xE46DE46D), (0xE5C2E5C2), (0xE717E717),
(0xE86CE86C), (0xE9C1E9C1), (0xEB16EB16), (0xec6bec6b),
//40-4f
(0xedc0edc0), (0xef15ef15), (0xf06af06a), (0xf1bff1bf),
(0xf314f314), (0xf469f469), (0xf5bef5be), (0xf713f713),
(0xf868f868), (0xf9bdf9bd), (0xfb12fb12), (0xfc67fc67),
(0xfdbcfdbc), (0xff11ff11), (0x00670067), (0x01bc01bc),
//50-5f
(0x03110311), (0x04660466), (0x05bb05bb), (0x07100710),
(0x08650865), (0x09ba09ba), (0x0b0f0b0f), (0x0c640c64),
(0x0db90db9), (0x0f0e0f0e), (0x10631063), (0x11b811b8),
(0x130d130d), (0x14621462), (0x15b715b7), (0x170c170c),
//60-6f
(0x18611861), (0x19b619b6), (0x1b0b1b0b), (0x1c601c60),
(0x1db51db5), (0x1f0a1f0a), (0x205f205f), (0x21b421b4),
(0x23092309), (0x245e245e), (0x25b325b3), (0x27082708),
(0x285d285d), (0x29b229b2), (0x2b072b07), (0x2c5c2c5c),
//70-7f
(0x2db12db1), (0x2f062f06), (0x305b305b), (0x31b031b0),
(0x33053305), (0x345a345a), (0x35af35af), (0x37043704),
(0x38593859), (0x39ae39ae), (0x3b033b03), (0x3c583c58),
(0x3dad3dad), (0x3f023f02), (0x40574057), (0x41ac41ac),
//80-8f
(0x43014301), (0x44564456), (0x45ab45ab), (0x47004700),
(0x48554855), (0x49aa49aa), (0x4aff4aff), (0x4c544c54),
(0x4da94da9), (0x4efe4efe), (0x50535053), (0x51a851a8),
(0x52fd52fd), (0x54525452), (0x55a755a7), (0x56fc56fc),
//90-9f
(0x58515851), (0x59a659a6), (0x5afb5afb), (0x5c505c50),
(0x5da55da5), (0x5efa5efa), (0x604f604f), (0x61a461a4),
(0x62f962f9), (0x644e644e), (0x65a365a3), (0x66f866f8),
(0x684d684d), (0x69a269a2), (0x6af76af7), (0x6c4c6c4c),
//a0-a5
(0x6da16da1), (0x6ef66ef6), (0x704b704b), (0x71a071a0),
(0x72F572F5), (0x744A744A)
};

int RGB[] = {
//0x3
(0x38), (0x39), (0x3a), (0x3b), (0x3C), (0x3D), (0x3E), (0x3F),
//0x4
(0x40), (0x41), (0x42), (0x43), (0x44), (0x45), (0x46), (0x47),
(0x48), (0x49), (0x4a), (0x4b), (0x4c), (0x4d), (0x4e), (0x4f),
//0x5
(0x50), (0x51), (0x52), (0x53), (0x54), (0x55), (0x56), (0x57),
(0x58), (0x59), (0x5a), (0x5b), (0x5c), (0x5d), (0x5e), (0x5f),
//0x6
(0x60), (0x61), (0x62), (0x63), (0x64), (0x65), (0x66), (0x67),
(0x68), (0x69), (0x6a), (0x6b), (0x6c), (0x6d), (0x6e), (0x6f),
//0x7
(0x70), (0x71), (0x72), (0x73), (0x74), (0x75), (0x76), (0x77),
(0x78), (0x79), (0x7a), (0x7b), (0x7c), (0x7d), (0x7e), (0x7f),
//0x8
(0x80), (0x81), (0x82), (0x83), (0x84), (0x85), (0x86), (0x87),
(0x88), (0x89), (0x8a), (0x8b), (0x8c), (0x8d), (0x8e), (0x8f),
//0x9
(0x90), (0x91), (0x92), (0x93), (0x94), (0x95), (0x96), (0x97),
(0x98), (0x99), (0x9a), (0x9b), (0x9c), (0x9d), (0x9e), (0x9f),
//0xA
(0xa0), (0xa1), (0xa2), (0xa3), (0xa4), (0xa5)
};
char BREAK = '00';
char MAP_HEAD[] = { 22, 25, 128};
char MAP_NAME[] = "output_conv.dat";
int HEADER[] = {0x00001000,0x00,0x00000100,0x00000100};
int count = 0;
int ch;
char BmpFile[256] = "lineage2.bmp";

ifstream fin(BmpFile, ios::binary);
ofstream fout(MAP_NAME, ios::binary);

fout.write((char *)(&MAP_HEAD),MAP_HEAD);
fout.write((char *)(&HEADER),HEADER);
while (!fin.eof()) {

ch = fin.get();
count++;
if (count >= 52){
fin.get();
fin.get();
for (int i = 0; i < 110; i++){
if (ch == RGB[i]){
fout.write((char *)(&BREAK),BREAK);
fout.write((char *)(&MAP_HEIGHT[i]),MAP_HEIGHT[i]);
fout.write((char *)(&BREAK),BREAK);
}
}
}
}
fout.close();
}
Digital is offline  
Old 10.05.2005, 07:22   #49
vaskes
Архивный участник
 
Join Date: Feb 2005
Posts: 156
Default

to my mind - this is a shit. one layered simple geo
vaskes is offline  
Old 10.05.2005, 08:41   #50
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

yeah... we'll need to figure out 40 00 identifier block of code...
and we'll be complete with our conv.dat analysis

other than that we are doing quite well
we probably need a program that would load multiple .bmp
which could be allocated to different layers
and from that convert into conv.dat
i believe this is how ncsoft does it as well
Digital is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:29.