__task void initTask(void){ //sem init os_sem_init(&semIncMin, 0); os_sem_init(&semKeyPress, 0); os_sem_init(&semIncHour, 0); os_sem_init(&semIncSec, 0); initTexts(); //mutex init os_mut_init(&mutTime); os_mut_init(&mut_msg_ptr); os_mut_init(&mut_msg_offset); //task init os_tsk_create(taskSerial, 0x82); os_tsk_create(clock_task, 0x90); os_tsk_create(taskIncHour, 0x7F); os_tsk_create(taskIncMin, 0x80); os_tsk_create(taskIncSec, 0x81); disTaskId = os_tsk_create(updateDisplay, 0x10); keyTaskId = os_tsk_create(key_task, 0x7E); joyTaskId = os_tsk_create(joy_task, 0x7D); //display stuff... os_evt_set(DIS_EVT_MSG_PTR, disTaskId); //end os_tsk_delete_self(); }
void Graphical_UI::setup(){ initTexts(); ParameterServer* ps = ParameterServer::instance(); // create widgets for image and map display std::string visual_topic = ps->get<std::string>("topic_image_mono"); QString vl("Waiting for visual image on topic<br/><i>\""); vl += visual_topic.c_str(); vl += "\"</i>"; visual_image_label = new QLabel(vl); formatImageLabel(visual_image_label); std::string depth_topic = ps->get<std::string>("topic_image_depth"); QString dl("Waiting for depth image on topic<br/><i>\""); dl += depth_topic.c_str(); dl += "\"</i><br/>"; depth_image_label = new QLabel(dl); formatImageLabel(depth_image_label); feature_image_label = new QLabel(tr("<i>Waiting for feature image...</i>")); formatImageLabel(feature_image_label); feature_flow_image_label = new QLabel(*mouseHelpText); formatImageLabel(feature_flow_image_label); QSplitter* hsplitter = new QSplitter(Qt::Horizontal); hsplitter->addWidget(visual_image_label); hsplitter->addWidget(depth_image_label); hsplitter->addWidget(feature_image_label); hsplitter->addWidget(feature_flow_image_label); // setup the layout: // use a splitter as main widget vsplitter = new QSplitter(Qt::Vertical); setCentralWidget(vsplitter); // add glviewer as top item to splitter if(ps->get<bool>("use_glwidget")) { glviewer = new GLViewer(this);//displays the cloud in 3d vsplitter->addWidget(glviewer); } vsplitter->addWidget(hsplitter); createMenus(); setupStatusbar(); setMinimumSize(600, 290); resize(1000, 700); }
CreditsState::CreditsState(Font f, TextureManager* tM) { font = f; texManager = tM; phase = 0; initTexts(); initSprites(texManager); objects.emplace_back(new Player(texManager, &bullets, 3, 80.f, 470.f)); objects.emplace_back(new Enemy(texManager, &bullets, 1, 1200.f, 90.f, 0.f, 0.f)); objects[PLAYER]->setShooting(true); }
Game::Game(): window(sf::VideoMode(640, 480), "SFML Game Development"), fonts("fonts/"), world(window) { initVariables(); loadFonts(); initTexts(); }
void PauseMenuScene::init(SDL_Window* w, SDL_Surface* s, SDL_Renderer* r, int ts, std::pair<int, int> dm, TTF_Font* gF) { Scene::init(w, s, r, ts, dm, gF); initTexts(); }