Mercurial > love-experiments
annotate src/modules/graphics/Volatile.cpp @ 1448:108ee2e81f65 default tip
Fix a case typo, imageData.h -> ImageData.h
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sat, 18 Jan 2014 13:57:44 +0100 |
| parents | b7f097053d74 |
| children |
| rev | line source |
|---|---|
| 1096 | 1 /** |
|
1282
b7f097053d74
Updated copyright text for the new year
Alex Szpakowski <slime73@gmail.com>
parents:
1096
diff
changeset
|
2 * Copyright (c) 2006-2013 LOVE Development Team |
| 1096 | 3 * |
| 4 * This software is provided 'as-is', without any express or implied | |
| 5 * warranty. In no event will the authors be held liable for any damages | |
| 6 * arising from the use of this software. | |
| 7 * | |
| 8 * Permission is granted to anyone to use this software for any purpose, | |
| 9 * including commercial applications, and to alter it and redistribute it | |
| 10 * freely, subject to the following restrictions: | |
| 11 * | |
| 12 * 1. The origin of this software must not be misrepresented; you must not | |
| 13 * claim that you wrote the original software. If you use this software | |
| 14 * in a product, an acknowledgment in the product documentation would be | |
| 15 * appreciated but is not required. | |
| 16 * 2. Altered source versions must be plainly marked as such, and must not be | |
| 17 * misrepresented as being the original software. | |
| 18 * 3. This notice may not be removed or altered from any source distribution. | |
| 19 **/ | |
| 20 | |
| 21 #include "Volatile.h" | |
| 22 | |
| 23 namespace love | |
| 24 { | |
| 25 namespace graphics | |
| 26 { | |
| 27 | |
| 28 // Static members. | |
| 29 std::list<Volatile *> Volatile::all; | |
| 30 | |
| 31 Volatile::Volatile() | |
| 32 { | |
| 33 // Insert this object into "all". | |
| 34 all.push_back(this); | |
| 35 } | |
| 36 | |
| 37 Volatile::~Volatile() | |
| 38 { | |
| 39 // Remove the pointer to this object. | |
| 40 all.remove(this); | |
| 41 } | |
| 42 | |
| 43 bool Volatile::loadAll() | |
| 44 { | |
| 45 bool success = true; | |
| 46 std::list<Volatile *>::iterator i = all.begin(); | |
| 47 | |
| 48 while (i != all.end()) | |
| 49 { | |
| 50 success = success && (*i)->loadVolatile(); | |
| 51 i++; | |
| 52 } | |
| 53 | |
| 54 return success; | |
| 55 } | |
| 56 | |
| 57 void Volatile::unloadAll() | |
| 58 { | |
| 59 std::list<Volatile *>::iterator i = all.begin(); | |
| 60 | |
| 61 while (i != all.end()) | |
| 62 { | |
| 63 (*i)->unloadVolatile(); | |
| 64 i++; | |
| 65 } | |
| 66 } | |
| 67 | |
| 68 } // graphics | |
| 69 } // love |
