| Author | Message | 
	
		| k0zy Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Jan 08, 2003 5:53 pm     Post subject: yet another question |  |   |  |  
				| 
 |  
				|  	  | Quote: |  	  | The only other current decompressed data type is the Object section. The object section is determined by having a File Time equal to 0 and the File Name length being 0. 
 Object Section always starts with this 12 byte header:
 4-len str	Type - Should be 'CLV1'. Future .lvz formats will have different types, so handle this gracefully. If not a CLV1, can ignore this decompressed data section, since it is of an unknown type for the Continuum .37 .lvz format.
 i32		Object Count - How many object definitions are in this Object Section.
 i32		Image Count - How many image definitions are in this Object Section.
 | 
 
 Does that mean i loop once more through the files-header with filename = '' and time_t = 0???
 
 How do i start the Objects-header?
 I cant find the 'CLV1'-String in any lvz-file around here...
 
 I ask, cuz DeBuildLevel doesnt recognize my Objects.
 
 Oh, and @mgb: I only add objects if Map or ScreenCount > 0 so we dont have to worry about empty objects.
 
 What i also don't really get is this i1 and i15 thing (not in the quote).
 How do i put them together to an i16?
 I need to put them togther to an i16, or?
 i16 := Integer(String(i1)+String(i15)) ???
 
 I hate to bother u all the time, but... well...
 
 BTW: Where can i find a doc about lvl files?
 (Ah... can't stop programming.... hehe, so fun)
 
 Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Mine GO BOOM Hunch Hunch
 What What
 
  
 
 Age:42
 Gender:
  Joined: Aug 01 2002
 Posts: 3615
 Location: Las Vegas
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Jan 08, 2003 6:02 pm     Post subject: Re: yet another question |  |   |  |  
				| 
 |  
				|  	  | Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... wrote: |  	  | Does that mean i loop once more through the files-header with filename = '' and time_t = 0??? | 
 
 That means that once you find a section that has the filename being empty and the time being 0, that is the only object section. Once you decompress the data after it like any other file, instead of saving it somewhere, you would call another function with that data in it.
 
 
  	  | Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... wrote: |  	  | How do i start the Objects-header? I cant find the 'CLV1'-String in any lvz-file around here...
 | 
 
 Thats because the Object-Header is inside the compressed file section. Just like the file data is compressed, the object info is compressed just like it. So the CLV1 string is inside the compressed filedata of the thing stated above.
 
 
  	  | Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... wrote: |  	  | What i also don't really get is this i1 and i15 thing (not in the quote). How do i put them together to an i16?
 I need to put them togther to an i16, or?
 i16 := Integer(String(i1)+String(i15)) ???
 | 
 
 i16 := i15 << 1 + i1
 The << means 'leftshift'. So that moves the i15 data over one bit, so you can then add in that extra bit correctly. Search your language for how to do bit shifting.
 
 
  	  | Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... wrote: |  	  | BTW: Where can i find a doc about lvl files? | 
 
 The FACTs website had a very nice txt file on lvl information, and bmps. The lvl information is also stored with the bits being aligned differently, so first master the lvz's placement of data before you try to do one that is a bit more complex.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| k0zy Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Jan 08, 2003 6:17 pm     Post subject: |  |   |  |  
				| 
 |  
				| So lets see if i got this one... 
 I make my objects header like in lvzformat.txt.
 Compress it.
 And put it in the file-header as  file-data, but the filenamelength is 0 and the time_t = 0, too?
 
 k, this sould not be so hard at all...
 
 Again that i1 and i15 thing:
 Add i15 and i1 as a string or as an integer, cuz thats not the same..?
 Or was this questions useless cuz i it adds the i1 in another byte as i15 cuz of the leftshift...
 
 Uhm... and thanks for ur patience with me mbg.
 
 Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SOS Server Help Squatter
 
 
 Joined: Dec 02 2002
 Posts: 329
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Jan 08, 2003 11:59 pm     Post subject: |  |   |  |  
				| 
 |  
				| Well, pick up a Delphi book/something about bitwise operations. I would say you shouldn't use strings anywhere with LVZ files.
 
 Oh and the Delphi shift operator was a really funkily named function that's name didn't seem to make any sense. Forgot what it was though.
 _________________
 3y3 4m l33t h4x0r
 j0! 3y3 4m t4lking to j00!
 fux0red 5cr1pt k1dd13.
 -"l33t h41ku"
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Jan 09, 2003 9:47 am     Post subject: |  |   |  |  
				| 
 |  
				| i16 = (i15 * 2) + i1; 
 You guys and your 'levelshifting' are gonna confuse him.  A << 1 is just a multiply by 2.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SOS Server Help Squatter
 
 
 Joined: Dec 02 2002
 Posts: 329
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Jan 09, 2003 10:51 am     Post subject: |  |   |  |  
				| 
 |  
				| Err... yea  Didn't think of that  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| k0zy Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Jan 09, 2003 11:00 am     Post subject: |  |   |  |  
				| 
 |  
				| yep, confused...   and i had to reorginize all my dynamic arrays, from string to integer.
 
 ill try that multiply
 i found out how to leftshift, though.
 
 And that i12 and i4...
 i16 := (i12 *2) + i4;???
 
 For some reason it doesn't recognize the objects...
   
 Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SOS Server Help Squatter
 
 
 Joined: Dec 02 2002
 Posts: 329
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Jan 09, 2003 12:41 pm     Post subject: |  |   |  |  
				| 
 |  
				| ^ being exponent |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Jan 09, 2003 1:41 pm     Post subject: |  |   |  |  
				| 
 |  
				| Yes ^ is exponenet.  Also dont try this with 13 bits in the i12 or 6 bits in the i4 or... Doing so will have quite strange results. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| k0zy Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Jan 10, 2003 7:03 am     Post subject: |  |   |  |  
				| 
 |  
				| I know that ^ means exponent   Just delphi seems not to, lol...
 
 neway...
 I will start over with this lvz compiler, cuz at the moment it chrashes the whole delphi
   
 Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| nintendo64 Seasoned Helper
 
  
 Age:40
 Gender:
  Joined: Dec 01 2002
 Posts: 104
 Location: Dominican Republic
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Jan 10, 2003 2:59 pm     Post subject: |  |   |  |  
				| 
 |  
				| Delphi BitWise Operators 
 Operator	Operation
 not	bitwise negation
 and	bitwise and
 or	bitwise or
 xor	bitwise xor
 shl	bitwise shift left
 shr	bitwise shift right
 
 The operations x shl y and x shr y shift the value of x to the left or right by y bits, which is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26). Note that the value of y is interpreted modulo the size of the type of x. Thus for example, if x is an integer, x shl 40 is interpreted as x shl 8 because an integer is 32 bits and 40 mod 32 is 8.
 
 
 btw
 Raises Base to any power.
 
 Unit
 
 Math
 
 Category
 
 Arithmetic routines
 
 function Power(const Base, Exponent: Extended): Extended;
 
 Description
 
 Power raises Base to any power. For fractional exponents or exponents greater than MaxInt, Base must be greater than 0.
 
 
 and
 
 
 Calculates the integral power of a base value.
 
 Unit
 
 Math
 
 Category
 
 Arithmetic routines
 
 function IntPower(const Base: Extended; const Exponent: Integer): Extended register;
 
 Description
 
 IntPower raises Base to the power specified by Exponent.
 
 -nintendo64
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| k0zy Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Jan 10, 2003 3:18 pm     Post subject: |  |   |  |  
				| 
 |  
				| The problem is not commands or ^ 
 the lvz-compiler crashes whole delphi cuz of  an acces violation
 (usually happens when it tries to acces a dynamic array where there is none)
 
 And if it does not crash, DebuildLevel says it cannot correctly decompress the object section...
 So, at the moment, I'll stick with MakeLevel, and release 1.3.1 tomorrow.
 
 Which will fix a bug, have a bigger objects-listbox and introducing a tiles2pixel convertor.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SOS Server Help Squatter
 
 
 Joined: Dec 02 2002
 Posts: 329
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sat Jan 11, 2003 5:02 am     Post subject: |  |   |  |  
				| 
 |  
				| Post your LVZ compiling code and/or the LVZ that it makes. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |