Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor|libdoomsday|DED: Reimplemented Decoration definitions using …
…DED 2.0 components
- Loading branch information
1 parent
0227ce2
commit 77cd24e
Showing
14 changed files
with
253 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** @file decoration.h Decoration definition accessor. | ||
* | ||
* @authors Copyright © 2015 Daniel Swanson <danij@dengine.net> | ||
* | ||
* @par License | ||
* GPL: http://www.gnu.org/licenses/gpl.html | ||
* | ||
* <small>This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. This program is distributed in the hope that it | ||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details. You should have received a copy of the GNU | ||
* General Public License along with this program; if not, see: | ||
* http://www.gnu.org/licenses</small> | ||
*/ | ||
|
||
#ifndef LIBDOOMSDAY_DEFN_DECORATION_H | ||
#define LIBDOOMSDAY_DEFN_DECORATION_H | ||
|
||
#include "definition.h" | ||
#include <de/RecordAccessor> | ||
|
||
// Flags for decoration definitions. | ||
#define DCRF_NO_IWAD 0x1 ///< Don't use if from IWAD. | ||
#define DCRF_PWAD 0x2 ///< Can use if from PWAD. | ||
#define DCRF_EXTERNAL 0x4 ///< Can use if from external resource. | ||
|
||
namespace defn { | ||
|
||
/** | ||
* Utility for handling oldschool decoration definitions. | ||
*/ | ||
class LIBDOOMSDAY_PUBLIC Decoration : public Definition | ||
{ | ||
public: | ||
Decoration() : Definition() {} | ||
Decoration(Decoration const &other) : Definition(other) {} | ||
Decoration(de::Record &d) : Definition(d) {} | ||
Decoration(de::Record const &d) : Definition(d) {} | ||
|
||
void resetToDefaults(); | ||
|
||
int lightCount() const; | ||
bool hasLight(int index) const; | ||
|
||
de::Record &light(int index); | ||
de::Record const &light(int index) const; | ||
|
||
de::Record &addLight(); | ||
}; | ||
|
||
} // namespace defn | ||
|
||
#endif // LIBDOOMSDAY_DEFN_DECORATION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.