diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-19 12:14:11 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-19 12:14:11 +0800 |
commit | 2949732db80f63afe3e0291fc72552b3c90402be (patch) | |
tree | 8201981684ba80ea2e4dfbc3e6476b98c70f2241 /mbbsd | |
parent | e104196846d0f656ae663d2a67eec9e02e43cbec (diff) | |
download | pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.tar pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.tar.gz pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.tar.bz2 pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.tar.lz pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.tar.xz pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.tar.zst pttbbs-2949732db80f63afe3e0291fc72552b3c90402be.zip |
* add more comments to explain the expression of adbanner index calculation
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4855 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/menu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index b1ce89f1..828dcd97 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -266,9 +266,12 @@ adbanner(int cmdmode) } else if (cmdmode == 999999) { /* Goodbye my friend */ i = 0; } else { - // do not use random. we work in slide show mode. - // since menu is updated per hour, the total presentation time - // should be less than one hour. 3600/MAX_ADBANNER(500)=7. + // To display ADBANNERs in slide show mode. + // Since menu is updated per hour, the total presentation time + // should be less than one hour. 60*60/MAX_ADBANNER[500]=7 (seconds). + // @ Note: 60 * 60 / MAX_ADBANNER =3600/MAX_ADBANNER = "how many seconds + // can one ADBANNER to display" to slide through every banners in one hour. + // @ now / (3600 / MAx_ADBANNER) means "get the index of which to show". // syncnow(); if (SHM->last_film > N_SYSADBANNER) i = N_SYSADBANNER + (now / (3600 / MAX_ADBANNER) ) % |