Beispiel #1
0
void LoadLocalZooms_Uplevel(struct LocalZooms **to){
	int ret;

	struct LocalZooms *localzoom;


	for(;;){
		ret=DC_Next();
		switch(ret){
			case LS_OBJECT:

				localzoom=DC_alloc(sizeof(struct LocalZooms));
				LoadPlace(&localzoom->l.p);
				localzoom->zoomline=DC_LoadI();
				localzoom->level=DC_LoadI();

                                if(disk_load_version>0.725)
                                  localzoom->autogenerated=DC_LoadB();

				DC_ListAdd3(to,localzoom);

				LoadLocalZooms_Uplevel(&localzoom->uplevel);

				break;

			case LS_ENDOBJECT:
			case LS_ERROR:
				return;
		}
	}


error:
	return;
}
Beispiel #2
0
void LoadLocalZooms(struct LocalZooms **to){
	int num_lines=DC_LoadI();
	struct LocalZooms *localzoom;
	struct LocalZooms *uplevel;
	Place place;
	int lokke;
	int ret;

	place.counter=0;
	place.dividor=1;

	for(lokke=0;lokke<num_lines;lokke++){
		localzoom=DC_alloc(sizeof(struct LocalZooms));
		localzoom->Tline=lokke;
		localzoom->Tdividor=1;
		localzoom->zoomline=lokke;
		ListAddElement3(to,&localzoom->l);
	}

	for(;;){
		ret=DC_Next();
		switch(ret){
			case LS_OBJECT:

				localzoom=DC_alloc(sizeof(struct LocalZooms));
				LoadPlace(&localzoom->l.p);
				localzoom->zoomline=DC_LoadI();
				localzoom->level=DC_LoadI();
                                if(disk_load_version>0.725)
                                  localzoom->autogenerated=DC_LoadB();

				place.line=localzoom->Tline;
				uplevel=ListFindElement3(&((*to)->l),&place);
				DC_ListAdd3(&uplevel->uplevel,localzoom);

				LoadLocalZooms_Uplevel(&localzoom->uplevel);
				break;

			case LS_ENDOBJECT:
			case LS_ERROR:
				return;
		}
	}

error:
	return;
}
Beispiel #3
0
struct Root *LoadRoot(void){
	static char *objs[1]={
		"SONG"
	};
	static char *vars[14]={
		"def_instrument",
		"curr_block",
		"tempo",
		"lpb",
                "signature_numerator",
                "signature_denominator",                
		"quantitize",
                "quantitize_numerator",
                "quantitize_denominator",
                "grid_numerator",
                "grid_denominator",
		"keyoct",
		"min_standardvel",
		"standardvel"
	};
	struct Root *ret=DC_alloc(sizeof(struct Root));
        ret->quantitize_options = root->quantitize_options;
	ret->scrollplayonoff=true;
        ret->min_standardvel=MAX_VELOCITY*40/100;
        ret->editonoff=true;
        ret->grid_numerator=1;
        ret->grid_denominator=1;
        ret->signature.numerator=4;
        ret->signature.denominator=4;

	GENERAL_LOAD(1,14);



obj0:
	ret->song=LoadSong();
	goto start;
var0:
	goto start;			// Don't bother with instruments yet.
var1:
	ret->curr_block=DC_LoadN();
	goto start;
var2:
	ret->tempo=DC_LoadI();
	goto start;
var3:
	ret->lpb=DC_LoadI();
	goto start;

var4:
	ret->signature.numerator=DC_LoadI();
	goto start;

var5:
	ret->signature.denominator=DC_LoadI();
	goto start;

var6:
        DC_LoadF();
	goto start;

var7:
        ret->quantitize_options.quant.numerator = DC_LoadI();
	goto start;

var8:
        ret->quantitize_options.quant.denominator = DC_LoadI();
	goto start;

var9:
        ret->grid_numerator=DC_LoadI();
        goto start;

var10:
        ret->grid_denominator=DC_LoadI();
        goto start;

var11:
	ret->keyoct=DC_LoadI();
	goto start;

var12:
	ret->min_standardvel=DC_LoadI();
	goto start;

var13:
	ret->standardvel=DC_LoadI();
	goto start;

var14:
var15:
var16:
var17:
var18:
var19:
 var20:
        
obj1:
obj2:
obj3:
obj4:
obj5:
obj6:
debug("loadroot, very wrong\n");

error:
debug("loadroot, goto error\n");

end:

	return ret;
}