peBool proShaderResource::Init(const peChar *shaderPath) { peChar newPath[PRO_MAX_PATH]; peSTRCPY(newPath, PRO_MAX_PATH, shaderPath); peChar *dot = strchr(newPath, '.'); if(!strcmp(dot, PRO_VERTEX_SHADER_EXTENSION)) { m_pShader = PRO_NEW(proShaderVert, proShaderVert()); } else if(!strcmp(dot, PRO_FRAGMENT_SHADER_EXTENSION)) { m_pShader = PRO_NEW(proShaderPixel, proShaderPixel()); } else if(!strcmp(dot, PRO_HULL_SHADER_EXTENSION)) { m_pShader = PRO_NEW(proShaderHull, proShaderHull()); } else if(!strcmp(dot, PRO_DOMAIN_SHADER_EXTENSION)) { m_pShader = PRO_NEW(proShaderDomain, proShaderDomain()); } assert(m_pShader); return m_pShader->Create(shaderPath); }
Pro_Window* pro_window_new( int w, int h ) { Pro_Window* win = PRO_NEW( Pro_Window ); win->priv = PRO_NEW( Pro_Window_Private ); pro_window_signals_init( win ); pro_window_init( win, w, h ); return win; }
proPhysSim * proPhysSim::getInstance() { if(!s_pPhysSim) { s_pPhysSim = PRO_NEW(proPhysSimBT, proPhysSimBT()); } return s_pPhysSim; }
peBool proShaderResource::Init(const peChar *shaderPath) { peChar newPath[PRO_MAX_PATH]; strcpy(newPath, shaderPath); peChar *dot = strchr(newPath, '.'); if(!strcmp(dot, PRO_VERTEX_SHADER_EXTENSION)) { m_pShader = PRO_NEW(proShaderVertPixel, proShaderVertPixel()); } assert(m_pShader); return m_pShader->Create(shaderPath); }
void pro_window_run( Pro_Window* win ) { pro_signal_emit( win->signal->run, win ); Pro_Window_Private* priv = win->priv; al_start_timer( priv->timer ); priv->quit = 0; while( pro_window_is_open( win ) ) { ALLEGRO_EVENT* event = PRO_NEW( ALLEGRO_EVENT ); al_wait_for_event( priv->event_queue, event ); if ( event->type == ALLEGRO_EVENT_TIMER ) pro_window_redraw( win ); if( event->type == ALLEGRO_EVENT_DISPLAY_CLOSE ) pro_window_quit( win ); } }
proResourceGameObj * proModel::Copy() { proModel *pNewModel = PRO_NEW(proModel, proModel(*this)); return pNewModel; }
proApp::proApp() : g_pAppDef(0) { g_pAppDef = PRO_NEW(proAppDef, proAppDef()); }