- Renamed fproc -> langproc (I'll probably never settle on a naming convention for this) - Refactored set to use median psl
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
// =====================================================================================================================
|
|
// fennec, a free and open source game engine
|
|
// Copyright © 2025 Medusa Slockbower
|
|
//
|
|
// 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 3 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 <https://www.gnu.org/licenses/>.
|
|
// =====================================================================================================================
|
|
|
|
#ifndef FENNEC_CORE_SYSTEM_H
|
|
#define FENNEC_CORE_SYSTEM_H
|
|
#include <fennec/langproc/strings/string.h>
|
|
|
|
namespace fennec
|
|
{
|
|
|
|
class system {
|
|
public:
|
|
using tick_f = void (*)(system*, double);
|
|
using frame_f = void (*)(system*, size_t);
|
|
|
|
const string name;
|
|
const tick_f tick;
|
|
const frame_f frame;
|
|
|
|
system(const cstring& name, tick_f tick, frame_f frame)
|
|
: name(name), tick(tick), frame(frame) {
|
|
}
|
|
|
|
virtual ~system() = default;
|
|
|
|
virtual void init() = 0;
|
|
virtual void shutdown() = 0;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // FENNEC_CORE_SYSTEM_H
|