void VLCControlsWnd::UpdateButtons()
{
    if(hVideoPosScroll){
        SetVideoPosScrollRangeByVideoLen();
        SyncVideoPosScrollPosWithVideoPos();
    }

    if(hVolumeSlider){
        SyncVolumeSliderWithVLCVolume();
    }

    if(hFSButton) {
        HANDLE hFSBitmap =
            WM().IsFullScreen() ? RC().hDeFullscreenBitmap :
                                  RC().hFullscreenBitmap;

        HANDLE hBitmap =
            (HANDLE)SendMessage(hFSButton, BM_GETIMAGE, (WPARAM)IMAGE_BITMAP, 0);

        if( WM().getNewMessageFlag() &&
           (hBitmap == RC().hDeFullscreenBitmap ||
            hBitmap == RC().hFullscreenBitmap) )
        {
            SendMessage(hFSButton, BM_SETIMAGE,
                        (WPARAM)IMAGE_BITMAP,
                        (LPARAM)RC().hNewMessageBitmap);
            //do not allow control window to close while there are new messages
            NeedShowControls();
        }
        else{
            if(hBitmap != hFSBitmap)
                SendMessage(hFSButton, BM_SETIMAGE,
                            (WPARAM)IMAGE_BITMAP,
                            (LPARAM)hFSBitmap);
        }
    }

    if(hPlayPauseButton){
        HANDLE hBmp = IsPlaying() ? RC().hPauseBitmap : RC().hPlayBitmap;
        SendMessage(hPlayPauseButton, BM_SETIMAGE,
                    (WPARAM)IMAGE_BITMAP, (LPARAM)hBmp);
    }

}
Beispiel #2
0
/* $74 LSR extended -0*-* */
INLINE void lsr_ex( void )
{
	UINT8 t;
	EXTBYTE(t);
	CLR_NZC;
	CC|=(t&0x01);
	t>>=1;
	SET_Z8(t);
	WM(EAD,t);
}
Beispiel #3
0
// $b2 - assuming correct, store first byte to (X + $disp8)
INLINE void stx_nsc( void )
{
	UINT8 val;
	IMM8;
	val = RM(EAD);
	IMM8;
	EA = X + RM(EAD);
	CLR_NZV;
	SET_NZ8(val);
	WM(EAD,val);
}
Beispiel #4
0
/* $74 LSR extended -0*-* */
INLINE void lsr_ex( void )
{
	UINT8 t;
	EXTBYTE(t);
	CLR_NZVC;
	CC|=(t&0x01);
	t>>=1;
	SET_Z8(t);
	if (NXORC) SEV;
	WM(EAD,t);
}
Beispiel #5
0
/*
 * Modifies a WM by stealing from one letter and given to another at each position
 */
void wm_steal(Annealing *search, int wm_index, float temperature) {
  unsigned int pos, thief, victim;
  unsigned int amount, i, nind, wind;
  PSSM wm, nwm;

  wm = WM(wm_index);
  nwm = NWM(wm_index);
  SWITCH_WM(wm_index);
  wm = WM(wm_index);
  nwm = NWM(wm_index);
  wm->length = nwm->length;

  
  pos = wm->length;
  while (pos--) {    
    
    /* Steal from one letter, and add to another */
    victim = RAND_INT(nwm->alphabetSize);
    while ( nwm->counts[ WM_IND(nwm, pos, victim)  ] == 0) victim = RAND_INT(4.0);

    thief = RAND_INT(nwm->alphabetSize - 1);
    if (thief >= victim) thief++; 
    amount = STEAL_AMOUNT;

    i = ALPHLEN;
    while (i--) {      
      nind = WM_IND(nwm, pos, i);
      wind = WM_IND(wm, pos, i);
      wm->counts[wind] = nwm->counts[nind];

      if (i == thief) 
	wm->counts[wind]  += amount;
      else if(i == victim)
	wm->counts[wind] -= amount;
      wm->scores[wind] = logtable[wm->counts[wind]];
    }
  }
}
Beispiel #6
0
static void movp_i2p( void )
{
	UINT8	i,v;

	IMMBYTE(i);
	IMMBYTE(v);
	WM( 0x0100+v, i);

	CLR_NZC;
	SET_N8(i);
	SET_Z8(i);

	tms7000_icount -= 11;
}
Beispiel #7
0
static void xorp_a2p( void )
{
	UINT8	t;
	UINT8	v;

	IMMBYTE(v);
	t = RDA ^ RM( 0x0100 + v);
	WM( 0x0100+v, t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #8
0
static void pop_r( void )
{
	UINT16	t;
	UINT8	r;

	IMMBYTE(r);
	PULLBYTE(t);
	WM(r,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 8;
}
Beispiel #9
0
static void movp_b2p( void )
{
	UINT8	p;
	UINT16	t;

	IMMBYTE(p);
	t=RDB;
	WM( 0x0100+p,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #10
0
static void mov_i2r( void )
{
	UINT16	t;
	UINT8	r;

	IMMBYTE(t);
	IMMBYTE(r);
	WM(r,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 9;
}
Beispiel #11
0
static void sta_inx( void )
{
	UINT16	t;
	PAIR	i;

	IMMWORD( i );
	t = RDA;
	WM(i.w.l+RDB,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 13;
}
Beispiel #12
0
static void andp_b2p( void )
{
	UINT8	t;
	UINT8	v;

	IMMBYTE(v);
	t = RDB & RM( 0x0100 + v);
	WM( 0x0100+v, t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 9;
}
Beispiel #13
0
/* this appears to be unused */
static void movp_r2p( void )
{
	UINT8	p,r;
	UINT16	t;

	IMMBYTE(r);
	IMMBYTE(p);
	t=RM(r);
	WM( 0x0100+p,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 11;
}
Beispiel #14
0
static void mov_r2r( void )
{
	UINT8	r,s;
	UINT16	t;

	IMMBYTE(r);
	IMMBYTE(s);
	t = RM(r);
	WM(s,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #15
0
static void sta_dir( void )
{
	UINT16	t;
	PAIR	i;

	t = RDA;
	IMMWORD( i );

	WM(i.w.l,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 11;
}
Beispiel #16
0
static void andp_i2p( void )
{
	UINT8	t;
	UINT8	i,v;

	IMMBYTE(i);
	IMMBYTE(v);
	t = i & RM( 0x0100 + v);
	WM( 0x0100+v, t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 11;
}
Beispiel #17
0
static void mov_b2r( void )
{
	UINT8	r;
	UINT16	t;

	IMMBYTE(r);

	t = RDB;
	WM(r,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 7;
}
Beispiel #18
0
static void sbb_ir( void )
{
	UINT16	t;
	UINT8	r,i;

	IMMBYTE(i);
	IMMBYTE(r);
	t = RM(r) - i - ((pSR & SR_C) ? 0 : 1);
	WM(r,t);

	CLR_NZC;
	SET_C8(~t);
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 9;
}
Beispiel #19
0
static void xor_i2r( void )
{
	UINT8	t;
	UINT8	i,j;

	IMMBYTE(i);
	IMMBYTE(j);

	t = i ^ RM(j);
	WM(j,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 9;
}
Beispiel #20
0
static void and_r2r( void )
{
	UINT8	t;
	UINT8	i,j;

	IMMBYTE(i);
	IMMBYTE(j);

	t = RM(i) & RM(j);
	WM(j,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #21
0
static void sta_ind( void )
{
	UINT16	t;
	PAIR	p;
	INT8	r;

	IMMBYTE(r);
	p.w.l = RRF16(r);
	t = RDA;
	WM(p.w.l,t);

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #22
0
static void sub_ir( void )
{
	UINT16	t;
	UINT8	r,i;

	IMMBYTE(i);
	IMMBYTE(r);
	t = RM(r) - i;
	WM(r,t);

	CLR_NZC;
	SET_C8(~t);
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 9;
}
Beispiel #23
0
static void sub_rr( void )
{
	UINT16	t;
	UINT8	r,s;

	IMMBYTE(s);
	IMMBYTE(r);
	t = RM(r) - RM(s);
	WM(r,t);

	CLR_NZC;
	SET_C8(~t);
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #24
0
static void inv_r( void )
{
	UINT16	t;
	UINT8	r;

	IMMBYTE(r);

	t = ~(RM(r));

	WM( r, t );

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 7;
}
Beispiel #25
0
static void add_i2r( void )
{
	UINT16	t;
	UINT8	i,j;

	IMMBYTE(i);
	IMMBYTE(j);

	t = i+RM(j);
	WM(j,t);

	CLR_NZC;
	SET_C8(t);
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 9;
}
Beispiel #26
0
static void dec_r( void )
{
	UINT16	t;
	UINT8	r;

	IMMBYTE(r);

	t = RM(r) - 1;

	WM( r, t );

	CLR_NZC;
	SET_N8(t);
	SET_Z8(t);
	SET_C8(~t);

	tms7000_icount -= 7;
}
Beispiel #27
0
static void adc_r2r( void )
{
	UINT16	t;
	UINT8	i,j;

	IMMBYTE(i);
	IMMBYTE(j);

	t = RM(i)+RM(j) + GET_C;
	WM(j,t);

	CLR_NZC;
	SET_C8(t);
	SET_N8(t);
	SET_Z8(t);

	tms7000_icount -= 10;
}
Beispiel #28
0
void decrease_left(Annealing *search, const unsigned int wm_index, const unsigned int length) {
  SWITCH_WM(wm_index);
  PSSM wm = WM(wm_index);
  PSSM nwm = NWM(wm_index);
  int pos, old_pos;
  int offset = length * ALPHLEN;    

  wm->last_col = length; 
  wm->length = nwm->length - wm->last_col; 

  pos = wm->length * ALPHLEN;
  while (pos--) {
    old_pos = pos + offset;
    wm->counts[pos] = nwm->counts[old_pos];
    wm->scores[pos] = nwm->scores[old_pos];
  }

}
Beispiel #29
0
void backroll_wm(Annealing *search, int wm_index) {
  switch (search->last_step[wm_index]) {
  case MOD: SWITCH_WM(wm_index); break; 
  case CUT: search->cut[wm_index] = search->oldcut[wm_index]; break;
  case INC_R: WM(wm_index)->length -= WM(wm_index)->last_col; break;
  case INC_L: SWITCH_WM(wm_index); break;
  case DEC_R: WM(wm_index)->length += WM(wm_index)->last_col; break;
  case DEC_L: SWITCH_WM(wm_index); break;
  case MOV_R: SWITCH_WM(wm_index); break;
  case MOV_L: SWITCH_WM(wm_index); WM(wm_index)->length += WM(wm_index)->last_col; break; 
  }

  SWITCH_HITS(wm_index);
}
Beispiel #30
0
static FINLINE void
setup_render_view(struct app* app, struct rdr_view* render_view)
{
  struct wm_window_desc win_desc;
  memset(&win_desc, 0, sizeof(win_desc));
  assert(app && render_view);

  assert(sizeof(app->view->transform) == sizeof(render_view->transform));
  WM(get_window_desc(app->wm.window, &win_desc));

  aosf44_store(render_view->transform, &app->view->transform);
  render_view->proj_ratio = app->view->ratio;
  render_view->fov_x = app->view->fov_x;
  render_view->znear = app->view->znear;
  render_view->zfar = app->view->zfar;
  render_view->x = 0;
  render_view->y = 0;
  render_view->width = win_desc.width;
  render_view->height = win_desc.height;
}