Followup to yokota's last commit:
- va_mode_flags -> va_info.vi_flags - scanline width may be different from screen width
This commit is contained in:
parent
d6441ddef3
commit
78a8014571
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: daemon_saver.c,v 1.13 1999/01/11 03:18:45 yokota Exp $
|
||||
* $Id: daemon_saver.c,v 1.14 1999/01/17 14:25:08 yokota Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -199,7 +199,7 @@ daemon_saver(video_adapter_t *adp, int blank)
|
||||
int min, max;
|
||||
|
||||
if (blank) {
|
||||
if (adp->va_mode_flags & V_INFO_GRAPHICS)
|
||||
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
|
||||
return EAGAIN;
|
||||
if (blanked == 0) {
|
||||
window = (u_short *)adp->va_window;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: logo_saver.c,v 1.3 1999/01/11 03:18:49 yokota Exp $
|
||||
* $Id: logo_saver.c,v 1.4 1999/01/16 10:20:16 des Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -37,7 +37,7 @@
|
||||
#include <saver.h>
|
||||
|
||||
static u_char *vid;
|
||||
static int banksize, scrmode, scrw, scrh;
|
||||
static int banksize, scrmode, bpsl, scrw, scrh;
|
||||
static int blanked;
|
||||
|
||||
#include "logo.c"
|
||||
@ -47,25 +47,25 @@ logo_blit(video_adapter_t *adp, int x, int y)
|
||||
{
|
||||
int d, l, o, p;
|
||||
|
||||
for (o = 0, p = y * scrw + x; p > banksize; p -= banksize)
|
||||
for (o = 0, p = y * bpsl + x; p > banksize; p -= banksize)
|
||||
o += banksize;
|
||||
set_origin(adp, o);
|
||||
|
||||
for (d = 0; d < sizeof logo_img; d += logo_w) {
|
||||
if (p + logo_w < banksize) {
|
||||
bcopy(logo_img + d, vid + p, logo_w);
|
||||
p += scrw;
|
||||
p += bpsl;
|
||||
} else if (p < banksize) {
|
||||
l = banksize - p;
|
||||
bcopy(logo_img + d, vid + p, l);
|
||||
set_origin(adp, (o += banksize));
|
||||
bcopy(logo_img + d + l, vid, logo_w - l);
|
||||
p += scrw - banksize;
|
||||
p += bpsl - banksize;
|
||||
} else {
|
||||
p -= banksize;
|
||||
set_origin(adp, (o += banksize));
|
||||
bcopy(logo_img + d, vid + p, logo_w);
|
||||
p += scrw;
|
||||
p += bpsl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -100,8 +100,9 @@ logo_saver(video_adapter_t *adp, int blank)
|
||||
set_video_mode(adp, scrmode, logo_pal, 0);
|
||||
blanked++;
|
||||
vid = (u_char *)adp->va_window;
|
||||
bpsl = adp->va_line_width;
|
||||
splx(pl);
|
||||
for (i = 0; i < scrw*scrh; i += banksize) {
|
||||
for (i = 0; i < bpsl*scrh; i += banksize) {
|
||||
set_origin(adp, i);
|
||||
bzero(vid, banksize);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: snake_saver.c,v 1.21 1999/01/11 03:18:52 yokota Exp $
|
||||
* $Id: snake_saver.c,v 1.22 1999/01/17 14:25:19 yokota Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,7 @@ snake_saver(video_adapter_t *adp, int blank)
|
||||
#define savs messagep
|
||||
|
||||
if (blank) {
|
||||
if (adp->va_mode_flags & V_INFO_GRAPHICS)
|
||||
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
|
||||
return EAGAIN;
|
||||
if (blanked <= 0) {
|
||||
window = (u_short *)adp->va_window;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: star_saver.c,v 1.18 1999/01/11 03:18:53 yokota Exp $
|
||||
* $Id: star_saver.c,v 1.19 1999/01/17 14:25:19 yokota Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,7 @@ star_saver(video_adapter_t *adp, int blank)
|
||||
static u_short stars[NUM_STARS][2];
|
||||
|
||||
if (blank) {
|
||||
if (adp->va_mode_flags & V_INFO_GRAPHICS)
|
||||
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
|
||||
return EAGAIN;
|
||||
if (!blanked) {
|
||||
window = (u_short *)adp->va_window;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: daemon_saver.c,v 1.13 1999/01/11 03:18:45 yokota Exp $
|
||||
* $Id: daemon_saver.c,v 1.14 1999/01/17 14:25:08 yokota Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -199,7 +199,7 @@ daemon_saver(video_adapter_t *adp, int blank)
|
||||
int min, max;
|
||||
|
||||
if (blank) {
|
||||
if (adp->va_mode_flags & V_INFO_GRAPHICS)
|
||||
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
|
||||
return EAGAIN;
|
||||
if (blanked == 0) {
|
||||
window = (u_short *)adp->va_window;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: logo_saver.c,v 1.3 1999/01/11 03:18:49 yokota Exp $
|
||||
* $Id: logo_saver.c,v 1.4 1999/01/16 10:20:16 des Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -37,7 +37,7 @@
|
||||
#include <saver.h>
|
||||
|
||||
static u_char *vid;
|
||||
static int banksize, scrmode, scrw, scrh;
|
||||
static int banksize, scrmode, bpsl, scrw, scrh;
|
||||
static int blanked;
|
||||
|
||||
#include "logo.c"
|
||||
@ -47,25 +47,25 @@ logo_blit(video_adapter_t *adp, int x, int y)
|
||||
{
|
||||
int d, l, o, p;
|
||||
|
||||
for (o = 0, p = y * scrw + x; p > banksize; p -= banksize)
|
||||
for (o = 0, p = y * bpsl + x; p > banksize; p -= banksize)
|
||||
o += banksize;
|
||||
set_origin(adp, o);
|
||||
|
||||
for (d = 0; d < sizeof logo_img; d += logo_w) {
|
||||
if (p + logo_w < banksize) {
|
||||
bcopy(logo_img + d, vid + p, logo_w);
|
||||
p += scrw;
|
||||
p += bpsl;
|
||||
} else if (p < banksize) {
|
||||
l = banksize - p;
|
||||
bcopy(logo_img + d, vid + p, l);
|
||||
set_origin(adp, (o += banksize));
|
||||
bcopy(logo_img + d + l, vid, logo_w - l);
|
||||
p += scrw - banksize;
|
||||
p += bpsl - banksize;
|
||||
} else {
|
||||
p -= banksize;
|
||||
set_origin(adp, (o += banksize));
|
||||
bcopy(logo_img + d, vid + p, logo_w);
|
||||
p += scrw;
|
||||
p += bpsl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -100,8 +100,9 @@ logo_saver(video_adapter_t *adp, int blank)
|
||||
set_video_mode(adp, scrmode, logo_pal, 0);
|
||||
blanked++;
|
||||
vid = (u_char *)adp->va_window;
|
||||
bpsl = adp->va_line_width;
|
||||
splx(pl);
|
||||
for (i = 0; i < scrw*scrh; i += banksize) {
|
||||
for (i = 0; i < bpsl*scrh; i += banksize) {
|
||||
set_origin(adp, i);
|
||||
bzero(vid, banksize);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: snake_saver.c,v 1.21 1999/01/11 03:18:52 yokota Exp $
|
||||
* $Id: snake_saver.c,v 1.22 1999/01/17 14:25:19 yokota Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,7 @@ snake_saver(video_adapter_t *adp, int blank)
|
||||
#define savs messagep
|
||||
|
||||
if (blank) {
|
||||
if (adp->va_mode_flags & V_INFO_GRAPHICS)
|
||||
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
|
||||
return EAGAIN;
|
||||
if (blanked <= 0) {
|
||||
window = (u_short *)adp->va_window;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: star_saver.c,v 1.18 1999/01/11 03:18:53 yokota Exp $
|
||||
* $Id: star_saver.c,v 1.19 1999/01/17 14:25:19 yokota Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,7 @@ star_saver(video_adapter_t *adp, int blank)
|
||||
static u_short stars[NUM_STARS][2];
|
||||
|
||||
if (blank) {
|
||||
if (adp->va_mode_flags & V_INFO_GRAPHICS)
|
||||
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
|
||||
return EAGAIN;
|
||||
if (!blanked) {
|
||||
window = (u_short *)adp->va_window;
|
||||
|
Loading…
Reference in New Issue
Block a user