[rogueclone-cvs] Fixes for Rogue Clone IV in the Windows 7 / 8 / 10 console environment
Brought to you by:
mlehotay
From: William A. <wil...@au...> - 2016-02-04 00:01:30
|
Rogue Clone IV Developers, I have a fix to an annoying issue in Rogue Clone IV for the newer Windows environments. Evidently, around about Windows 7 and since, the Visual Studio console environment has not supported a "bell" function. That is, there no sound generated when you send ASCII 7 (or CTL-g or '\a', whatever your preference) to stdout. Moreover, on my system, when the bell character was sent to the console, the console promptly dies, leaving a zombie rogue.exe process spinning in the background. So you lose your game, and you are burning cycles; not good. If you play Rogue at a reasonable pace (like me - my brain doesn't play the game, my fingers do) then a bell will inevitably come, and there goes the game. I have tested the download from sourceforge on my machine, and sure enough, it exhibits this same behavior. I have a relatively simple solution that I have implemented and tested. It uses the Windows multimedia system and plays a .wav file (my default file is the sound of a metal-on-metal "clank") whenever the bell is invoked. Admittedly, this is more like Windows than Unix, where I first played BSD Rogue. But, hey, it works. There are other issues to work around when compiling this code with a modern language system like, ahem, Visual Studio 2015. The issue of const string literals will kill you if you try to compile in a modern C/C++ syntax. Luckily, Visual Studio seems to have the flags that allows old, crazy C code to be compiled. I spent most of a day figuring this out. Since this is a structural change (one more source file, plus the .wav sound file), I wanted to find out if this mailing list would approve this update. Let me know. Willie Anderson |