summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2009-01-06 09:03:36 +0000
committerMichael Jennings <mej@kainx.org>2009-01-06 09:03:36 +0000
commite53c4775f6adfe3c01f00af4a5766c80792ca0f8 (patch)
treecc341be5e00482c5bd1da8f71518aeec5a444442
parent0261bd001bf0aef052525a4ba126bb6fabc77868 (diff)
Tue Jan 6 01:03:35 2009 Michael Jennings (mej)
Prevent blank Escreen buttonbar on startup. ---------------------------------------------------------------------- SVN revision: 38479
-rw-r--r--ChangeLog4
-rw-r--r--src/command.c29
2 files changed, 27 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ed50338..2f1287e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5591,3 +5591,7 @@ Mon Jan 5 23:50:28 2009 Michael Jennings (mej)
5591Remove fontset fallbacks. I think this might help speed up the load 5591Remove fontset fallbacks. I think this might help speed up the load
5592time slowness some people are seeing. Let's find out. 5592time slowness some people are seeing. Let's find out.
5593---------------------------------------------------------------------- 5593----------------------------------------------------------------------
5594Tue Jan 6 01:03:35 2009 Michael Jennings (mej)
5595
5596Prevent blank Escreen buttonbar on startup.
5597----------------------------------------------------------------------
diff --git a/src/command.c b/src/command.c
index 0e5f456..9190804 100644
--- a/src/command.c
+++ b/src/command.c
@@ -2726,11 +2726,10 @@ exe_prg(void *xd, char **argv)
2726 2726
2727/****** Azundris' playthings :-) ******/ 2727/****** Azundris' playthings :-) ******/
2728 2728
2729#ifdef ESCREEN_FX
2730#define DIRECT_MASK (~(RS_Cursor|RS_Select|RS_fontMask)) 2729#define DIRECT_MASK (~(RS_Cursor|RS_Select|RS_fontMask))
2731#define COLOUR_MASK (RS_fgMask|RS_bgMask) 2730#define COLOUR_MASK (RS_fgMask|RS_bgMask)
2732#define DIRECT_SET_SCREEN(x,y,fg,bg) (screen.text[ys+y])[x]=fg; (screen.rend[ys+y])[x]=bg&DIRECT_MASK; 2731#define DIRECT_SET_SCREEN(x,y,fg,bg) (screen.text[ys+y])[x]=fg; (screen.rend[ys+y])[x]=bg&DIRECT_MASK;
2733#define CLEAR (1<<16) 2732#define CLEAR (RS_None | bgColor)
2734 2733
2735static void 2734static void
2736direct_write_screen(int x, int y, char *fg, rend_t bg) 2735direct_write_screen(int x, int y, char *fg, rend_t bg)
@@ -2747,6 +2746,7 @@ direct_write_screen(int x, int y, char *fg, rend_t bg)
2747 } 2746 }
2748} 2747}
2749 2748
2749#ifdef ESCREEN_FX
2750static void 2750static void
2751bosconian(int n) 2751bosconian(int n)
2752{ 2752{
@@ -2900,8 +2900,9 @@ waitstate(void *xd, int ms)
2900 matrix(31); 2900 matrix(31);
2901 unbosconian(); 2901 unbosconian();
2902 } 2902 }
2903 bosconian(4); 2903 bosconian(20);
2904 unbosconian(); 2904 unbosconian();
2905 scr_refresh(SLOW_REFRESH);
2905 } 2906 }
2906 2907
2907 direct_write_screen(0, y++, " **** COMMODORE 64 BASIC V2 ****", (0 << 8) | CLEAR); 2908 direct_write_screen(0, y++, " **** COMMODORE 64 BASIC V2 ****", (0 << 8) | CLEAR);
@@ -2911,12 +2912,30 @@ waitstate(void *xd, int ms)
2911 screen.row = y; 2912 screen.row = y;
2912 screen.col = 0; 2913 screen.col = 0;
2913 2914
2914 scr_refresh(FAST_REFRESH); 2915 scr_refresh(SLOW_REFRESH);
2915 2916
2916 sleep(dur); 2917 sleep(dur);
2917 2918
2918 return 0; 2919 return 0;
2919} 2920}
2921#else
2922static int
2923waitstate(void *xd, int ms)
2924{
2925 USE_VAR(xd);
2926
2927 direct_write_screen(TERM_WINDOW_GET_REPORTED_COLS() / 2 - 17, TERM_WINDOW_GET_ROWS() / 2,
2928 "**** Initializing, please wait ****", (15 << 9) | CLEAR);
2929 screen.row = 0;
2930 screen.col = 0;
2931
2932 scr_refresh(SLOW_REFRESH);
2933
2934 sleep((time_t) (ms / 1000));
2935
2936 return 0;
2937
2938}
2920#endif 2939#endif
2921 2940
2922static _ns_efuns * 2941static _ns_efuns *
@@ -2947,9 +2966,7 @@ escreen_reg_funcs(void)
2947 ns_register_inp(efuns, input_dialog); 2966 ns_register_inp(efuns, input_dialog);
2948 ns_register_tab(efuns, menu_tab); 2967 ns_register_tab(efuns, menu_tab);
2949 2968
2950#ifdef ESCREEN_FX
2951 ns_register_fun(efuns, waitstate); 2969 ns_register_fun(efuns, waitstate);
2952#endif
2953 2970
2954 return efuns; 2971 return efuns;
2955} 2972}