From 87952fb18827d804a53fe8c12562a0444e4f59dd Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 11 Oct 2023 09:45:18 +0000 Subject: got rid of yield(2) abuse. --- musw.c | 5 ++--- muswd.c | 5 ++--- todo | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/musw.c b/musw.c index fd8c8ac..e4367ea 100644 --- a/musw.c +++ b/musw.c @@ -697,7 +697,7 @@ soundproc(void *) } void -threadshow(void *) +runshow(void) { uvlong then, now, frametime, lastpktsent; Vfx *vfx; @@ -834,6 +834,5 @@ threadmain(int argc, char *argv[]) threadcreate(threadnetppu, nil, mainstacksize); threadcreate(threadnetsend, &fd, mainstacksize); threadcreate(threadresize, mc, mainstacksize); - threadcreate(threadshow, nil, mainstacksize); - yield(); + runshow(); } diff --git a/muswd.c b/muswd.c index a61595c..282fea7 100644 --- a/muswd.c +++ b/muswd.c @@ -330,7 +330,7 @@ broadcaststate(void) } void -threadsim(void *) +runsim(void) { int i; ulong kdown; @@ -536,6 +536,5 @@ threadmain(int argc, char *argv[]) threadcreate(threadnetrecv, &adfd, mainstacksize); threadcreate(threadnetppu, nil, mainstacksize); threadcreate(threadnetsend, &adfd, mainstacksize); - threadcreate(threadsim, nil, mainstacksize); - yield(); + runsim(); } diff --git a/todo b/todo index 552db4b..7c80902 100644 --- a/todo +++ b/todo @@ -17,6 +17,7 @@ [✓] main game [ ] keep a score [ ] manage health + > related to hyperjump and the increasing likelihood of its destroying the ship. [ ] reduce the amount of data sent on every NSsimstate packet [✓] only send the fired bullets [ ] bit packing -- cgit v1.2.3