/* 
    Spectrum Analyzer
    (C) 2007 Jason Hunt
    GPL

    file: input.cpp
*/

#include <windows.h>
#include <math.h>
#include <stdio.h>

#include "main.h"
#include "input.h"
#include "display.h"


bool keys[256]; // true of that key is pressed down


/* setup key table */
void input_start( void )
{
    memset(keys, 0, 256);
}
/* end of input_start */


/* called when a key is pressed */
void process_key_down(WPARAM wParam)
{
    keys[wParam % 256] = true;

    // escape key
    if (wParam == VK_ESCAPE) system_shutdown(); //else

}
/* end of process key down */


/* called when a key is released */
void process_key_up( WPARAM wParam )
{
    keys[wParam % 256] = false;
}
/* end of process key up */




