void set_at_sea(void) { location = 0; remove_all_items(); boatman->set_at_sea(); set_long("You are in a small sailing boat. It is not in a very good "+ "condition, but it does not look as if it will break apart "+ "any minute either. It is the vessel the boatman uses to "+ "ship people to and from Newbie Island. The wind is filling "+ "the white sail and the mast is creaking. Water splashes all "+ "around you as the boat cuts through the grey waves of the "+ "ocean.\n"); add_item("boat|sailing boat|vessel","It is a worn, but still sturdy vessel "+ "carrying people to and from Newbie Island"); add_item("island|newbie island","You can just barely make it out there "+ "far in the distance"); add_item("sail","The sail is filled with the wind"); add_item("mast","The thick wooden mast is creaking loudly, but it "+ "still looks sturdy"); add_item("water","The water splashes all over you as the boat cuts "+ "through the waves. You figure the best thing you can do is "+ "keep your head down. Looking at the raging sea just makes "+ "you seasick!"); add_item("wave|waves","The waves are high, and water splashes all over "+ "you as the boat cuts through them"); add_item("ocean|sea","The grey sea is raging around you. It seems as "+ "if there might be a storm coming"); }
void set_at_island(void) { location = 2; boat_object = make(NOBJECT+"boat_object",island); boat_object->set_location(location); boatman->set_at_island(); remove_all_items(); set_long("You are in a small sailing boat. The boat is pulled up on "+ "the shore of a small island. The water here is calm, but as "+ "you look to the east you see the raging grey ocean. It does "+ "not look as if the journey to Larstown will be very pleasant. "+ "You think it might be a good idea to <disembark>.\n"); add_item("boat","A small, but sturdy sailing boat pulled ashore on "+ "a small island. The leave the boat and get to the island, just "+ "<disembark>."); add_item("shore|island","The boat is pulled up on the shore of the "+ "small island. This must be Newbie Island!. To explore it, "+ "just <disembark>. To go back to Larstown, just sit here and "+ "wait for the boatman to take the boat to sea again"); add_item("Newbie Island|newbie island","The lowest level island in "+ "the Kingdoms"); add_item("water","It is quite calm here by the shore"); add_item("ocean","You don't look forward to crossing it to get back "+ "to Larstown, that's for sure!"); }
static void scene_destroy(void *data) { struct obs_scene *scene = data; remove_all_items(scene); pthread_mutex_destroy(&scene->video_mutex); pthread_mutex_destroy(&scene->audio_mutex); bfree(scene); }
static void scene_load(void *scene, obs_data_t *settings) { obs_data_array_t *items = obs_data_get_array(settings, "items"); size_t count, i; remove_all_items(scene); if (!items) return; count = obs_data_array_count(items); for (i = 0; i < count; i++) { obs_data_t *item_data = obs_data_array_item(items, i); scene_load_item(scene, item_data); obs_data_release(item_data); } obs_data_array_release(items); }
void set_at_lars(void) { location = 1; boat_object = make(NOBJECT+"boat_object",larstown); boat_object->set_location(location); boatman->set_at_lars(); remove_all_items(); set_long("You are in a small sailing boat. The boat lies by the Larstown "+ "pier. The sails are furled right now, but you suspect "+ "they will be set and the boat will embark any moment now. "+ "The grey ocean to the east is raging, and you hope the "+ "journey to Newbie Island won't take too long.\n"); add_item("boat","A small, but sturdy sailing boat lying by the "+ "Larstown pier"); add_item("pier","The stone pier of Larstown"); add_item("sail|sails","The sails are carfully furled in a way that "+ "makes it seem as if they could quickly be set again"); add_item("ocean|sea","The ocean is grey and there seems as if there might "+ "be a storm coming"); add_item("storm","It is not here quite yet, but you can sense it brewing "+ "somewhere out at sea"); }