Exemple #1
0
        } /* set_view_location() */

/***********************************************************
*
*   Method:
*       view_follow_mario
*
*   Description:
*       Updates the view location to follow mario.
*
***********************************************************/

        public static void view_follow_mario(model_type m)
        {
            level_type level = m.level;

            if ((view.X + (100 << 12)) < level.mario.physics.position.x)
            {
                int mario_x = level.mario.physics.position.x;
                view.X = mario_x - (100 << 12);
            }

            check_locks(m);

            view_scaled.X = (int)(view.X * scale.X) >> 12;

            view_scaled.X *= -1;
            view_scaled.X += left_edge.Width;
        } /* view_follow_mario() */
/*--------------------------------------------------------------------
*                           METHODS
*  --------------------------------------------------------------------*/

/***********************************************************
*
*   Method:
*       model_type
*
*   Description:
*       Constructor.
*
***********************************************************/

        public model_type()
        {
            level       = new level_1_1_type();
            game_status = game_status_enum.gameplay;
            pipe_status = pipe_status_enum.ENTER;
        } /* model_type() */