Exercises

Exercise 30.1: Changing the sounds of Spacewar

First of all, get sound working on your computer so that you can hear the Pop Framework sounds. (You need to have a sound card with speakers, and the speakers need to be plugged in. If you double-click the little speaker icon on the upper right of your Windows taskbar, the Mute button needs to not be checked. Also don’t forget to see if your speaker has a manual, physical control.) Now try removing the SND_ASYNC from the playSound calls in the gamespacewar.cpp. Rebuild the program and see how it sounds. See what happens if you OR in SND_LOOP.

Now find some other *.wav file and incorporate it into the program. Where to find a *.wav file? First you can use Start | Find to look for them ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.