~rabbits/orca-toy

a6aabbd326bb3beccffad985e44e2bafda6bb60d — neauoire 2 years ago 3089e6e
*
2 files changed, 10 insertions(+), 10 deletions(-)

M orca.c
M sim.c
M orca.c => orca.c +9 -9
@@ 784,17 784,17 @@ main(int argc, char *argv[])
		}
		SDL_Delay(60000 / BPM / 16);
		while(SDL_PollEvent(&event) != 0) {
			if(event.type == SDL_QUIT)
				quit();
			else if(event.type == SDL_MOUSEBUTTONUP ||
					event.type == SDL_MOUSEBUTTONDOWN ||
					event.type == SDL_MOUSEMOTION)
				domouse(&event);
			else if(event.type == SDL_KEYDOWN)
				dokey(&event);
			else if(event.type == SDL_WINDOWEVENT)
			switch(event.type) {
			case SDL_QUIT: quit(); break;
			case SDL_MOUSEBUTTONUP:
			case SDL_MOUSEBUTTONDOWN:
			case SDL_MOUSEMOTION: domouse(&event); break;
			case SDL_KEYDOWN: dokey(&event); break;
			case SDL_WINDOWEVENT:
				if(event.window.event == SDL_WINDOWEVENT_EXPOSED)
					redraw(pixels);
				break;
			}
		}
	}
	quit();

M sim.c => sim.c +1 -1
@@ 565,7 565,7 @@ initframe(Grid *g)
		g->lock[i] = 0;
		g->type[i] = 0;
	}
	for(i = 0; i < 36; ++i) 
	for(i = 0; i < 36; ++i)
		g->var[i] = '\0';
	g->msg[0] = '\0';
	g->msglen = 0;