summaryrefslogtreecommitdiff
path: root/src/object/lightRay.c
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2023-12-30 22:08:56 +0100
committeroctorock <79596758+octorock@users.noreply.github.com>2023-12-30 22:09:30 +0100
commita818f1b7041898d7eee28b5c1c455ba3225e063f (patch)
tree8a249012181db16dc1161efb36cf0abe7c0e9ff1 /src/object/lightRay.c
parent5676cb7890facded77c5cf32c6017fbf12a4d386 (diff)
Use new entity struct for player
Diffstat (limited to 'src/object/lightRay.c')
-rw-r--r--src/object/lightRay.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/object/lightRay.c b/src/object/lightRay.c
index 9d0b6548..a48ffa53 100644
--- a/src/object/lightRay.c
+++ b/src/object/lightRay.c
@@ -41,12 +41,12 @@ void LightRay_Type0(LightRayEntity* this) {
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2800;
gScreen.controls.window0HorizontalDimensions = 0;
gScreen.controls.window0VerticalDimensions = 0xa0;
@@ -66,7 +66,7 @@ void LightRay_Type0(LightRayEntity* this) {
super->action = 2;
super->timer = 60;
gScreen.lcd.displayControl &= 0xdfff;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_134);
}
}
@@ -115,12 +115,12 @@ void LightRay_Type1(LightRayEntity* this) {
super->subtimer = 32;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2000;
gScreen.controls.window0HorizontalDimensions = DISPLAY_WIDTH;
gScreen.controls.window0VerticalDimensions = DISPLAY_HEIGHT;
@@ -139,7 +139,7 @@ void LightRay_Type1(LightRayEntity* this) {
} else {
super->action = 2;
super->timer = 60;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_134);
}
}
@@ -166,12 +166,12 @@ void LightRay_Type2(LightRayEntity* this) {
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.controls.window0HorizontalDimensions = 0x60;
gScreen.controls.window0VerticalDimensions = 0xa0;
break;
@@ -211,7 +211,7 @@ void LightRay_Type2(LightRayEntity* this) {
case 3:
if (--super->timer == 0) {
super->action = 4;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
gRoomControls.scrollSpeed = 2;
}
break;
@@ -236,12 +236,12 @@ void LightRay_Type3(LightRayEntity* this) {
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.controls.window0HorizontalDimensions = 0x80f0;
gScreen.controls.window0VerticalDimensions = 0xa0;
super->subAction = 0x80;
@@ -292,12 +292,12 @@ void LightRay_Type4(LightRayEntity* this) {
super->subtimer = 128;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
break;
case 1:
if (super->timer != 0) {
@@ -310,7 +310,7 @@ void LightRay_Type4(LightRayEntity* this) {
} else {
super->action = 2;
super->timer = 60;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_134);
}
}