Skip to content

Instantly share code, notes, and snippets.

@mewmew
Created February 6, 2020 01:48
Show Gist options
  • Save mewmew/c192a447572a31fbc776f04725d36e18 to your computer and use it in GitHub Desktop.
Save mewmew/c192a447572a31fbc776f04725d36e18 to your computer and use it in GitHub Desktop.
Proof of concept to render first cutscene of Diablo 1.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "diablo.h"
#include "dx.h"
#include "init.h"
#include "interfac.h"
void StoreScreenshot();
int main() {
// activate window.
d1_init_activate_window(NULL, TRUE);
// initialize PitchTbl.
d1_diablo_init_screen();
// initialize screen buffer.
d1_dx_init(NULL);
// load cutscene.
d1_interfac_InitCutscene(WM_DIABRETOWN);
// render cutscene.
d1_interfac_DrawCutscene();
// store screenshot.
StoreScreenshot();
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment