Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualparinho7

Posted 01 January 2013 - 10:20 PM

I hope this will help:

I am not familiar with the debugger, I think that the State instance doesn't have a value.
For some reason this doesn't work well

void CStateManager::change_state(GameStates *cur_state, int next_state){

if (next_state != STATE_NULL)
delete cur_state;

switch (next_state) {
case STATE_MAIN_MENU: cur_state = new State_Main_Menu(); break;
case STATE_EXIT: cur_state = new State_Exit(); break;
}
}

and it doesn't execute the cur_state = new State_Exit();

BUT, I have a cout at the constructor and I do get the output so the object is constructed.

#3parinho7

Posted 01 January 2013 - 10:19 PM

I hope this will help:

I am not familiar with the debugger, I think that the State instance doesn't have a value.
For some reason this doesn't work well

void CStateManager::change_state(GameStates *cur_state, int next_state){

if (next_state != STATE_NULL)
delete cur_state;

switch (next_state) {
case STATE_MAIN_MENU: cur_state = new State_Main_Menu(); break;
case STATE_EXIT: cur_state = new State_Exit(); break;
}
}

and it doesn't execute the cur_state = new State_Exit();

BUT, I have a cout at the constructor and I do get the output so the object is constructed.

#2parinho7

Posted 01 January 2013 - 10:19 PM

I hope this will help:

I am not familiar with the debugger, I think that the State instance doesn't have a value.
For some reason this doesn't work well

void CStateManager::change_state(GameStates *cur_state, int next_state){

if (next_state != STATE_NULL)
delete cur_state;

switch (next_state) {
case STATE_MAIN_MENU: cur_state = new State_Main_Menu(); break;
case STATE_EXIT: cur_state = new State_Exit(); break;
}
}

and it doesn't execute the cur_state = new State_Exit();

BUT, I have a cout at the constructor and I do get the output so the object is constructed.

#1parinho7

Posted 01 January 2013 - 10:13 PM

I hope this will help:

PARTNERS