Witam
Czy ktoś jest w stanie powiedzieć dlaczego ten program:
#include <allegro.h>
#include <winalleg.h>
#include <iostream>
#include <windows.h>
using namespace std;
inline void init()
{
allegro_init();
set_color_depth(32);
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
install_timer();
install_keyboard();
install_mouse();
}
inline void deinit()
{
clear_keybuf();
allegro_exit();
}
int main()
{
init();
short int R,G,B;
COLORREF Kolor;
Kolor = (200,55,33);
R=GetRValue(Kolor);
G=GetGValue(Kolor);
B=GetBValue(Kolor);
textprintf( screen, font, 20, 20, makecol( 255, 255, 128 ), "R : %u", R);
textprintf( screen, font, 20, 30, makecol( 255, 255, 128 ), "G : %u", G );
textprintf( screen, font, 20, 40, makecol( 255, 255, 128 ), "B : %u", B );
readkey();
deinit();
return 0;
}
END_OF_MAIN()
w wyniku daje wartości kolorów:
R 33, G 0, B 0 ?