diff options
author | kdx <kikoodx@paranoici.org> | 2023-07-13 07:58:28 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-07-13 07:58:28 +0200 |
commit | a7669bddf242aafc2bc5c7f5f573b6765e52561c (patch) | |
tree | 930becaea7ff707626bfd362ac437a602efd3abc | |
parent | 015247af10e5f70d636559d7a2fa2adc113c2057 (diff) | |
download | fld-a7669bddf242aafc2bc5c7f5f573b6765e52561c.tar.gz |
drawSetColor cast to u8
-rw-r--r-- | src/drawSetColor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drawSetColor.cpp b/src/drawSetColor.cpp index 1c63aed..07fb7d1 100644 --- a/src/drawSetColor.cpp +++ b/src/drawSetColor.cpp @@ -9,10 +9,10 @@ FLD::drawSetColor(float r, float g, float b, float a) if (b >= 0) _drawColor.b = b; if (a >= 0) _drawColor.a = a; if (SDL_SetRenderDrawColor(_renderer, - static_cast<int>(_drawColor.r * 0xff), - static_cast<int>(_drawColor.g * 0xff), - static_cast<int>(_drawColor.b * 0xff), - static_cast<int>(_drawColor.a * 0xff) < 0)) + static_cast<Uint8>(_drawColor.r * 0xff), + static_cast<Uint8>(_drawColor.g * 0xff), + static_cast<Uint8>(_drawColor.b * 0xff), + static_cast<Uint8>(_drawColor.a * 0xff) < 0)) sdlError(); return 0; } |