added console and a few commands

This commit is contained in:
Ondřej Novák 2025-02-02 21:50:52 +01:00
parent e717badc45
commit 73b949fb2e
28 changed files with 807 additions and 87 deletions

View file

@ -352,7 +352,12 @@ void define(int id,int x,int y,int xs,int ys,char align,void (*initproc)(OBJREC
o->font=default_font;
o->datasize=0;
initproc(o);
if (o->datasize) o->data=(void *)getmem(o->datasize); else o->data=NULL;
if (o->datasize) {
o->data=(void *)getmem(o->datasize);
memset(o->data,0,o->datasize);
}else {
o->data=NULL;
}
va_list vlst;
va_start(vlst, initproc);
o->call_init(o,vlst);