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
yet another question

 
Post new topic   Reply to topic Printable version
 View previous topic  Questions that need to be answered for... Post :: Post C ScreenCoords  View next topic  
Author Message
k0zy
Guest


Offline

PostPosted: Wed Jan 08, 2003 5:53 pm    Post subject: yet another question Reply to topic Reply with quote

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
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Wed Jan 08, 2003 6:02 pm    Post subject: Re: yet another question Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
k0zy
Guest


Offline

PostPosted: Wed Jan 08, 2003 6:17 pm    Post subject: Reply to topic Reply with quote

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

PostPosted: Wed Jan 08, 2003 11:59 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Dr Brain
Flip-flopping like a wind surfer


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

PostPosted: Thu Jan 09, 2003 9:47 am    Post subject: Reply to topic Reply with quote

i16 = (i15 * 2) + i1;

You guys and your 'levelshifting' are gonna confuse him. A << 1 is just a multiply by 2.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
SOS
Server Help Squatter


Joined: Dec 02 2002
Posts: 329
Offline

PostPosted: Thu Jan 09, 2003 10:51 am    Post subject: Reply to topic Reply with quote

Err... yea sa_tongue.gif Didn't think of that sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List Send email
k0zy
Guest


Offline

PostPosted: Thu Jan 09, 2003 11:00 am    Post subject: Reply to topic Reply with quote

yep, confused... icon_smile.gif
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... icon_sad.gif

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
Back to top
Dr Brain
Flip-flopping like a wind surfer


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

PostPosted: Thu Jan 09, 2003 11:08 am    Post subject: Reply to topic Reply with quote

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... wrote:
And that i12 and i4...
i16 := (i12 *2) + i4;


That is not correct, it would be
Code: Show/Hide

i16 = (i12 << 4) + i4;

OR
Code: Show/Hide

i16 = (i12 * (2 ^ 4)) + i4;


The 4 in 2 ^ 4 is how many places you want to shift. This was not required in the above exampe because 2^1 = 2.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
SOS
Server Help Squatter


Joined: Dec 02 2002
Posts: 329
Offline

PostPosted: Thu Jan 09, 2003 12:41 pm    Post subject: Reply to topic Reply with quote

^ being exponent
Back to top
View users profile Send private message Add User to Ignore List Send email
Dr Brain
Flip-flopping like a wind surfer


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

PostPosted: Thu Jan 09, 2003 1:41 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
k0zy
Guest


Offline

PostPosted: Fri Jan 10, 2003 7:03 am    Post subject: Reply to topic Reply with quote

I know that ^ means exponent tongue.gif
Just delphi seems not to, lol...

neway...
I will start over with this lvz compiler, cuz at the moment it chrashes the whole delphi icon_sad.gif

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
Back to top
nintendo64
Seasoned Helper


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 104
Location: Dominican Republic
Offline

PostPosted: Fri Jan 10, 2003 2:59 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
k0zy
Guest


Offline

PostPosted: Fri Jan 10, 2003 3:18 pm    Post subject: Reply to topic Reply with quote

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

PostPosted: Sat Jan 11, 2003 5:02 am    Post subject: Reply to topic Reply with quote

Post your LVZ compiling code and/or the LVZ that it makes.
Back to top
View users profile Send private message Add User to Ignore List Send email
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: 670 page(s) served in previous 5 minutes.

phpBB Created this page in 0.473213 seconds : 39 queries executed (92.8%): GZIP compression disabled