@ -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;
@ -18,16 +18,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;
if (GetKey(RIGHT).bPressed) {
mode = (mode + 1) % 3;
@ -92,7 +92,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="SMXSample.cpp" />
<ClCompile Include="PGEX_SMX_Example.cpp" />
</ItemGroup>
<ProjectReference Include="..\sdk\Windows\SMX.vcxproj">
@ -10,7 +10,7 @@
</Filter>
<ClCompile Include="SMXSample.cpp">
<ClCompile Include="PGEX_SMX_Example.cpp">
<Filter>Source Files</Filter>
</ClCompile>