From cc7110c18f019885b6394728685848d941aba1ce Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 15 Sep 2011 17:04:37 +0000 Subject: [PATCH] - Add new trueror1.map that showcases the functionality and limitations of the additional rendering pass - Remove r_preview_mouseaim cvar from the game, since it's only for Mapster - sdlmusic.c: (Failed) attempt to fix a call of waitpid() with a non-existent process ID in the external MIDI playing code. I think there's a race there... git-svn-id: https://svn.eduke32.com/eduke32@2025 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 3 +++ polymer/eduke32/samples/trueror1.map | Bin 42486 -> 46758 bytes polymer/eduke32/source/m32exec.c | 4 ++-- polymer/eduke32/source/sdlmusic.c | 21 ++++++++++++++------- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 79683fec0..03d92d908 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -6398,6 +6398,9 @@ void polymost_initosdfuncs(void) for (i=0; id3+Vs701uZdC7YTNg$RbLJ(|gLEBF&pIV_v*|Zg?gdJoxf(o*0AwXD$MZg7w zFzh?BDTpLS6qF_G`w~{!O0BihPpj2hQCs`D{hhgY=G~VCm_PE~%=dTCJ@=e*&&<5s zIGV8TvxM1ILr)Y|8&oNj?oO&yJDI#gsV46FO7%jIxF_-VQTLll^-_M%VWRtix4Z3A ztKZ=Z+i{|GxdBlIh*F)ovbl`YaFlw4h|(#U?q;G?J=W9pa~Gu63-xz*;qPGgQ~b?y zE2q^9O>i6H?_~Fhw0h1|&LS#SigLu3KRAVc0b8*{sa4|2DWd}jgNwYhZryF_Hfo)t zC%%cn0&x(F7ALXJaCe-^p(jq!C*a4#py&!b9r?QIr4~{Wr*o)6;rTdW#k$LqyY`s7 zn5ZSSK{on-n~u}!y!bocJ#p+BQ$8*aAqwFPj;4N{Kt)T^x^asaxC;nQDN1#t1MuBj z$s~M?BdSePEdJvd9|n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u`DNv@;ditRnU2Z<6ghjp>Tj|Md&T-imiKXFTz|+0043 z#T@?8dapd3>n(L)6hkVae&ug$Q9I04O8+maJH#WcJCO|9KlCVSbq zbH4vm>q8s-wsn86;Sb8gd;&*sKx$m|DE5m-9z(BK^ETJsCk}ZW6OtwSF)l7SfD2M4 z`*2>W{X-!A;1q?`y35}y)JaPiZ#d2+&N1r(4MVyu_c?qY)B`+f_WpWZHr0Uwn75UOl z;3|sZv3CmdVij#;TDpn}9=S|0fgD_Mi#D#IAZ7A8mZVC)ibbgv?b2)YLaO=^F;#bz ziLtTJ?-E~WeIw*s)$ZuT-+_OhT+{mXkT=zfQS*<$zeDnVcw>WqDSG3V!23rmrVgo_ z8wTu%POSw4rb*sAGa=uqdZV2`1U{(292}`G+B^s;sgZf~h)2$%TdXA;3%Du{SwKm$ zq>G%mTg=0?editorcolors[col&15]:(-col&255)); + drawline16(xofs+x1,yofs+y1, xofs+x2,yofs+y2, col>=0?editorcolors[col&15]:((-col)&255)); drawlinepat = odrawlinepat; continue; } @@ -2935,7 +2935,7 @@ dodefault: } drawlinepat = m32_drawlinepat; - drawcircle16(xofs+x1, yofs+y1, r, eccen, col>=0?editorcolors[col&15]:(-col&255)); + drawcircle16(xofs+x1, yofs+y1, r, eccen, col>=0?editorcolors[col&15]:((-col)&255)); drawlinepat = odrawlinepat; continue; } diff --git a/polymer/eduke32/source/sdlmusic.c b/polymer/eduke32/source/sdlmusic.c index 3d8f4c556..c599f7c61 100644 --- a/polymer/eduke32/source/sdlmusic.c +++ b/polymer/eduke32/source/sdlmusic.c @@ -342,11 +342,15 @@ int32_t MUSIC_StopSong(void) if (external_midi_pid > 0) { int32_t ret; + struct timespec ts; external_midi_restart = 0; // make SIGCHLD handler a no-op + ts.tv_sec = 0; + ts.tv_nsec = 5000000; // sleep 5ms at most + kill(external_midi_pid, SIGTERM); - nanosleep(&(const struct timespec) { .tv_sec=0, .tv_nsec=5000000 }, NULL); // sleep 5ms at most + nanosleep(&ts, NULL); ret = waitpid(external_midi_pid, NULL, WNOHANG|WUNTRACED); // printf("(%d)", ret); @@ -419,13 +423,16 @@ static void sigchld_handler(int signo) { int status; - if (waitpid(external_midi_pid, &status, WUNTRACED)==-1) - perror("waitpid (3)"); - - if (WIFEXITED(status) && WEXITSTATUS(status)==0) + if (external_midi_pid > 0) { - // loop ... - playmusic(); + if (waitpid(external_midi_pid, &status, WUNTRACED)==-1) + perror("waitpid (3)"); + + if (WIFEXITED(status) && WEXITSTATUS(status)==0) + { + // loop ... + playmusic(); + } } } }