aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack/server_ping_4.png
blob: 03b4b5b83cf3c9dabc49234a31ec827a21bc02c2 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 06 00 00 00 1f f3 ff .PNG........IHDR................
0020 61 00 00 00 06 62 4b 47 44 00 00 00 ff 00 21 0b b2 9f cc 00 00 00 09 70 48 59 73 00 00 0b 13 00 a....bKGD.....!........pHYs.....
0040 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 e1 02 02 10 30 03 9b 6c 3d 55 00 00 00 62 49 ............tIME.....0..l=U...bI
0060 44 41 54 38 cb 63 b4 b0 b0 60 a0 04 30 31 50 08 86 a0 01 27 8e bf fc 7f e2 f8 cb ff 30 3e 0b b9 DAT8.c...`..01P....'........0>..
0080 36 9f f0 bf fe 9f 28 17 a0 db 88 0e 58 48 b5 91 81 41 08 7f 18 10 b2 91 68 17 e0 b2 11 23 16 48 6.....(.....XH...A......h....#.H
00a0 b5 11 a7 0b 88 b5 11 5b 3a 60 84 62 18 20 89 cf 64 61 29 ce 60 61 29 0e 97 20 95 cf 38 e0 b9 11 .......[:`.b....da).`a).....8...
00c0 00 f0 82 2d 69 a2 c1 df b9 00 00 00 00 49 45 4e 44 ae 42 60 82 ...-i........IEND.B`.
a id='n71' href='#n71'>71
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#pragma once

#include "irrlichttypes.h"

class MtEvent
{
public:
	enum Type : u8
	{
		VIEW_BOBBING_STEP = 0,
		CAMERA_PUNCH_LEFT,
		CAMERA_PUNCH_RIGHT,
		PLAYER_FALLING_DAMAGE,
		PLAYER_DAMAGE,
		NODE_DUG,
		PLAYER_JUMP,
		PLAYER_REGAIN_GROUND,
		TYPE_MAX,
	};

	virtual ~MtEvent() = default;
	virtual Type getType() const = 0;
};

// An event with no parameters and customizable name
class SimpleTriggerEvent : public MtEvent
{
	Type type;

public:
	SimpleTriggerEvent(Type type) : type(type) {}
	Type getType() const override { return type; }
};

class MtEventReceiver
{
public:
	virtual ~MtEventReceiver() = default;
	virtual void onEvent(MtEvent *e) = 0;
};

typedef void (*event_receive_func)(MtEvent *e, void *data);

class MtEventManager
{
public:
	virtual ~MtEventManager() = default;