Exemplo n.º 1
0
void TrackSelectUpdate(struct Tracker_Windows *window,struct WBlocks *wblock,int ret){

	switch(ret){
		case 0:
			return;
		case 1:
			R_SetCursorPos(window);
			break;
		case 2:
                  window->must_redraw = true;
#if 0
		  UpdateWBlockCoordinates(window,wblock);
		  DrawUpAllWTracks(window,wblock,NULL);
		  DrawAllWTrackHeaders(window,wblock);

                  {
                    struct WTracks *wtrack2=ListLast1(&wblock->wtracks->l);
                    if(wtrack2->fxarea.x2<wblock->a.x2){
                      GFX_FilledBox(window,0,wtrack2->fxarea.x2+2,wblock->t.y1,wblock->a.x2,wblock->t.y2,PAINT_BUFFER);
                      GFX_FilledBox(window,0,wtrack2->fxarea.x2+2,0,wblock->a.x2,wblock->t.y1,PAINT_DIRECTLY);
                    }
                  }

		  DrawBottomSlider(window);
                  DrawUpTrackerWindow(window);
#endif
                  break;
	}

        GFX_update_instrument_patch_gui(wblock->wtrack->track->patch);
        DrawAllWTrackHeaders(window,wblock);

        window->must_redraw=true;
}
Exemplo n.º 2
0
static void TrackSelectUpdate(struct Tracker_Windows *window,struct WBlocks *wblock, int unused){

        GFX_update_instrument_patch_gui(wblock->wtrack->track->patch);
        DrawAllWTrackHeaders(window,wblock);

        window->must_redraw=true;
}
Exemplo n.º 3
0
static bool Load_CurrPos_org(struct Tracker_Windows *window, const wchar_t *filename){
	bool ret = false;

        // So many things happen here, that we should turn off garbage collection while loading.
        //
        // For instance, the instrument widget contains pointers (which are unreachable from the GC) to Patch
        // and PatchData objects. The instrument widget is updated after setting a new root, so it may access
        // that memory while a new song is loaded (since we don't have control over what Qt may do while we
        // access it). Not unlikely to be other similar situations.
        if(0){
          GC_disable();
        }


	PlayStop();

        if(Undo_are_you_shure_questionmark()==false)
          goto exit;

        if(filename==NULL)
          filename=GFX_GetLoadFileName(window,NULL,"Select file to load", NULL, NULL);

	if(filename==NULL) goto exit;

        if (STRING_ends_with(filename,".MMD2") ||
            STRING_ends_with(filename,".MMD3") ||
            STRING_ends_with(filename,".MMD") ||
            STRING_ends_with(filename,".mmd2") ||
            STRING_ends_with(filename,".mmd3") ||
            STRING_ends_with(filename,".mmd")
            )
          {

            mmp2filename=filename;
            ret = Load(STRING_create("new_song.rad"));

          } else {

            OS_set_loading_path(filename);
            {
              ret = Load(filename);
            }
            OS_unset_loading_path();
            
            GFX_SetWindowTitle(root->song->tracker_windows, filename);
            
            GFX_EditorWindowToFront(root->song->tracker_windows);
            
            struct WBlocks *wblock = root->song->tracker_windows->wblock;
            GFX_update_instrument_patch_gui(wblock->wtrack->track->patch);
            
            DrawUpTrackerWindow(root->song->tracker_windows);
            
            fprintf(stderr,"Got here (loading finished)\n");
        }

 exit:

        if(0){
          GC_enable();
        }

	if(mmp2filename!=NULL) {
          LoadMMP2(root->song->tracker_windows, mmp2filename);
          mmp2filename=NULL;
        }

        if (ret)
          ResetUndo();
        
        return ret;
}