ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: GAMES/DOOM/I_VIDEO.CC

Source reference: GAMES/DOOM/I_VIDEO.CC

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path GAMES/DOOM/I_VIDEO.CC
Lines 106
Bytes 1596
SHA-256 69b88f3b0760362679a9c42b2fa16dad3f0667b24ef239984eed766ac228303a
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
21 I_InitGraphics
38 I_ShutdownGraphics
41 I_SetPalette
45 I_GetPaletteIndex
52 I_UpdateNoBlit
55 I_FinishUpdate
59 I_ReadScreen
68 I_BeginRead
71 I_EndRead
74 I_SetWindowTitle
78 I_CheckIsScreensaver
81 I_DisplayFPSDots
85 I_BindVideoVariables
88 I_InitWindowTitle
91 I_InitWindowIcon
94 I_StartFrame
97 I_EnableLoadingDisk
100 I_GraphicsCheckCommandLine
103 I_SetGrabMouseCallback

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

/* Video backend: 8-bit 320x200 into DG_Screen, then fb_blit. */

char *I_VideoBuffer;
int screenvisible;
int usegamma;
int vanilla_keyboard_mapping;
int screensaver_mode;
char *video_driver;
int screen_width;
int screen_height;
int screen_bpp;
int fullscreen;
int aspect_ratio_correct;
int show_diskicon;
int diskicon_readbytes;
float mouse_acceleration;
int mouse_threshold;
int usemouse;
int key_was[128];

void I_InitGraphics() {
    int i;
    DG_Init();
    I_VideoBuffer = DG_Screen;
    screenvisible = 1;
    vanilla_keyboard_mapping = 1;
    screen_width = 320;
    screen_height = 200;
    mouse_acceleration = 2.0;
    mouse_threshold = 10;
    i = 0;
    while (i < 128) {
        key_was[i] = 0;
        i = i + 1;
    }
}

void I_ShutdownGraphics() {
}

void I_SetPalette(char *palette) {
    setpal(palette);
}

int I_GetPaletteIndex(int r, int g, int b) {
    r = r;
    g = g;
    b = g;
    return 0;
}

void I_UpdateNoBlit() {
}

void I_FinishUpdate() {
    DG_DrawFrame();
}

void I_ReadScreen(char *scr) {
    int i;
    i = 0;
    while (i < 64000) {
        scr[i] = I_VideoBuffer[i];
        i = i + 1;
    }
}

void I_BeginRead() {
}

void I_EndRead() {
}

void I_SetWindowTitle(char *title) {
    DG_SetWindowTitle(title);
}

void I_CheckIsScreensaver() {
}

void I_DisplayFPSDots(int dots_on) {
    dots_on = dots_on;
}

void I_BindVideoVariables() {
}

void I_InitWindowTitle() {
}

void I_InitWindowIcon() {
}

void I_StartFrame() {
}

void I_EnableLoadingDisk() {
}

void I_GraphicsCheckCommandLine() {
}

void I_SetGrabMouseCallback(int func) {
    func = func;
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-69b88f3b07603626 Reviewed source: da3df29cb397 Class: generated-source-reference