void frame_title() { static uint16_t gamepad_oldstate = gamepad_start; // move sprites from level 0 if (gamepad_buttons[0] & ~gamepad_oldstate & gamepad_start) { // reset game lives = START_LIVES; level = START_LEVEL; // enter_leveltitle(); } else if (gamepad_buttons[0] & ~gamepad_oldstate & gamepad_select) { // XXX SFX load_next(); enter_title(); // re-enter title } // kinda like animate_tilemap only simpler uint8_t tile_line = vga_frame%8; // tile line to process == 0-7 for (int i=0;i<16;i++) { // process one line each frame. uint8_t *c = &data[(TILE_TITLE_Y*16+tile_line)*256+TILE_TITLE_X*16+i]; if (get_terrain(*c)==terrain_animated_empty) { *c += (*c%4!=3) ? 1 : -3; } } gamepad_oldstate = gamepad_buttons[0]; }
Owned<Image> Image::Loader::load(const URI::Generic & uri) const { if (auto data = load_next(uri)) { return Image::load(data); } return nullptr; }
sliced_chunk_iterator(comparer_context& ctx, long end) : ctx(ctx) , endit(false) , next(std::numeric_limits<long>::max()) , end(end) { load_next(); }
static PyObject * import_module(char *name, PyObject *globals, PyObject *locals, PyObject *fromlist) { char buf[MAXPATHLEN+1]; int buflen = 0; PyObject *parent, *head, *next, *tail; parent = get_parent(globals, buf, &buflen); if (parent == NULL) return NULL; head = load_next(parent, Py_None, &name, buf, &buflen); if (head == NULL) return NULL; tail = head; Py_INCREF(tail); while (name) { next = load_next(tail, tail, &name, buf, &buflen); Py_DECREF(tail); if (next == NULL) { Py_DECREF(head); return NULL; } tail = next; } if (fromlist != NULL) { if (fromlist == Py_None || !PyObject_IsTrue(fromlist)) fromlist = NULL; } if (fromlist == NULL) { Py_DECREF(tail); return head; } Py_DECREF(head); if (!ensure_fromlist(tail, fromlist, buf, buflen, 0)) { Py_DECREF(tail); return NULL; } return tail; }
bool TIFF_Reader::operate( Raster &raster) { if (is_open_multipage()) { return imp_load_next( raster); } else { return open_multipage() && load_next( raster) && close_multipage(); } }
void game_init(void) { loader_init(); if (load_next()) { frame_handler = frame_error; return; } enter_title(); // title in fact }
/** * ctpl_environ_add_from_stream: * @env: A #CtplEnviron to fill * @stream: A #CtplInputStream from where read the environment description. * @error: Return location for an error, or %NULL to ignore them * * Loads an environment description from a #CtplInputStream. * * Returns: %TRUE on success, %FALSE otherwise. */ gboolean ctpl_environ_add_from_stream (CtplEnviron *env, CtplInputStream *stream, GError **error) { GError *err = NULL; while (! err && ! ctpl_input_stream_eof (stream, &err)) { load_next (env, stream, &err); } if (err) { g_propagate_error (error, err); } return ! err; }
static void up_click_handler(ClickRecognizerRef recognizer, void *context) { if(Loading == 1){ text_layer_set_text(message_text_layer, "PATIENCE!"); layer_mark_dirty(text_layer_get_layer(message_text_layer)); } else if(ErrorExists == 0 && Loading == 0){ load_next(); DictionaryIterator *iter; uint8_t value = 1; app_message_outbox_begin(&iter); dict_write_int(iter, KEY_PREVIOUS, &value, 1, true); dict_write_end(iter); app_message_outbox_send(); } else { APP_LOG(APP_LOG_LEVEL_DEBUG, "Up disabled."); } }
/* get to next chunk head */ const sliced_chunk_iterator& operator++() { cleanup(); load_next(); return *this; }