Vendor raptor source files (was embedded gitlink)

Tree vendored at upstream 0019c5dd; origin + license recorded in
raptor/VENDOR.txt. Windows SDL dev packages excluded via .gitignore.
This commit is contained in:
raptorreplica committed 2026-08-25 22:08:42 +10:00
1 parent bd3ea30d55
commit f7c9b7a02d
809 files changed
+337824 -1

No files matched your search

+86
View File
@@ -0,0 +1,86 @@
//
// Copyright(C) 2005-2014 Simon Howard
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// DESCRIPTION:
// Exit text-mode ENDOOM screen.
//
#include <stdio.h>
#include <string.h>
#include "rap.h"
#include "i_lastscr.h"
#include "textscreen.h"
#include "i_video.h"
#include "joyapi.h"
#include "kbdapi.h"
#include "ptrapi.h"
#include "imsapi.h"
#define LASTSCR_W 80
#define LASTSCR_H 25
//
// Displays the text mode ending screen after the game quits
//
void I_LASTSCR(char* mem)
{
unsigned char* screendata;
int y;
int indent;
TXT_Fullscreen(txt_fullscreen);
// Set up text mode screen
TXT_Init();
TXT_SetWindowTitle("Raptor");
// SDL2-TODO I_InitWindowTitle();
// SDL2-TODO I_InitWindowIcon();
// Write the data to the screen memory
screendata = TXT_GetScreenData();
indent = (LASTSCR_W - TXT_SCREEN_W) / 2;
for (y = 0; y < TXT_SCREEN_H; ++y)
{
memcpy(screendata + (y * TXT_SCREEN_W * 2),
mem + (y * LASTSCR_W + indent) * 2,
TXT_SCREEN_W * 2);
}
// Wait for a keypress
IMS_StartAck();
I_Settextmode(true);
while (true)
{
TXT_UpdateScreen();
I_GetEvent();
if (joy_ack || kbd_ack || mouse_b1_ack || mouse_b2_ack || mouse_b3_ack)
break;
TXT_Sleep(0);
}
// Shut down text mode screen
TXT_Shutdown();
}