mirror of
https://github.com/nmlgc/ReC98.git
synced 2025-02-24 09:33:07 +00:00

Which works in both Borland C++, Open Watcom, and Visual C++. Not that we're about to port any of the games to these compilers, just something I noticed while evaluating 32-bit compilers for ReC98's own 32-bit pipeline tools. Modders might want to look into that though, since 100% position independence also makes it easier to change compilers.
17 lines
286 B
C
17 lines
286 B
C
int snd_determine_mode(void)
|
|
{
|
|
__asm mov ah, PMD_GET_DRIVER_VERSION;
|
|
__asm int PMD;
|
|
_BX = 0;
|
|
if(_AL != 0xFF) {
|
|
__asm inc bx;
|
|
snd_fm_possible = 1;
|
|
} else {
|
|
__asm mov bl, snd_midi_active;
|
|
}
|
|
__asm mov snd_active, bl;
|
|
return _BX;
|
|
}
|
|
|
|
#pragma codestring "\x90"
|