Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualagentultra

Posted 12 February 2013 - 12:45 PM

Okay, it might help to note that I have an additional constructor:

 

// App.h

class App {
    ...
public:
    ...
    App(int size, int scale, const char* win_cap);
};

// App.cpp

App::App(int size, int scale, const char* win_cap)
: window_w(size),
  window_h(size / 16 * 9),
  window_scale(scale)
{
    running = false;
    display = NULL;
    window_caption = win_cap;
    
    current_scene = NULL;
    next_scene = NULL;
}

 

Which works just fine if I remove the App::runWithScene method and make App::run public and change the typedef for ScenePtr to a shared_ptr instead of unique... seems weird.


#1agentultra

Posted 12 February 2013 - 12:41 PM

Okay, it might help to note that I have an additional constructor:

 

// App.h

class App {
    ...
public:
    ...
    App(int size, int scale, const char* win_cap);
};

// App.cpp

App::App(int size, int scale, const char* win_cap)
: window_w(size),
  window_h(size / 16 * 9),
  window_scale(scale)
{
    running = false;
    display = NULL;
    window_caption = win_cap;
    
    current_scene = NULL;
    next_scene = NULL;
}

 

Which works just fine if I remove the App::runWithScene method and make App::run public (which it used to be before I started trying to implement this stuff). Maybe I should just forget about runWithScene for now and just make sure I can push and pop scenes off the stack first. I'm not sure why the compiler thinks my constructor is private and how it's related to any of this stuff.


PARTNERS