Jul 18, 2010 at 11:41 PM
Pirate Member
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Dec 26, 2007
Location: Lithuania
Posts: 1946
Noxid said:
also Face.pbm can extend at least far enough down to be ridiculously large so that should not be a problem.

Are you implying I can have 203 face pics?
 
Jul 18, 2010 at 11:49 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
WoodenRat said:
Are you implying I can have 203 face pics?

Yes. I believe you can.
 
Jul 18, 2010 at 11:50 PM
Senior Member
"Master using it, and you can have this!"
Join Date: Oct 20, 2009
Location: Kansas
Posts: 84
Age: 27
You can extend tilesets and the facepics?
Damnit, I need to pay more attention to this forum.
Also, could somebody PLEASE help me change the icon?












And find a complete list of all the entities in cave story and what they are called...
 
Jul 19, 2010 at 2:37 AM
Only Love, Maximum Love, Forever
"Life begins and ends with Nu."
Join Date: May 6, 2009
Location: somewhere new
Posts: 2137
Age: 29
adark said:
You can extend tilesets and the facepics?
Damnit, I need to pay more attention to this forum.
Also, could somebody PLEASE help me change the icon?

And find a complete list of all the entities in cave story and what they are called...
Yes you can extend tilesets, but again, keep the width the same.

And you can find an almost complete list built into Cave Editor.
 
Jul 19, 2010 at 2:57 AM
Senior Member
"Master using it, and you can have this!"
Join Date: Oct 20, 2009
Location: Kansas
Posts: 84
Age: 27
The CE I have has no entities named, excluding the later ones with random characters, and it also doesn't have any TSC notes built in either.



New problem:

How do I edit what Flag needs to be set for entitiy flags 4000/800 to work?
 
Jul 19, 2010 at 4:34 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
I have an assembly concept that I've been having trouble grasping for some reason: CDQ. I've read the definition (The cdq instruction sign extends the 32 bit value in eax to 64 bits and places the result in edx:eax by copying bit 31 of eax throughout bits 0..31 of edx) over and over, but I've never been able understand it:confused:. Help please?
 
Jul 19, 2010 at 5:11 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Landonpeanut said:
I have an assembly concept that I've been having trouble grasping for some reason: CDQ. I've read the definition (The cdq instruction sign extends the 32 bit value in eax to 64 bits and places the result in edx:eax by copying bit 31 of eax throughout bits 0..31 of edx) over and over, but I've never been able understand it:confused:. Help please?

Basically it fills EDX with 00's, or if EAX is negative, with FF's. Then it can perform operations with the register EDX:EAX, which is like a bit 64 bit number. This is mostly used for the IDIV command, which divides EDX:EAX by whatever you put in IDIV, and stores it to EAX I think.
 
Jul 19, 2010 at 5:29 AM
Senior Member
"Master using it, and you can have this!"
Join Date: Oct 20, 2009
Location: Kansas
Posts: 84
Age: 27
adark said:
The CE I have has no entities named, excluding the later ones with random characters, and it also doesn't have any TSC notes built in either.



New problem:

How do I edit what Flag needs to be set for entitiy flags 4000/800 to work?

Question bump.

I also still can't edit the icon.
 
Jul 19, 2010 at 6:18 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Thanks GIR.
The piece of code that I'm working with is a bit unusual though. It uses no IDIV after using the CDQ, instead it uses a SUB, and it's just a bit confusing.:(

I guess I'll figure it out eventually though.
 
Jul 19, 2010 at 6:29 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Double post, but I have a question to answer.

As for the TSC information, they are on the right side of the script editor. Click on one of them to read the definition.
diph.php

The entity list (I assume that this is what you mean) is right there (how the heck did you miss it?):
diph.php

I ♥ MS Paint.

I'll look into the icon editing for you.:(
 
Jul 19, 2010 at 6:52 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Landonpeanut said:
It uses no IDIV after using the CDQ, instead it uses a SUB, and it's just a bit confusing.:(

Normally whatever value that is in EAX will be positive, so I think the compiler often just uses CDQ as a quicker and easier way to fill EDX with 00's. Chances are the code after the CDQ uses EDX, right?
 
Jul 19, 2010 at 6:57 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Yep, it does.
Here you go:
Code:
00406625  MOV DWORD PTR DS:[EDX+18],EAX   ;Change X velocity to EAX 
00406628  PUSH 4                          ;Maximum #.
0040662A  PUSH -4                         ;Minimum #.
0040662C  CALL 0040F350                   ;Call the Random # generator function (stores into EAX)
00406631  ADD ESP,8                       ;Fix the Stack.
00406634  SHL EAX,9                       ;Multiply EAX by 2^9
00406637  CDQ                             ;Extends the 32 bit value in eax to 64 bits and places the result in edx:eax
00406638  SUB EAX,EDX                     ;Subtracts EDX from EAX
0040663A  SAR EAX,1                       ;Divide EAX bu 2^1
0040663C  MOV ECX,DWORD PTR SS:[EBP+8]    ;Store the Weapon pointer into ECX
0040663F  MOV DWORD PTR DS:[ECX+1C],EAX   ;Change Y velocity to EAX

It's part of the Bubbler lvl. 3 Launch code that I was looking at a while back....
 
Jul 19, 2010 at 7:03 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Landonpeanut said:
Yep, it does.
Here you go:
Code:
00406625  MOV DWORD PTR DS:[EDX+18],EAX   ;Change X velocity to EAX 
00406628  PUSH 4                          ;Maximum #.
0040662A  PUSH -4                         ;Minimum #.
0040662C  CALL 0040F350                   ;Call the Random # generator function (stores into EAX)
00406631  ADD ESP,8                       ;Fix the Stack.
00406634  SHL EAX,9                       ;Multiply EAX by 2^9
00406637  CDQ                             ;Extends the 32 bit value in eax to 64 bits and places the result in edx:eax
00406638  SUB EAX,EDX                     ;Subtracts EDX from EAX
0040663A  SAR EAX,1                       ;Divide EAX bu 2^1
0040663C  MOV ECX,DWORD PTR SS:[EBP+8]    ;Store the Weapon pointer into ECX
0040663F  MOV DWORD PTR DS:[ECX+1C],EAX   ;Change Y velocity to EAX

It's part of the Bubbler lvl. 3 Launch code that I was looking at a while back....

That is odd...

As far as I can tell though it won't change too much: Try removing the CDQ and sub eax, edx, and see if that does anything.
 
Jul 19, 2010 at 7:11 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
No noticeable change in behavior. Interesting.
 
Jul 19, 2010 at 7:22 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Landonpeanut said:
Yep, it does.
Here you go:
Code:
00406625  MOV DWORD PTR DS:[EDX+18],EAX   ;Change X velocity to EAX 
00406628  PUSH 4                          ;Maximum #.
0040662A  PUSH -4                         ;Minimum #.
0040662C  CALL 0040F350                   ;Call the Random # generator function (stores into EAX)
00406631  ADD ESP,8                       ;Fix the Stack.
00406634  SHL EAX,9                       ;Multiply EAX by 2^9
00406637  CDQ                             ;Extends the 32 bit value in eax to 64 bits and places the result in edx:eax
00406638  SUB EAX,EDX                     ;Subtracts EDX from EAX
0040663A  SAR EAX,1                       ;Divide EAX bu 2^1
0040663C  MOV ECX,DWORD PTR SS:[EBP+8]    ;Store the Weapon pointer into ECX
0040663F  MOV DWORD PTR DS:[ECX+1C],EAX   ;Change Y velocity to EAX

It's part of the Bubbler lvl. 3 Launch code that I was looking at a while back....

Okay, so this is sign extension with CDQ:

If EAX is positive, executing CDQ will cause EDX to hold 0.
If EAX is negative, executing CDQ will cause EDX to hold FFFFFFFF (also known as -1).

The sequence of code:
CDQ
SUB EAX,EDX

Will add 1 to EAX (subtracting -1) if EAX was originally negative, and will do nothing if EAX was originally positive.

Considering that a difference of 1 is completely negligible in terms of velocity, this part of the code is totally pointless.

This:
Code:
PUSH 4
PUSH -4
CALL 0040F350                ;put random # into EAX
ADD ESP,8
SHL EAX,8                     ;multiply EAX by 2^8
MOV ECX,DWORD PTR SS:[EBP+8]
MOV DWORD PTR DS:[ECX+1C],EAX   ;Change Y velocity to EAX

Should do the same thing as:

Code:
00406628  PUSH 4
0040662A  PUSH -4
0040662C  CALL 0040F350
00406631  ADD ESP,8
00406634  SHL EAX,9
00406637  CDQ
00406638  SUB EAX,EDX
0040663A  SAR EAX,1
0040663C  MOV ECX,DWORD PTR SS:[EBP+8]
0040663F  MOV DWORD PTR DS:[ECX+1C],EAX   ;Change Y velocity to EAX
 
Jul 19, 2010 at 7:24 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Landonpeanut said:
No noticeable change in behavior. Interesting.

I thought it might result in that, since if you were to run the 2 extreme ends of that code (eax being 4 or negative 4) the result on the eax that is moved into the y-velocity is rather negligible (if it's negative, it adds 1 to the y-velocity, which does close to nothing). Unless the edx is used a bit after (it probably just has the weapon pointer stored to it later), then it seems like a pointless bit of code. Might just be an artifact of the compiler :S

[Edit]: Carrotlord, why did you ninja me again? D:
 
Jul 19, 2010 at 7:40 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Mar 20, 2010
Location:
Posts: 252
Thank you for doing the calculations that I was too lazy to do Carrotlord (well, and GIR too).:(

On to the next part of the code!:(
 
Jul 19, 2010 at 3:22 PM
Senior Member
"Huzzah!"
Join Date: Jun 28, 2010
Location: Scotland
Posts: 205
Age: 34
I was tryign to make a new background for a throne room i was making, but it isnt working.I saved it as bkcast.pbm in the data folder. Cave editor displays it perfectly, but when i try to actually play it, the middle ground and foreground is displayed only. What am i doing wrong?

(Note that the files dimensions are multiples of 16)
 
Jul 19, 2010 at 3:25 PM
inactive user
"All your forum are belong to us!"
Join Date: Feb 13, 2010
Location: undead parish
Posts: 625
Miles_Valentine said:
I was tryign to make a new background for a throne room i was making, but it isnt working.I saved it as bkcast.pbm in the data folder. Cave editor displays it perfectly, but when i try to actually play it, the middle ground and foreground is displayed only. What am i doing wrong?

(Note that the files dimensions are multiples of 16)

CE was fucking up my bg's too. It only shows the bg during the fade-in. :confused:
 
Jul 19, 2010 at 3:28 PM
Senior Member
"Huzzah!"
Join Date: Jun 28, 2010
Location: Scotland
Posts: 205
Age: 34
Theres got to be a way though, as theres alot of hacks with great new backgrounds, yours included. It's probably something silly i'm doing. Liek at first i had placed the backgrounds in "level" folder, instead of "data".
 
Top