Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Helpers.h #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 41 additions & 41 deletions VS19_Solution/DualSenseWindows/include/DualSenseWindows/Helpers.h
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
/*
Helpers.h is part of DualSenseWindows
https://github.com/Ohjurot/DualSense-Windows
Helpers.h is part of DualSenseWindows
https://github.com/Ohjurot/DualSense-Windows

Contributors of this file:
11.2020 Ludwig F�chsl
Contributors of this file:
11.2020 Ludwig Füchsl

Licensed under the MIT License (To be found in repository root directory)
Licensed under the MIT License (To be found in repository root directory)
*/
#pragma once

#include <DualSenseWindows/DSW_Api.h>
#include <DualSenseWindows/DS5State.h>

namespace DS5W {
/// <summary>
/// Convert from 3-Color RGB normalized float to DS5W::Color
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API DS5W::Color color_R32G32B32_FLOAT(float r, float g, float b);

/// <summary>
/// Convert from 4-Color RGBA normalized float to DS5W::Color
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <param name="a">Alpha channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API DS5W::Color color_R32G32B32A32_FLOAT(float r, float g, float b, float a);
/// <summary>
/// Convert from 3-Color RGB normalized float to DS5W::Color
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API Color color_R32G32B32_FLOAT(float r, float g, float b);

/// <summary>
/// Convert from 4-Color RGBA byte / UChar to DS5W::Color
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <param name="a">Alpha channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API DS5W::Color color_R8G8B8A8_UCHAR(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
/// <summary>
/// Convert from 4-Color RGBA normalized float to DS5W::Color
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <param name="a">Alpha channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API Color color_R32G32B32A32_FLOAT(float r, float g, float b, float a);

/// <summary>
/// Convert from 4-Color RGB byte / UChar to DS5W::Color while using a normalized float for alpha chanel
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <param name="a">Alpha channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API DS5W::Color color_R8G8B8_UCHAR_A32_FLOAT(unsigned char r, unsigned char g, unsigned char b, float a);
/// <summary>
/// Convert from 4-Color RGBA byte / UChar to DS5W::Color
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <param name="a">Alpha channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API Color color_R8G8B8A8_UCHAR(unsigned char r, unsigned char g, unsigned char b, unsigned char a);

/// <summary>
/// Convert from 3-Color RGB byte / UChar to DS5W::Color while using a normalized float for alpha channel
/// </summary>
/// <param name="r">Red channel</param>
/// <param name="g">Green channel</param>
/// <param name="b">Blue channel</param>
/// <param name="a">Alpha channel</param>
/// <returns>DS5W::Color</returns>
DS5W_API Color color_R8G8B8_UCHAR_A32_FLOAT(unsigned char r, unsigned char g, unsigned char b, float a);
}