project_files/frontlib/model/room.c
author unc0rr
Fri, 27 Dec 2013 01:22:12 +0400
changeset 9864 f7eb0d87c9b6
parent 7338 1ed603a54ebd
child 10017 de822cd3df3a
permissions -rw-r--r--
Oops, meant Land
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7338
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     1
/*
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     3
 * Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     4
 *
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     6
 * modify it under the terms of the GNU General Public License
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     7
 * as published by the Free Software Foundation; either version 2
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     8
 * of the License, or (at your option) any later version.
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
     9
 *
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    13
 * GNU General Public License for more details.
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    14
 *
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    18
 */
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    19
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    20
#include "room.h"
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    21
#include "../util/logging.h"
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    22
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    23
#include <stdlib.h>
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    24
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    25
void flib_room_destroy(flib_room *room) {
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    26
	if(room) {
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    27
		free(room->map);
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    28
		free(room->name);
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    29
		free(room->owner);
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    30
		free(room->scheme);
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    31
		free(room->weapons);
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    32
		free(room);
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    33
	}
1ed603a54ebd frontlib:
Medo <smaxein@googlemail.com>
parents:
diff changeset
    34
}