Esempio n. 1
0
        public static float GWPGhostModeHook(On.GhostWorldPresence.orig_GhostMode orig, GhostWorldPresence presence, Room room, int camPos)
        {
            if (!RoomCameraHK.ShouldScroll(room))
            {
                return(orig(presence, room, camPos));
            }
            Vector2[] cameraPositions = room.cameraPositions;
            room.cameraPositions = RoomCameraHK.origCameraPositions[room.abstractRoom.name];
            float res = orig(presence, room, camPos);

            room.cameraPositions = cameraPositions;
            return(res);
        }
Esempio n. 2
0
        public static bool ViewedByAnyCameraHook(On.Room.orig_ViewedByAnyCamera orig, Room self, Vector2 pos, float margin)
        {
            RoomCameraHK.EnsureRoomInit(self);
            if (!RoomCameraHK.ShouldScroll(self))
            {
                return(orig(self, pos, margin));
            }
            Vector2[] cameraPositions = self.cameraPositions;
            self.cameraPositions = RoomCameraHK.origCameraPositions[self.abstractRoom.name];
            bool res = orig(self, pos, margin);

            self.cameraPositions = cameraPositions;
            return(res);
        }
Esempio n. 3
0
        public static void SSPGMDrawSpritesHook(On.SuperStructureProjector.GlyphMatrix.orig_DrawSprites orig, SuperStructureProjector.GlyphMatrix matrix, RoomCamera.SpriteLeaser sLeaser, RoomCamera rCam, float timeStacker, Vector2 camPos)
        {
            Room room = rCam.room;

            RoomCameraHK.EnsureRoomInit(room);
            if (!RoomCameraHK.ShouldScroll(room))
            {
                orig(matrix, sLeaser, rCam, timeStacker, camPos);
                return;
            }
            Vector2[] cameraPositions = room.cameraPositions;
            room.cameraPositions = RoomCameraHK.origCameraPositions[room.abstractRoom.name];
            orig(matrix, sLeaser, rCam, timeStacker, camPos);
            room.cameraPositions = cameraPositions;
        }
Esempio n. 4
0
        public static void ACVFCDrawSpritesHook(On.AboveCloudsView.FlyingCloud.orig_DrawSprites orig, AboveCloudsView.FlyingCloud cloud, RoomCamera.SpriteLeaser sLeaser, RoomCamera rCam, float timeStacker, Vector2 camPos)
        {
            Room room = rCam.room;

            RoomCameraHK.EnsureRoomInit(room);
            if (!RoomCameraHK.ShouldScroll(room))
            {
                orig(cloud, sLeaser, rCam, timeStacker, camPos);
                return;
            }
            Vector2[] cameraPositions = room.cameraPositions;
            room.cameraPositions = RoomCameraHK.origCameraPositions[room.abstractRoom.name];
            orig(cloud, sLeaser, rCam, timeStacker, camPos);
            room.cameraPositions = cameraPositions;
        }