David wrote:So you found out these by yourself?
Actually, i started asm on a 486, something like 10 years ago.
Had a very long break, but it's good to speak some little x86 language again =]
David wrote:These seem to be all right.
Note that the red flash is not removed.
By the way, if you want to remove potions from the level, then why do you want to remove their effect?
I decided to leave levels.dat alone.
I will be fine with screen flashing or sfx playing.
David wrote:Did you mean "mov ax, hitp_curr" instead?
That would be A1 6A 4C.
Thx a lot for that quick fix =]
David wrote:I didn't even know about this special event. (Maybe it's a bug?)
Looks to me like a special regen for the fight with the shadow, in case the player takes some time to realise what he has to do to survive.
David wrote:A better solution would be to change the check from guardhp_delta != 0 (jz) to guardhp_delta < 0 (jge).
That is: Search 83 3E 0A 4C 00 74 06, replace 74 with 7D.
Lol, didn't even realise that this code also handled that.
Hopefully, you're there =]
David wrote:When I wrote that hack, I didn't know there would be a version where restarting is enabled but regeneration is disabled.
(You posted the difficulty levels after my "disable HP regen" post.)
Definitely.
David wrote:This is already done with the max hp.
Yeah, i already saw that.
Even if there was a free mem loc to hold current hp, there won't be any space to actually store to it.
However, i found a way to do it, but it doesn't support game loading, and only works in games where max hp isn't altered (which actually fits the difficulty where i want to use it).
It involves saving current hp instead of max, and set max to the appropriate fixed value in the ini section (as well as hp in demo level).
@3E36 : B65F<>6A4C
@4B5A : 833EAA10007408A1DA458946FEEB05C746FE04008B46FEA36A4CA3B65F<>B8XX00833EAA10017F087403B8YY00A3DA45A3B65FA1DA45A36A4C9090 (XX = fixed max hp) (YY = hp in demo)
@4EA0 : B65F<>6A4C
I think i will use that.
David wrote:(Hey, you had an EDIT 4. Did you delete it?)
Actually, yes, cause i found that it would be a bit hard to do.
But if you're curious, i wanted to make the game handle cur & max hp as if it was one single value.
I already found that it could simply be done like this :
@1557 : 7E03A1<>9090A3
The good point is that it would totally remove the necessity to modify all those regeneration situations.
Graphically speaking, instead of having empty life triangles when damaged, they would simply be removed.
The problem is, that the display routine is not supposed to "erase" those triangles, so they remain visible.
However, the kid's life area is properly updated when entering a new level, so i think it may be possible to do it every time he takes damage, or by modifying the display routine itself.
Either way, it seems quite out of reach for me, and the other method seems to work like a charm anyway.