mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Misc Cleanup 2 (#1260)
* more misc cleanup * PR suggestions * more abs alt, csId * more cleanup, can't help it * fix incorrect sq * more fixes
This commit is contained in:
+11
-11
@@ -695,7 +695,7 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
|
||||
* Tests if current scene switch flag is set.
|
||||
*/
|
||||
s32 Flags_GetSwitch(PlayState* play, s32 flag) {
|
||||
if (flag >= 0 && flag < 0x80) {
|
||||
if ((flag >= 0) && (flag < 0x80)) {
|
||||
return play->actorCtx.sceneFlags.switches[(flag & ~0x1F) >> 5] & (1 << (flag & 0x1F));
|
||||
}
|
||||
return 0;
|
||||
@@ -705,7 +705,7 @@ s32 Flags_GetSwitch(PlayState* play, s32 flag) {
|
||||
* Sets current scene switch flag.
|
||||
*/
|
||||
void Flags_SetSwitch(PlayState* play, s32 flag) {
|
||||
if (flag >= 0 && flag < 0x80) {
|
||||
if ((flag >= 0) && (flag < 0x80)) {
|
||||
play->actorCtx.sceneFlags.switches[(flag & ~0x1F) >> 5] |= 1 << (flag & 0x1F);
|
||||
}
|
||||
}
|
||||
@@ -714,7 +714,7 @@ void Flags_SetSwitch(PlayState* play, s32 flag) {
|
||||
* Unsets current scene switch flag.
|
||||
*/
|
||||
void Flags_UnsetSwitch(PlayState* play, s32 flag) {
|
||||
if (flag >= 0 && flag < 0x80) {
|
||||
if ((flag >= 0) && (flag < 0x80)) {
|
||||
play->actorCtx.sceneFlags.switches[(flag & ~0x1F) >> 5] &= ~(1 << (flag & 0x1F));
|
||||
}
|
||||
}
|
||||
@@ -793,7 +793,7 @@ void Flags_UnsetClearTemp(PlayState* play, s32 roomNumber) {
|
||||
* Tests if current scene collectible flag is set.
|
||||
*/
|
||||
s32 Flags_GetCollectible(PlayState* play, s32 flag) {
|
||||
if (flag > 0 && flag < 0x80) {
|
||||
if ((flag > 0) && (flag < 0x80)) {
|
||||
return play->actorCtx.sceneFlags.collectible[(flag & ~0x1F) >> 5] & (1 << (flag & 0x1F));
|
||||
}
|
||||
return 0;
|
||||
@@ -803,7 +803,7 @@ s32 Flags_GetCollectible(PlayState* play, s32 flag) {
|
||||
* Sets current scene collectible flag.
|
||||
*/
|
||||
void Flags_SetCollectible(PlayState* play, s32 flag) {
|
||||
if (flag > 0 && flag < 0x80) {
|
||||
if ((flag > 0) && (flag < 0x80)) {
|
||||
play->actorCtx.sceneFlags.collectible[(flag & ~0x1F) >> 5] |= 1 << (flag & 0x1F);
|
||||
}
|
||||
}
|
||||
@@ -3268,12 +3268,12 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
||||
|
||||
for (i = 0; i < numTransitionActors; transitionActorList++, i++) {
|
||||
if (transitionActorList->id >= 0) {
|
||||
if ((transitionActorList->sides[0].room >= 0 &&
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[0].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[0].room)) ||
|
||||
(transitionActorList->sides[1].room >= 0 &&
|
||||
(play->roomCtx.curRoom.num == transitionActorList->sides[1].room ||
|
||||
play->roomCtx.prevRoom.num == transitionActorList->sides[1].room))) {
|
||||
if (((transitionActorList->sides[0].room >= 0) &&
|
||||
((play->roomCtx.curRoom.num == transitionActorList->sides[0].room) ||
|
||||
(play->roomCtx.prevRoom.num == transitionActorList->sides[0].room))) ||
|
||||
((transitionActorList->sides[1].room >= 0) &&
|
||||
((play->roomCtx.curRoom.num == transitionActorList->sides[1].room) ||
|
||||
(play->roomCtx.prevRoom.num == transitionActorList->sides[1].room)))) {
|
||||
s16 rotY = DEG_TO_BINANG((transitionActorList->rotY >> 7) & 0x1FF);
|
||||
|
||||
if (Actor_SpawnAsChildAndCutscene(actorCtx, play, transitionActorList->id & 0x1FFF,
|
||||
|
||||
Reference in New Issue
Block a user