Adds UTF-8 BOM to all C++ files.

This commit is contained in:
2023-04-21 22:45:16 -07:00
parent 4b4fda698f
commit e466196c1a
47 changed files with 58 additions and 111 deletions

View File

@@ -1,4 +1,4 @@
#include "Abilities.h"
#include "Abilities.h"
#include <iostream>
#include <string>

View File

@@ -1,4 +1,4 @@
#ifndef ABILITIES_H__
#ifndef ABILITIES_H__
#define ABILITIES_H__
/***************************************************************************************
* @file Abilities.h

View File

@@ -1,4 +1,4 @@
#include "Abilities.h"
#include "Abilities.h"
#include <iostream>
#include <sstream>

View File

@@ -1,4 +1,4 @@
#include "Archetypes.h"
#include "Archetypes.h"
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#ifndef ARCHETYPES_H__
#ifndef ARCHETYPES_H__
#define ARCHETYPES_H__
/***************************************************************************************
* @file Archetypes.h

View File

@@ -1,4 +1,4 @@
#include "Archetypes.h"
#include "Archetypes.h"
#include <iostream>
#include <sstream>

View File

@@ -1,4 +1,4 @@
#include "Attributes.h"
#include "Attributes.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#ifndef ATTRIBUTES_H__
#ifndef ATTRIBUTES_H__
#define ATTRIBUTES_H__
/***************************************************************************************
* @file Attributes.h

View File

@@ -1,4 +1,4 @@
#include "Attributes.h"
#include "Attributes.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#include "Backgrounds.h"
#include "Backgrounds.h"
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#ifndef BACKGROUNDS_H__
#ifndef BACKGROUNDS_H__
#define BACKGROUNDS_H__
/***************************************************************************************
* @file Backgrounds.h

View File

@@ -1,4 +1,4 @@
#include "Backgrounds.h"
#include "Backgrounds.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#include "Character.h"
#include "Character.h"
namespace SBF {

View File

@@ -1,4 +1,4 @@
#ifndef CHARACTER_H__
#ifndef CHARACTER_H__
#define CHARACTER_H__
/***************************************************************************************
* @file Character.h

View File

@@ -1,4 +1,4 @@
#include "Character.h"
#include "Character.h"
#include "test.h"
using namespace SBF;

View File

@@ -1,4 +1,4 @@
#include "Clans.h"
#include "Clans.h"
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#ifndef CLANS_H__
#ifndef CLANS_H__
#define CLANS_H__
/***************************************************************************************
* @file Clans.h

View File

@@ -1,4 +1,4 @@
#include "Clans.h"
#include "Clans.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#include "Colors.h"
#include "Colors.h"
namespace SBF {

View File

@@ -1,4 +1,4 @@
#ifndef COLORS_H__
#ifndef COLORS_H__
#define COLORS_H__
/***************************************************************************************
* @file Colors.h

View File

@@ -1,4 +1,4 @@
#include "Colors.h"
#include "Colors.h"
#include <string>
#include <tuple>

View File

@@ -1,4 +1,4 @@
#include "Derangements.h"
#include "Derangements.h"
#include <ostream>
#include <sstream>

View File

@@ -1,4 +1,4 @@
#ifndef DERANGEMENTS_H__
#ifndef DERANGEMENTS_H__
#define DERANGEMENTS_H__
#include "Colors.h"
/***************************************************************************************

View File

@@ -1,4 +1,4 @@
#include "Derangements.h"
#include "Derangements.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#include "Disciplines.h"
#include "Disciplines.h"
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#ifndef DISCIPLINES_H__
#ifndef DISCIPLINES_H__
#define DISCIPLINES_H__
/***************************************************************************************
* @file Disciplines.h

View File

@@ -1,4 +1,4 @@
#include "Disciplines.h"
#include "Disciplines.h"
#include <sstream>
#include <string>

View File

0
sbf-cpp/Freebies.cpp Normal file
View File

15
sbf-cpp/Freebies.h Normal file
View File

@@ -0,0 +1,15 @@
#ifndef FREEBIES_H__
#define FREEBIES_H__
#include <string>
namespace SBF {
struct FreebieType {
int id;
int cost;
std::string name;
std::string label;
};
} // End namespace SBF
#endif

View File

@@ -1,4 +1,4 @@
#include "Genders.h"
#include "Genders.h"
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#ifndef GENDERS_H__
#ifndef GENDERS_H__
#define GENDERS_H__
/***************************************************************************************
* @file Genders.h

View File

@@ -1,4 +1,4 @@
#include "Genders.h"
#include "Genders.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#include "Menus.h"
#include "Menus.h"
namespace SBF {

View File

@@ -1,4 +1,4 @@
#ifndef MENUS_H__
#ifndef MENUS_H__
#define MENUS_H__
/***************************************************************************************

View File

@@ -1,4 +1,4 @@
#include "Ranks.h"
#include "Ranks.h"
#include <ostream>
#include <string>

View File

@@ -1,4 +1,4 @@
#ifndef RANKS_H__
#ifndef RANKS_H__
#define RANKS_H__
/***************************************************************************************
* @file Ranks.h

View File

@@ -1,4 +1,4 @@
#include "Ranks.h"
#include "Ranks.h"
#include <sstream>
#include <string>

View File

@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#include "Utils.h"
#include <cstdint>

View File

@@ -1,4 +1,4 @@
#ifndef UTILS_H__
#ifndef UTILS_H__
#define UTILS_H__
/***************************************************************************************
* @file Utils.h

View File

@@ -1,4 +1,4 @@
#include "Utils.h"
#include "Utils.h"
#include <string>
#include <tuple>

View File

@@ -1,4 +1,4 @@
#include "Virtues.h"
#include "Virtues.h"
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
#ifndef VIRTUES_H__
#ifndef VIRTUES_H__
#define VIRTUES_H__
/***************************************************************************************
* @file Virtues.h

View File

@@ -1,4 +1,4 @@
#include "Virtues.h"
#include "Virtues.h"
#include <string>
#include <tuple>

View File

@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED
#include <ncursesw/curses.h>
#include <cstdio>

View File

@@ -1,4 +1,4 @@
#ifndef MAIN_H__
#ifndef MAIN_H__
#define MAIN_H__
/***************************************************************************************

View File

@@ -1,8 +1,6 @@
#define _XOPEN_SOURCE_EXTENDED
#include "sbf.h"
#include <ncursesw/curses.h>
#include <cstdio>
#include <iostream>
#include <string>
@@ -11,73 +9,7 @@
using namespace std;
/*
| ╔ | WACS_D_ULCORNER | WACS_BDDB |
| ╚ | WACS_D_LLCORNER | WACS_DDBB |
| ╗ | WACS_D_URCORNER | WACS_BBDD |
| ╝ | WACS_D_LRCORNER | WACS_DBBD |
| ╣ | WACS_D_RTEE | WACS_DBDD |
| ╠ | WACS_D_LTEE | WACS_DDDB |
| ╩ | WACS_D_BTEE | WACS_DDBD |
| ╦ | WACS_D_TTEE | WACS_BDDD |
| ═ | WACS_D_HLINE | WACS_BDBD |
| ║ | WACS_D_VLINE | WACS_DBDB |
| ╬ | WACS_D_PLUS | WACS_DDDD |
*/
int set_double_border(WINDOW* screen) {
return wborder_set(screen,
WACS_D_VLINE /*left side*/,
WACS_D_VLINE /*right side*/,
WACS_D_HLINE /*top side*/,
WACS_D_HLINE /*bottom side*/,
WACS_D_ULCORNER /*top left corner*/,
WACS_D_URCORNER /*top right corner*/,
WACS_D_LLCORNER /*bottom left corner*/,
WACS_D_LRCORNER /*bottom right corner*/);
}
int main(int argc, char* argv[]) {
setlocale(LC_ALL, "");
char buffer[255] = {0};
WINDOW* pWindow = nullptr;
// Load ncurses and initialize stdscr.
initscr();
pWindow = stdscr;
// Enable raw mode to give us direct access to extra keys.
raw();
// Disable echoing characters as they are typed.
noecho();
// Enable keypad characters. (function keys, arrow keys, and numpad keys.)
keypad(pWindow, true);
// Remove the delay when pressing esc.
set_escdelay(0);
int key = KEY_RESIZE;
while (key != KEY_ESCAPE) {
if (key == KEY_RESIZE) {
// Clear the screen.
werase(pWindow);
// Draw a box around the window with default chars.
set_double_border(pWindow);
// Display the event
mvwaddstr(pWindow, 2, 2, "Resized");
// Get the window width and height.
int width;
int height;
getmaxyx(pWindow, height, width);
// Display the width and height.
snprintf(buffer, sizeof(buffer), "width: %i, height: %i", width, height);
mvwaddstr(pWindow, 1, 2, buffer);
} else {
// Display the keycode of the key that was pressed in hex and octal.
snprintf(buffer, sizeof(buffer), "0x%04X %04o pressed", key, key);
mvwaddstr(pWindow, 2, 2, buffer);
}
wrefresh(pWindow);
key = wgetch(pWindow);
}
endwin();
return 0;
}