Skip to content

Commit d5ed5b2

Browse files
committed
Remove vec4 from color helpers
Fakin robsi refactor upstream https://www.github.com/ddnet/ddnet/pull/11002 In germany we say: "danke @Robyt3"
1 parent 0b1e96c commit d5ed5b2

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/bots/base.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <cstddef>
55

66
#include <twbl/hotreload.h>
7+
#include <twbl/teeworlds/base/color.h>
78
#include <twbl/teeworlds/base/system.h>
89
#include <twbl/teeworlds/base/vmath.h>
910
#include <twbl/teeworlds/character.h>
@@ -53,8 +54,8 @@ class CBaseBot
5354
// src/twbl/state.h
5455
CTwblPersistentState *State() { return m_pState; }
5556

56-
vec4 ColorRed() { return vec4(1, 0, 0, 0.6f); }
57-
vec4 ColorGreen() { return vec4(0, 1, 0, 0.6f); }
57+
ColorRGBA ColorRed() { return ColorRGBA(1, 0, 0, 0.6f); }
58+
ColorRGBA ColorGreen() { return ColorRGBA(0, 1, 0, 0.6f); }
5859

5960
const CCollision *Collision() const { return m_pStateIn->m_pCollision; }
6061
CCharacter *Character(int ClientId = -1);

src/engines/base_engine.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define TWBL_SRC_ENGINES_BASE_ENGINE_H
33

44
#include <twbl/hotreload.h>
5+
#include <twbl/teeworlds/base/color.h>
56
#include <twbl/teeworlds/base/vmath.h>
67
#include <twbl/teeworlds/character.h>
78

@@ -23,8 +24,8 @@ class CBaseEngine
2324
protected:
2425
CBaseBot *Bot();
2526

26-
vec4 ColorRed() { return vec4(1, 0, 0, 0.6f); }
27-
vec4 ColorGreen() { return vec4(0, 1, 0, 0.6f); }
27+
ColorRGBA ColorRed() { return ColorRGBA(1, 0, 0, 0.6f); }
28+
ColorRGBA ColorGreen() { return ColorRGBA(0, 1, 0, 0.6f); }
2829

2930
const CCollision *Collision();
3031
CCharacter *Character(int ClientId = -1);

0 commit comments

Comments
 (0)