Ejemplo n.º 1
0
void Outrun::tick(Packet* packet, bool tick_frame)
{
    this->tick_frame = tick_frame;
    
    if (cannonball::tick_frame)
        tick_counter++;

    if (game_state >= GS_START1 && game_state <= GS_INGAME)
    {
        if (input.has_pressed(Input::VIEWPOINT))
        {
            int mode = oroad.get_view_mode() + 1;
            if (mode > ORoad::VIEW_INCAR)
                mode = ORoad::VIEW_ORIGINAL;

            oroad.set_view_mode(mode);
        }
    }

    // Only tick the road cpu twice for every time we tick the main cpu
    // The timing here isn't perfect, as normally the road CPU would run in parallel with the main CPU.
    // We can potentially hack this by calling the road CPU twice.
    // Most noticeable with clipping sprites on hills.
      
    // 30 FPS 
    // Updates Game Logic 1/2 frames
    // Updates V-Blank 1/2 frames
    if (config.fps == 30 && config.tick_fps == 30)
    {
        jump_table(packet);
        oroad.tick();
        vint();
        vint();
    }
    // 30/60 FPS Hybrid. (This is the same as the original game)
    // Updates Game Logic 1/2 frames
    // Updates V-Blank 1/1 frames
    else if (config.fps == 60 && config.tick_fps == 30)
    {
        if (cannonball::tick_frame)
        {
            jump_table(packet);
            oroad.tick();
        }
        vint();
    }
    // 60 FPS. Smooth Mode. 
    // Updates Game Logic 1/1 frames
    // Updates V-Blank 1/1 frames
    else
    {
        jump_table(packet);
        oroad.tick();
        vint();
    }

    // Draw FPS
    if (config.video.fps_count)
        ohud.draw_fps_counter(cannonball::fps_counter);
}
Ejemplo n.º 2
0
void Outrun::tick(bool tick_frame)
{
    this->tick_frame = tick_frame;

    /*if (input.has_pressed(Input::LEFT))
    {
        game_state = GS_INIT_BONUS;
        oroad.road_width = 0x90;
        ostats.time_counter = 2;
        oroad.stage_lookup_off = 0x23;
        oinitengine.route_selected = -1;
        oinitengine.init_bonus();
    }*/

    if (cannonball::tick_frame)
    {
        tick_counter++;       
        controls();      // Analogue Controls
    }
    oinputs.do_gear();   // Digital Gear

    // Only tick the road cpu twice for every time we tick the main cpu
    // The timing here isn't perfect, as normally the road CPU would run in parallel with the main CPU.
    // We can potentially hack this by calling the road CPU twice.
    // Most noticeable with clipping sprites on hills.
      
    // 30 FPS 
    // Updates Game Logic 1/2 frames
    // Updates V-Blank 1/2 frames
    if (config.fps == 30 && config.tick_fps == 30)
    {
        jump_table();
        oroad.tick();
        vint();
        vint();
    }
    // 30/60 FPS Hybrid. (This is the same as the original game)
    // Updates Game Logic 1/2 frames
    // Updates V-Blank 1/1 frames
    else if (config.fps == 60 && config.tick_fps == 30)
    {
        if (cannonball::tick_frame)
        {
            jump_table();
            oroad.tick();
        }
        vint();
    }
    // 60 FPS. Smooth Mode. 
    // Updates Game Logic 1/1 frames
    // Updates V-Blank 1/1 frames
    else
    {
        jump_table();
        oroad.tick();
        vint();
    }
}
Ejemplo n.º 3
0
void zone::clear() {
  methodHeap->clear();
  picHeap->clear();
  methodTable->clear();

  LRUhand = NULL;
  LRUtime = 0;
  jump_table()->init();
  _needsCompaction = _needsSweep = false;
  compactTime = 0; compactDuration = 1; minFreeFrac = 0.05;
}
Ejemplo n.º 4
0
 int numberOfNMethods() const 		{ return jump_table()->usedIDs; }
Ejemplo n.º 5
0
int zone::nextNMethodID() { return jump_table()->peekID(); }