]> 4ch.mooo.com Git - 16.git/blobdiff - src/eng_snd.cpp
modified: 16/DOS_GFX.OBJ
[16.git] / src / eng_snd.cpp
index 7ca496b0a4dee962f416273e3148dbf2a508fddc..c8f1598bbe94bd1de7ddb1b2b3ee4cfc9c9193ea 100644 (file)
@@ -1,13 +1,30 @@
 #include "src\eng_snd.h"\r
 #include <iostream>\r
 \r
+#ifdef __cplusplus      /* Functions must be declared C style */\r
+extern "C" {\r
+#endif\r
+extern void interrupt far newkb(void);\r
+extern int keyp(byte c);\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
 namespace engine {\r
 \r
        void do_sound()\r
        {\r
                //sound here\r
 //====         std::cout << "SOUND HERE" << std::endl;\r
-               //soundtest();
+               if(keyp(44)){\r
+                       FMKeyOn(0, 0x106, 4);\r
+               }//else if(!keyp(44)) FMKeyOff(0);\r
+               if(keyp(KEY_A)) FMKeyOff(0);\r
+               if(keyp(KEY_X)){\r
+                       sound(440);\r
+                       delay(100);\r
+                       nosound();\r
+               }else if(keyp(KEY_X+0x80)) nosound();\r
        }\r
 \r
-}
\ No newline at end of file
+}\r