Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codesharing for st0 EntityDracula entities part one #2282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoshSchreuder
Copy link
Contributor

Thanks to @ProjectOblivion for help matching func_801ABBBC.

This brings in the first batch of EntityDracula entities for st0 with codesharing back to PSP.

As part of this I have removed the draculaPrimitive struct and replaced it with some calls to Primitive members which I will comment inline.

F(prim->x2).i.lo = 0;
F(prim->x2).i.hi = prim->y1;
color = i >> 1;
F(prim->x3).val = ((color * color * color) << 8) + 0x80000;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the only usage of anything unique to draculaPrimitive. Since this can be achieved with the F() macro on Primitive, I did not see much reason to keep this struct. IMO it didn't seem to be giving much additional context or clarity to this code, but I can revert this change if required.

// It is stripped on PSP
static Point16 unused[] = {
{80, 64}, {48, 34}, {26, 20}, {18, 16}, {15, 13}, {13, 12}, {12, 11},
{11, 10}, {10, 10}, {9, 9}, {9, 8}, {8, 8}, {8, 4}};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is stripped on PSP, and as such isn't part of D_80180A60. Given the next lot of data is animations from 2DAC8, I suspect this is likely an unused animation but will need to dig into that further to confirm.

@@ -229,7 +229,11 @@ enum SfxModes {
#define NA_SE_EV_WATER_SPLASH 0x7C2
#define NA_SE_VO_DR_TAUNT_1 0x84F
#define NA_SE_VO_DR_TAUNT_2 0x850
#ifdef VERSION_PSP
#define NA_SE_VO_DR_HURT_1 0x85A
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be an intuitive value on PSP:
HURT_1 = 0x85A
HURT_2 = 0x85B
HURT_3 = 0x85C
HURT_4 = 0x85D

Strangely it is not sequential like this on PSX.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be done now but the fact that the numbers are shifted on psp suggests these are part of the sfx enum

@@ -229,7 +229,11 @@ enum SfxModes {
#define NA_SE_EV_WATER_SPLASH 0x7C2
#define NA_SE_VO_DR_TAUNT_1 0x84F
#define NA_SE_VO_DR_TAUNT_2 0x850
#ifdef VERSION_PSP
#define NA_SE_VO_DR_HURT_1 0x85A
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be done now but the fact that the numbers are shifted on psp suggests these are part of the sfx enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants