Replace int with bool in memory.c, ui.c and related files.