The Dink Network

Reply to Re: sp_custom

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 28th 2008, 07:16 AM
dinkdead.gif
65535 is a bit small to be working with and get accurate results after extracting it.
What I've got so far:

//example - storing seq (not bigger than 143) and y position.
int &crap = sp_pseq(&current_sprite, -1);
&crap /= 2;
&crap *= 1000;
int &crap2 = sp_y(&current_sprite, -1);
&crap += &crap2;
&crap /= 2;
int &me = sp_editor_num(&current_sprite);
editor_seq(&me, &crap);

//main procedure
//extracting the x,y
int &me = sp_editor_num(&current_sprite);
int &crap = editor_seq(&me, -1);
&crap *= 2;
int &crap2 = &crap;
&crap /= 1000;
&crap *= 2;
sp_seq(&current_sprite, &crap);
&crap /= 2;
&crap *= 1000;
&crap2 -= &crap;
sp_y(&current_sprite, &crap2);

//end of scripting

Which gives a result 1 larger than the numbers I started with, which is ok for x/y but not for the sequence! If I do x and y instead of the seq and y then it's anywhere up to 600 and 400 which means more shrinking to fit into 65535 and less accurate when extracted. Help?