~ubuntu-branches/ubuntu/precise/gnome-games/precise-updates

« back to all changes in this revision

Viewing changes to iagno/src/game.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-03-19 20:46:10 UTC
  • mfrom: (1.1.105)
  • Revision ID: package-import@ubuntu.com-20120319204610-2nd2xqq39j8y7t5q
Tags: 1:3.3.92-0ubuntu1
* New upstream release.
  - Swell Foop ported to Vala, no longer in staging
    (LP: #939200, LP: #939210)
* debian/patches/git_fix-iagno-ai.patch: Dropped, upstream
* debian/control.in:
  - Drop no longer needed swell-foop dependencies
* debian/rules:
  - Don't install staging games
* debian/swell-foop.install:
  - Don't install gir files any more; they're not needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
 
211
211
Game* game_construct_copy (GType object_type, Game* game) {
212
212
        Game* self = NULL;
213
 
        gint _tmp0_;
 
213
        Game* _tmp0_;
214
214
        gint _tmp1_;
215
215
        gint _tmp2_;
216
 
        gint _tmp3_;
217
 
        Player* _tmp4_ = NULL;
218
 
        Game* _tmp37_;
219
 
        gint _tmp38_;
 
216
        Game* _tmp3_;
 
217
        gint _tmp4_;
 
218
        gint _tmp5_;
 
219
        Player* _tmp6_ = NULL;
220
220
        Game* _tmp39_;
221
 
        Player _tmp40_;
 
221
        gint _tmp40_;
 
222
        Game* _tmp41_;
 
223
        Player _tmp42_;
222
224
        g_return_val_if_fail (game != NULL, NULL);
223
225
        self = (Game*) g_type_create_instance (object_type);
224
 
        _tmp0_ = game_get_width (self);
225
 
        _tmp1_ = _tmp0_;
226
 
        _tmp2_ = game_get_height (self);
227
 
        _tmp3_ = _tmp2_;
228
 
        _tmp4_ = g_new0 (Player, _tmp1_ * _tmp3_);
 
226
        _tmp0_ = game;
 
227
        _tmp1_ = game_get_width (_tmp0_);
 
228
        _tmp2_ = _tmp1_;
 
229
        _tmp3_ = game;
 
230
        _tmp4_ = game_get_height (_tmp3_);
 
231
        _tmp5_ = _tmp4_;
 
232
        _tmp6_ = g_new0 (Player, _tmp2_ * _tmp5_);
229
233
        self->tiles = (g_free (self->tiles), NULL);
230
 
        self->tiles = _tmp4_;
231
 
        self->tiles_length1 = _tmp1_;
232
 
        self->tiles_length2 = _tmp3_;
 
234
        self->tiles = _tmp6_;
 
235
        self->tiles_length1 = _tmp2_;
 
236
        self->tiles_length2 = _tmp5_;
233
237
        {
234
238
                gint x;
235
239
                x = 0;
236
240
                {
237
 
                        gboolean _tmp5_;
238
 
                        _tmp5_ = TRUE;
 
241
                        gboolean _tmp7_;
 
242
                        _tmp7_ = TRUE;
239
243
                        while (TRUE) {
240
 
                                gboolean _tmp6_;
241
 
                                gint _tmp8_;
242
 
                                gint _tmp9_;
 
244
                                gboolean _tmp8_;
243
245
                                gint _tmp10_;
244
 
                                _tmp6_ = _tmp5_;
245
 
                                if (!_tmp6_) {
246
 
                                        gint _tmp7_;
247
 
                                        _tmp7_ = x;
248
 
                                        x = _tmp7_ + 1;
 
246
                                gint _tmp11_;
 
247
                                gint _tmp12_;
 
248
                                _tmp8_ = _tmp7_;
 
249
                                if (!_tmp8_) {
 
250
                                        gint _tmp9_;
 
251
                                        _tmp9_ = x;
 
252
                                        x = _tmp9_ + 1;
249
253
                                }
250
 
                                _tmp5_ = FALSE;
251
 
                                _tmp8_ = x;
252
 
                                _tmp9_ = game_get_width (self);
253
 
                                _tmp10_ = _tmp9_;
254
 
                                if (!(_tmp8_ < _tmp10_)) {
 
254
                                _tmp7_ = FALSE;
 
255
                                _tmp10_ = x;
 
256
                                _tmp11_ = game_get_width (self);
 
257
                                _tmp12_ = _tmp11_;
 
258
                                if (!(_tmp10_ < _tmp12_)) {
255
259
                                        break;
256
260
                                }
257
261
                                {
258
262
                                        gint y;
259
263
                                        y = 0;
260
264
                                        {
261
 
                                                gboolean _tmp11_;
262
 
                                                _tmp11_ = TRUE;
 
265
                                                gboolean _tmp13_;
 
266
                                                _tmp13_ = TRUE;
263
267
                                                while (TRUE) {
264
 
                                                        gboolean _tmp12_;
265
 
                                                        gint _tmp14_;
266
 
                                                        gint _tmp15_;
 
268
                                                        gboolean _tmp14_;
267
269
                                                        gint _tmp16_;
268
 
                                                        Player* _tmp17_;
269
 
                                                        gint _tmp17__length1;
270
 
                                                        gint _tmp17__length2;
 
270
                                                        gint _tmp17_;
271
271
                                                        gint _tmp18_;
272
 
                                                        gint _tmp19_;
273
 
                                                        Game* _tmp20_;
274
 
                                                        Player* _tmp21_;
275
 
                                                        gint _tmp21__length1;
276
 
                                                        gint _tmp21__length2;
277
 
                                                        gint _tmp22_;
278
 
                                                        gint _tmp23_;
279
 
                                                        Player _tmp24_;
280
 
                                                        Player _tmp25_;
281
 
                                                        _tmp12_ = _tmp11_;
282
 
                                                        if (!_tmp12_) {
283
 
                                                                gint _tmp13_;
284
 
                                                                _tmp13_ = y;
285
 
                                                                y = _tmp13_ + 1;
 
272
                                                        Player* _tmp19_;
 
273
                                                        gint _tmp19__length1;
 
274
                                                        gint _tmp19__length2;
 
275
                                                        gint _tmp20_;
 
276
                                                        gint _tmp21_;
 
277
                                                        Game* _tmp22_;
 
278
                                                        Player* _tmp23_;
 
279
                                                        gint _tmp23__length1;
 
280
                                                        gint _tmp23__length2;
 
281
                                                        gint _tmp24_;
 
282
                                                        gint _tmp25_;
 
283
                                                        Player _tmp26_;
 
284
                                                        Player _tmp27_;
 
285
                                                        _tmp14_ = _tmp13_;
 
286
                                                        if (!_tmp14_) {
 
287
                                                                gint _tmp15_;
 
288
                                                                _tmp15_ = y;
 
289
                                                                y = _tmp15_ + 1;
286
290
                                                        }
287
 
                                                        _tmp11_ = FALSE;
288
 
                                                        _tmp14_ = y;
289
 
                                                        _tmp15_ = game_get_height (self);
290
 
                                                        _tmp16_ = _tmp15_;
291
 
                                                        if (!(_tmp14_ < _tmp16_)) {
 
291
                                                        _tmp13_ = FALSE;
 
292
                                                        _tmp16_ = y;
 
293
                                                        _tmp17_ = game_get_height (self);
 
294
                                                        _tmp18_ = _tmp17_;
 
295
                                                        if (!(_tmp16_ < _tmp18_)) {
292
296
                                                                break;
293
297
                                                        }
294
 
                                                        _tmp17_ = self->tiles;
295
 
                                                        _tmp17__length1 = self->tiles_length1;
296
 
                                                        _tmp17__length2 = self->tiles_length2;
297
 
                                                        _tmp18_ = x;
298
 
                                                        _tmp19_ = y;
299
 
                                                        _tmp20_ = game;
300
 
                                                        _tmp21_ = _tmp20_->tiles;
301
 
                                                        _tmp21__length1 = _tmp20_->tiles_length1;
302
 
                                                        _tmp21__length2 = _tmp20_->tiles_length2;
303
 
                                                        _tmp22_ = x;
304
 
                                                        _tmp23_ = y;
305
 
                                                        _tmp24_ = _tmp21_[(_tmp22_ * _tmp21__length2) + _tmp23_];
306
 
                                                        _tmp17_[(_tmp18_ * _tmp17__length2) + _tmp19_] = _tmp24_;
307
 
                                                        _tmp25_ = _tmp17_[(_tmp18_ * _tmp17__length2) + _tmp19_];
 
298
                                                        _tmp19_ = self->tiles;
 
299
                                                        _tmp19__length1 = self->tiles_length1;
 
300
                                                        _tmp19__length2 = self->tiles_length2;
 
301
                                                        _tmp20_ = x;
 
302
                                                        _tmp21_ = y;
 
303
                                                        _tmp22_ = game;
 
304
                                                        _tmp23_ = _tmp22_->tiles;
 
305
                                                        _tmp23__length1 = _tmp22_->tiles_length1;
 
306
                                                        _tmp23__length2 = _tmp22_->tiles_length2;
 
307
                                                        _tmp24_ = x;
 
308
                                                        _tmp25_ = y;
 
309
                                                        _tmp26_ = _tmp23_[(_tmp24_ * _tmp23__length2) + _tmp25_];
 
310
                                                        _tmp19_[(_tmp20_ * _tmp19__length2) + _tmp21_] = _tmp26_;
 
311
                                                        _tmp27_ = _tmp19_[(_tmp20_ * _tmp19__length2) + _tmp21_];
308
312
                                                }
309
313
                                        }
310
314
                                }
315
319
                gint i;
316
320
                i = 0;
317
321
                {
318
 
                        gboolean _tmp26_;
319
 
                        _tmp26_ = TRUE;
 
322
                        gboolean _tmp28_;
 
323
                        _tmp28_ = TRUE;
320
324
                        while (TRUE) {
321
 
                                gboolean _tmp27_;
322
 
                                gint _tmp29_;
323
 
                                Game* _tmp30_;
 
325
                                gboolean _tmp29_;
324
326
                                gint _tmp31_;
325
 
                                gint _tmp32_;
326
 
                                Game* _tmp33_;
 
327
                                Game* _tmp32_;
 
328
                                gint _tmp33_;
327
329
                                gint _tmp34_;
328
 
                                gint _tmp35_;
 
330
                                Game* _tmp35_;
329
331
                                gint _tmp36_;
330
 
                                _tmp27_ = _tmp26_;
331
 
                                if (!_tmp27_) {
332
 
                                        gint _tmp28_;
333
 
                                        _tmp28_ = i;
334
 
                                        i = _tmp28_ + 1;
 
332
                                gint _tmp37_;
 
333
                                gint _tmp38_;
 
334
                                _tmp29_ = _tmp28_;
 
335
                                if (!_tmp29_) {
 
336
                                        gint _tmp30_;
 
337
                                        _tmp30_ = i;
 
338
                                        i = _tmp30_ + 1;
335
339
                                }
336
 
                                _tmp26_ = FALSE;
337
 
                                _tmp29_ = i;
338
 
                                _tmp30_ = game;
339
 
                                _tmp31_ = _tmp30_->priv->undo_index;
340
 
                                if (!(_tmp29_ < _tmp31_)) {
 
340
                                _tmp28_ = FALSE;
 
341
                                _tmp31_ = i;
 
342
                                _tmp32_ = game;
 
343
                                _tmp33_ = _tmp32_->priv->undo_index;
 
344
                                if (!(_tmp31_ < _tmp33_)) {
341
345
                                        break;
342
346
                                }
343
 
                                _tmp32_ = i;
344
 
                                _tmp33_ = game;
345
347
                                _tmp34_ = i;
346
 
                                _tmp35_ = _tmp33_->priv->undo_history[_tmp34_];
347
 
                                self->priv->undo_history[_tmp32_] = _tmp35_;
348
 
                                _tmp36_ = self->priv->undo_history[_tmp32_];
 
348
                                _tmp35_ = game;
 
349
                                _tmp36_ = i;
 
350
                                _tmp37_ = _tmp35_->priv->undo_history[_tmp36_];
 
351
                                self->priv->undo_history[_tmp34_] = _tmp37_;
 
352
                                _tmp38_ = self->priv->undo_history[_tmp34_];
349
353
                        }
350
354
                }
351
355
        }
352
 
        _tmp37_ = game;
353
 
        _tmp38_ = _tmp37_->priv->undo_index;
354
 
        self->priv->undo_index = _tmp38_;
355
356
        _tmp39_ = game;
356
 
        _tmp40_ = _tmp39_->current_color;
357
 
        self->current_color = _tmp40_;
 
357
        _tmp40_ = _tmp39_->priv->undo_index;
 
358
        self->priv->undo_index = _tmp40_;
 
359
        _tmp41_ = game;
 
360
        _tmp42_ = _tmp41_->current_color;
 
361
        self->current_color = _tmp42_;
358
362
        return self;
359
363
}
360
364