22.01.2009, 18:55
Well it's basically something like this:
I make a plugin with <almost> all possible console functions
i'll maybe release it once i got buffers system working fine.
pawn Код:
//SetConsoleCellsData(x, y, length, character, foreground_color, background_color);
//#define SetConsoleCellData(%1,%2,%3,%4,%5) SetConsoleCellsData(%1,%2,1,%3,%4,%5)
static cell AMX_NATIVE_CALL n_SetConsoleCellsData(AMX *amx, cell *params)
{
HANDLE Console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD Coords = {(SHORT)params[1], (SHORT)params[2]};
DWORD Length = (DWORD)params[3];
WCHAR Character = (WCHAR)params[4];
WORD Colors = ((WORD)params[6] << 4 | (WORD)params[5]);
FillConsoleOutputCharacter(Console, Character, Length, Coords, NULL);
FillConsoleOutputAttribute(Console, Colors, Length, Coords, NULL);
return 1;
}
i'll maybe release it once i got buffers system working fine.
