MCPcopy Create free account
hub / github.com/NetHack/NetHack / vga_DisplayCell

Function vga_DisplayCell

sys/msdos/vidvga.c:1054–1081  ·  view source on GitHub ↗

* This is the routine that displays a high-res "cell" pointed to by 'gp' * at the desired location (col,row). * * Note: (col,row) in this case refer to the coordinate location in * NetHack character grid terms, (ie. the 40 x 25 character grid), * not the x,y pixel location. * */

Source from the content-addressed store, hash-verified

1052 *
1053 */
1054static void
1055vga_DisplayCell(struct planar_cell_struct *gpcs, int col, int row)
1056{
1057 int i, pixx, pixy;
1058 char __far *tmp_s; /* source pointer */
1059 char __far *tmp_d; /* destination pointer */
1060 int vplane;
1061
1062 pixy = row2y(row); /* convert to pixels */
1063 pixx = col2x(col);
1064 for (vplane = 0; vplane < SCREENPLANES; ++vplane) {
1065 egawriteplane(vp[vplane]);
1066 for (i = 0; i < ROWS_PER_CELL; ++i) {
1067 tmp_d = screentable[i + pixy];
1068 tmp_d += pixx;
1069 /*
1070 * memcpy((void *)tmp,(void *)gpcs->plane[vplane].image[i],
1071 * BYTES_PER_CELL);
1072 */
1073 tmp_s = gpcs->plane[vplane].image[i];
1074 WRITE_ABSOLUTE(tmp_d, (*tmp_s));
1075 ++tmp_s;
1076 ++tmp_d;
1077 WRITE_ABSOLUTE(tmp_d, (*tmp_s));
1078 }
1079 }
1080 egawriteplane(15);
1081}
1082
1083static void
1084vga_DisplayCell_O(struct overview_planar_cell_struct *gpcs, int col, int row)

Callers 3

vga_xputgFunction · 0.85
vidvga.cFile · 0.85
vga_scrollmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected