@ -9,6 +9,10 @@ class PGEX_SMX : public PGEX{
public:
PGEX_SMX():PGEX(true){};
HWButton GetPanel(Key k,int pad)const{
std::cout<<SMX_GetInputState(pad);
};
private:
//SMX "screen" is 12x21
//Each panel is 4x7
static void SMXStateChangedCallback(int pad, SMXUpdateCallbackReason reason, void *pUser)
@ -34,6 +38,8 @@ public:
virtual void OnAfterUserUpdate(float fElapsedTime)override{
std::string lightData;
//The light data for an SMX dance pad is outlined in the docs but the code used to transform the PGE's pixels to SMX pad's lights will be annotated here.
//Both pads receive data sequentially, and for now we can mimic the data on both ends.
for (int pad=0;pad<2;pad++){
for(int i=0;i<9;i++){
int row=0;
@ -15,16 +15,13 @@ public:
bool OnUserCreate() override
{
SetPixelMode([](const int x,const int y,const Pixel&col,const Pixel&prev){
return col;
});
// Called once at the start, so create things here
return true;
}
bool OnUserUpdate(float fElapsedTime) override
smx.GetPanel(RIGHT,0).bHeld;
// called once per frame
for (int x = 0; x < ScreenWidth(); x++)
for (int y = 0; y < ScreenHeight(); y++)