]> 4ch.mooo.com Git - 16.git/blobdiff - src/eng_snd.cpp
modified: .gitignore
[16.git] / src / eng_snd.cpp
index 7ca496b0a4dee962f416273e3148dbf2a508fddc..22b64fd3244e76032817cedc94041d182f0e9e00 100644 (file)
@@ -1,5 +1,14 @@
 #include "src\eng_snd.h"\r
 #include <iostream>\r
+
+#ifdef __cplusplus      /* Functions must be declared C style */\r
+extern "C" {\r
+#endif\r
+extern void interrupt far newkb(void);
+extern int keyp(byte c);
+#ifdef __cplusplus\r
+}\r
+#endif
 \r
 namespace engine {\r
 \r
@@ -7,7 +16,14 @@ namespace engine {
        {\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_X)){\r
+                       sound(440);\r
+                       delay(100);\r
+                       nosound();\r
+               }else if(keyp(KEY_X+0x80)) nosound();
        }\r
 \r
 }
\ No newline at end of file