Esempio n. 1
0
void display_setup(void)
{
    screen_window = HeapAllocPtr(sizeof(WINDOW));
    WinOpen(screen_window, MakeWinRect(10, 10, 106, 74), WF_SAVE_SCR | WF_TTY | WF_ROUNDEDBORDER | WF_TITLE, "TI-83+ Emulator");
    WinActivate(screen_window);
    return;
}
Esempio n. 2
0
void ext_ABOUTRC(void)
{
	Access_AMS_Global_Variables;
	const WIN_RECT wRegion={C(10, 30), C(4, 6), C(MAX_X-10, 215), C(85, 113)};
	WINDOW win;
	WIN_POINT ds_pt={4,1}, post_pt;
	#ifndef NO_EASTER_EGGS
		short leet_user=FALSE;
		short key_code='x';//initialize it with something other than a valid key...
	#endif
	
	if(remaining_element_count(top_estack)) ER_throw(TOO_MANY_ARGS_ERROR);
	
	if(!WinOpen(&win, &wRegion, WF_SAVE_SCR|WF_TTY|WF_TITLE|WF_ROUNDEDBORDER, XR_stringPtr(XR_ABOUT)))
		ER_throw(ER_MEMORY);
	
	WinBeginPaint(&win);
	
	#ifdef _89
		WinFont(&win, F_4x6);
	#endif
	
	post_pt.x0=WinWidth(&win)-4-((BITMAP*)AppIcon)->NumCols;
	post_pt.y0=1;
	
	WinClr(&win);
	WinBitmapPut(&win, ds_pt.x0, ds_pt.y0, (BITMAP*)DSIcon, A_XOR);
	WinBitmapPut(&win, post_pt.x0, post_pt.y0, (BITMAP*)AppIcon, A_XOR);
	
	WinMoveTo(&win,33,7);
	WinStr(&win, (char*)OO_AbsoluteGet(OO_FIRST_APP_STRING + XR_About_Me));//About());
	DrawStaticButton(&win, PDB_OK, 5);
	
	#ifdef NO_EASTER_EGGS
		while(KeyYesOrNo(GKeyIn(NULL, GKF_MODAL | GKF_SYS))==-1);
	#else
		while(KeyYesOrNo(key_code)==-1)
		{
			key_code=GKeyIn(NULL, GKF_MODAL | GKF_SYS);
			if(key_code==(0x31337-(0x12F0|0x30000)) && !leet_user)	//$r3 j00 1 31337 H4X0R G
			{
				short dx=1, dy=1, steps;
				
				leet_user=TRUE;
				
				for(steps=0;steps<C(105,210);steps++)
				{
					#ifdef _92
					if(steps<155)
					{
					#endif
						WinBitmapPut(&win, post_pt.x0, post_pt.y0, (BITMAP*)AppIcon, A_XOR);
						post_pt.x0--;
						WinBitmapPut(&win, post_pt.x0, post_pt.y0, (BITMAP*)AppIcon, A_XOR);
					#ifdef _92
					}
					else
					{
						short delay;
						for(delay=0;delay<5000;delay++);
					}
					#endif
					
					WinBitmapPut(&win, ds_pt.x0, ds_pt.y0, (BITMAP*)DSIcon, A_XOR);
					if(ds_pt.x0>WinWidth(&win)-16  || ds_pt.x0<0)dx=-dx;
					if(ds_pt.y0>WinHeight(&win)-16 || ds_pt.y0<0)dy=-dy;
					ds_pt.x0+=dx;	ds_pt.y0+=dy;
					WinBitmapPut(&win, ds_pt.x0, ds_pt.y0, (BITMAP*)DSIcon, A_XOR);
				}
			}
		}
		#endif
	

	WinEndPaint(&win);
	WinClose(&win);
}
Esempio n. 3
0
static void near WFC_Init(void)
{
  Get_Dos_Date(&today);

#ifdef TTYVIDEO
  if (displaymode==VIDEO_IBM)
#endif
  {
    WinCls(win, CGRAY | _BLACK);
    WinSync(win, FALSE);

    win_stat= WinOpen( 3, 0, 7, 39, BORDER_DOUBLE, col.wfc_stat,
                      col.wfc_stat_bor, WIN_NOCSYNC | WIN_NODRAW);
                    
    win_modem=WinOpen( 3, 40, 7, 37, BORDER_DOUBLE, col.wfc_modem,
                      col.wfc_modem_bor, WIN_NOCSYNC | WIN_NODRAW);
                    
    win_keys =WinOpen(19, 0, 4, 77, BORDER_DOUBLE, col.wfc_keys,
                      col.wfc_keys_bor, WIN_NOCSYNC | WIN_NODRAW);
                    
    win_activ=WinOpen(11, 0, 7, 77, BORDER_DOUBLE, col.wfc_activ,
                      col.wfc_activ_bor, WIN_NOCSYNC | WIN_NODRAW);


    /* Put the Max copyright logo "on top" */

    WinToTop(dspwin);

    VidHideCursor();

    WinTitle(win_stat, wfc_status_tit, TITLE_LEFT);
    WinTitle(win_modem,wfc_modem_tit, TITLE_LEFT);
    WinTitle(win_activ,wfc_activ_tit, TITLE_LEFT);
    WinTitle(win_keys, wfc_keys_tit, TITLE_LEFT);

    WinGotoXY(win_modem, 5, 0, FALSE);
    WinGotoXY(win_activ, 4, 0, FALSE);

    WinPutstr(win_keys, 0,  2, wfc_keys1);
    WinPutstr(win_keys, 0, 37, wfc_keys2);
    WinPutstr(win_keys, 1,  2, wfc_keys3);
    WinPutstr(win_keys, 1, 37, wfc_keys4);

    WinPutstr(win_stat, 0, 1, wfc_stat_nextev);
    WinPutstr(win_stat, 1, 1, wfc_stat_stat);
    WinPutstr(win_stat, 2, 1, wfc_stat_calltoday);
    WinPutstr(win_stat, 3, 1, wfc_stat_calltotal);
    WinPutstr(win_stat, 4, 1, wfc_stat_lastcaller);

    WinSync(win_stat, FALSE);
    WinSync(win_modem, FALSE);
    WinSync(win_activ, FALSE);
    WinSync(win_keys,FALSE);

    DrawMaxHeader();
  }

  in_wfc=TRUE;
  log_wfc=TRUE;
  do_timecheck=FALSE;

  kexit=FALSE;
  do_next_event=FALSE;
  
  Get_Next_Event();

  logit(log_wfc_waiting, (next_event_time-time(NULL))/60L);

  WFC_Init_Modem();
}