Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/ObjectEntry.h
/* Copyright (C) 2019 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 25 Lines | |||||
#include "graphics/ObjectBase.h" | #include "graphics/ObjectBase.h" | ||||
class CObjectEntry | class CObjectEntry | ||||
{ | { | ||||
NONCOPYABLE(CObjectEntry); | NONCOPYABLE(CObjectEntry); | ||||
public: | public: | ||||
CObjectEntry(CObjectBase* base, CSimulation2& simulation); | CObjectEntry(const std::shared_ptr<CObjectBase>& base, CSimulation2& simulation); | ||||
~CObjectEntry(); | ~CObjectEntry(); | ||||
// Construct this actor, using the specified variation selections | // Construct this actor, using the specified variation selections | ||||
bool BuildVariation(const std::vector<std::set<CStr> >& selections, | bool BuildVariation(const std::vector<const std::set<CStr>*>& completeSelections, | ||||
const std::vector<u8>& variationKey, CObjectManager& objectManager); | const std::vector<u8>& variationKey, CObjectManager& objectManager); | ||||
// Base actor. Contains all the things that don't change between | // Base actor. Contains all the things that don't change between | ||||
// different variations of the actor. | // different variations of the actor. | ||||
CObjectBase* m_Base; | std::shared_ptr<CObjectBase> m_Base; | ||||
// samplers list | // samplers list | ||||
std::vector<CObjectBase::Samp> m_Samplers; | std::vector<CObjectBase::Samp> m_Samplers; | ||||
// model name | // model name | ||||
VfsPath m_ModelName; | VfsPath m_ModelName; | ||||
// color (used when doing alpha-channel coloring, but not doing player-color) | // color (used when doing alpha-channel coloring, but not doing player-color) | ||||
CColor m_Color; | CColor m_Color; | ||||
// (probable TODO: make color a per-model thing, rather than per-objectEntry, | // (probable TODO: make color a per-model thing, rather than per-objectEntry, | ||||
Show All 37 Lines |
Wildfire Games · Phabricator