2727
2828#include "Rogue.h"
2929
30- tcell tmap [DCOLS ][DROWS ]; // grids with info about the map
30+ tcell tmap [DCOLS ][DROWS ]; // grids with info about the map
3131pcell pmap [DCOLS ][DROWS ];
3232short * * scentMap ;
33- cellDisplayBuffer displayBuffer [COLS ][ROWS ]; // used to optimize plotCharWithColor
33+ cellDisplayBuffer displayBuffer [COLS ][ROWS ]; // used to optimize plotCharWithColor
3434short terrainRandomValues [DCOLS ][DROWS ][8 ];
35- short * * safetyMap ; // used to help monsters flee
36- short * * allySafetyMap ; // used to help allies flee
37- short * * chokeMap ; // used to assess the importance of the map's various chokepoints
38- const short nbDirs [8 ][2 ] = {{0 ,-1 }, {0 ,1 }, {-1 ,0 }, {1 ,0 }, {-1 ,-1 }, {-1 ,1 }, {1 ,-1 }, {1 ,1 }};
35+ short * * safetyMap ; // used to help monsters flee
36+ short * * allySafetyMap ; // used to help allies flee
37+ short * * chokeMap ; // used to assess the importance of the map's various chokepoints
38+ const short nbDirs [8 ][2 ] = {{0 , -1 }, {0 , 1 }, {-1 , 0 }, {1 , 0 }, {-1 , -1 }, {-1 , 1 }, {1 , -1 }, {1 , 1 }};
3939const short cDirs [8 ][2 ] = {{0 , 1 }, {1 , 1 }, {1 , 0 }, {1 , -1 }, {0 , -1 }, {-1 , -1 }, {-1 , 0 }, {-1 , 1 }};
4040short numberOfWaypoints ;
4141levelData * levels ;
@@ -50,15 +50,16 @@ item *floorItems;
5050item * packItems ;
5151item * monsterItemsHopper ;
5252
53- char displayedMessage [MESSAGE_LINES ][COLS * 2 ];
53+ char displayedMessage [MESSAGE_LINES ][COLS * 2 ];
5454short messagesUnconfirmed ;
5555char combatText [COLS * 2 ];
5656short messageArchivePosition ;
5757archivedMessage messageArchive [MESSAGE_ARCHIVE_ENTRIES ];
5858
5959char currentFilePath [BROGUE_FILENAME_MAX ];
6060
61- char displayDetail [DCOLS ][DROWS ]; // used to make certain per-cell data accessible to external code (e.g. terminal adaptations)
61+ char displayDetail [DCOLS ]
62+ [DROWS ]; // used to make certain per-cell data accessible to external code (e.g. terminal adaptations)
6263
6364#ifdef AUDIT_RNG
6465FILE * RNGLogFile ;
@@ -71,53 +72,58 @@ unsigned long positionInPlaybackFile;
7172unsigned long lengthOfPlaybackFile ;
7273unsigned long recordingLocation ;
7374unsigned long maxLevelChanges ;
74- char annotationPathname [BROGUE_FILENAME_MAX ]; // pathname of annotation file
75+ char annotationPathname [BROGUE_FILENAME_MAX ]; // pathname of annotation file
7576uint64_t previousGameSeed ;
7677
77- const windowpos WINDOW_POSITION_DUNGEON_TOP_LEFT = { STAT_BAR_WIDTH + 3 , MESSAGE_LINES + 2 };
78+ const windowpos WINDOW_POSITION_DUNGEON_TOP_LEFT = {STAT_BAR_WIDTH + 3 , MESSAGE_LINES + 2 };
7879
7980// Red Green Blue RedRand GreenRand BlueRand Rand Dances?
8081// basic colors
81- const color white = {100 , 100 , 100 , 0 , 0 , 0 , 0 , false};
82- const color gray = {50 , 50 , 50 , 0 , 0 , 0 , 0 , false};
83- const color darkGray = {30 , 30 , 30 , 0 , 0 , 0 , 0 , false};
84- const color veryDarkGray = {15 , 15 , 15 , 0 , 0 , 0 , 0 , false};
85- const color black = {0 , 0 , 0 , 0 , 0 , 0 , 0 , false};
86- const color yellow = {100 , 100 , 0 , 0 , 0 , 0 , 0 , false};
87- const color darkYellow = {50 , 50 , 0 , 0 , 0 , 0 , 0 , false};
88- const color teal = {30 , 100 , 100 , 0 , 0 , 0 , 0 , false};
89- const color purple = {100 , 0 , 100 , 0 , 0 , 0 , 0 , false};
90- const color darkPurple = {50 , 0 , 50 , 0 , 0 , 0 , 0 , false};
91- const color brown = {60 , 40 , 0 , 0 , 0 , 0 , 0 , false};
92- const color green = {0 , 100 , 0 , 0 , 0 , 0 , 0 , false};
93- const color darkGreen = {0 , 50 , 0 , 0 , 0 , 0 , 0 , false};
94- const color orange = {100 , 50 , 0 , 0 , 0 , 0 , 0 , false};
95- const color darkOrange = {50 , 25 , 0 , 0 , 0 , 0 , 0 , false};
96- const color blue = {0 , 0 , 100 , 0 , 0 , 0 , 0 , false};
97- const color darkBlue = {0 , 0 , 50 , 0 , 0 , 0 , 0 , false};
98- const color darkTurquoise = {0 , 40 , 65 , 0 , 0 , 0 , 0 , false};
99- const color lightBlue = {40 , 40 , 100 , 0 , 0 , 0 , 0 , false};
100- const color pink = {100 , 60 , 66 , 0 , 0 , 0 , 0 , false};
101- const color darkPink = {50 , 30 , 33 , 0 , 0 , 0 , 0 , false};
102- const color red = {100 , 0 , 0 , 0 , 0 , 0 , 0 , false};
103- const color darkRed = {50 , 0 , 0 , 0 , 0 , 0 , 0 , false};
104- const color tanColor = {80 , 67 , 15 , 0 , 0 , 0 , 0 , false};
82+ const color white = {100 , 100 , 100 , 0 , 0 , 0 , 0 , false};
83+ const color gray = {50 , 50 , 50 , 0 , 0 , 0 , 0 , false};
84+ const color darkGray = {30 , 30 , 30 , 0 , 0 , 0 , 0 , false};
85+ const color veryDarkGray = {15 , 15 , 15 , 0 , 0 , 0 , 0 , false};
86+ const color black = {0 , 0 , 0 , 0 , 0 , 0 , 0 , false};
87+ const color yellow = {100 , 100 , 0 , 0 , 0 , 0 , 0 , false};
88+ const color darkYellow = {50 , 50 , 0 , 0 , 0 , 0 , 0 , false};
89+ const color teal = {30 , 100 , 100 , 0 , 0 , 0 , 0 , false};
90+ const color purple = {100 , 0 , 100 , 0 , 0 , 0 , 0 , false};
91+ const color darkPurple = {50 , 0 , 50 , 0 , 0 , 0 , 0 , false};
92+ const color brown = {60 , 40 , 0 , 0 , 0 , 0 , 0 , false};
93+ const color green = {0 , 100 , 0 , 0 , 0 , 0 , 0 , false};
94+ const color darkGreen = {0 , 50 , 0 , 0 , 0 , 0 , 0 , false};
95+ const color orange = {100 , 50 , 0 , 0 , 0 , 0 , 0 , false};
96+ const color darkOrange = {50 , 25 , 0 , 0 , 0 , 0 , 0 , false};
97+ const color blue = {0 , 0 , 100 , 0 , 0 , 0 , 0 , false};
98+ const color darkBlue = {0 , 0 , 50 , 0 , 0 , 0 , 0 , false};
99+ const color darkTurquoise = {0 , 40 , 65 , 0 , 0 , 0 , 0 , false};
100+ const color lightBlue = {40 , 40 , 100 , 0 , 0 , 0 , 0 , false};
101+ const color pink = {100 , 60 , 66 , 0 , 0 , 0 , 0 , false};
102+ const color darkPink = {50 , 30 , 33 , 0 , 0 , 0 , 0 , false};
103+ const color red = {100 , 0 , 0 , 0 , 0 , 0 , 0 , false};
104+ const color darkRed = {50 , 0 , 0 , 0 , 0 , 0 , 0 , false};
105+ const color tanColor = {80 , 67 , 15 , 0 , 0 , 0 , 0 , false};
105106
106107// tile colors
107- const color rainbow = {-70 , -70 , -70 , 170 , 170 , 170 , 0 , true};
108+ const color rainbow = {-70 , -70 , -70 , 170 , 170 , 170 , 0 , true};
108109
109110// charm constants
110111const fixpt POW_0_CHARM_INCREMENT [] = { // 1.0
111- 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 ,
112- 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 ,
113- 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 };
112+ 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 ,
113+ 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 ,
114+ 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 ,
115+ 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 , 65536 };
114116const fixpt POW_120_CHARM_INCREMENT [] = { // 1.20^x fixed point, with x from 1 to 50 in increments of 1:
115- 78643 , 94371 , 113246 , 135895 , 163074 , 195689 , 234827 , 281792 , 338151 , 405781 , 486937 , 584325 , 701190 , 841428 , 1009714 , 1211657 ,
116- 1453988 , 1744786 , 2093744 , 2512492 , 3014991 , 3617989 , 4341587 , 5209905 , 6251886 , 7502263 , 9002716 , 10803259 , 12963911 , 15556694 ,
117- 18668032 , 22401639 , 26881967 , 32258360 , 38710033 , 46452039 , 55742447 , 66890937 , 80269124 , 96322949 , 115587539 , 138705047 , 166446056 ,
118- 199735268 , 239682321 , 287618785 , 345142543 , 414171051 , 497005262 , 596406314 , 715687577 };
117+ 78643 , 94371 , 113246 , 135895 , 163074 , 195689 , 234827 , 281792 , 338151 ,
118+ 405781 , 486937 , 584325 , 701190 , 841428 , 1009714 , 1211657 , 1453988 , 1744786 ,
119+ 2093744 , 2512492 , 3014991 , 3617989 , 4341587 , 5209905 , 6251886 , 7502263 , 9002716 ,
120+ 10803259 , 12963911 , 15556694 , 18668032 , 22401639 , 26881967 , 32258360 , 38710033 , 46452039 ,
121+ 55742447 , 66890937 , 80269124 , 96322949 , 115587539 , 138705047 , 166446056 , 199735268 , 239682321 ,
122+ 287618785 , 345142543 , 414171051 , 497005262 , 596406314 , 715687577 };
119123const fixpt POW_125_CHARM_INCREMENT [] = { // 1.25^x fixed point, with x from 1 to 50 in increments of 1:
120- 81920 , 102400 , 128000 , 160000 , 200000 , 250000 , 312500 , 390625 , 488281 , 610351 , 762939 , 953674 , 1192092 , 1490116 , 1862645 , 2328306 ,
121- 2910383 , 3637978 , 4547473 , 5684341 , 7105427 , 8881784 , 11102230 , 13877787 , 17347234 , 21684043 , 27105054 , 33881317 , 42351647 , 52939559 ,
122- 66174449 , 82718061 , 103397576 , 129246970 , 161558713 , 201948391 , 252435489 , 315544362 , 394430452 , 493038065 , 616297582 , 770371977 ,
123- 962964972 , 1203706215 , 1504632769 , 1880790961 , 2350988701 , 2938735877 , 3673419846 , 4591774807 , 5739718509 };
124+ 81920 , 102400 , 128000 , 160000 , 200000 , 250000 , 312500 , 390625 , 488281 ,
125+ 610351 , 762939 , 953674 , 1192092 , 1490116 , 1862645 , 2328306 , 2910383 , 3637978 ,
126+ 4547473 , 5684341 , 7105427 , 8881784 , 11102230 , 13877787 , 17347234 , 21684043 , 27105054 ,
127+ 33881317 , 42351647 , 52939559 , 66174449 , 82718061 , 103397576 , 129246970 , 161558713 , 201948391 ,
128+ 252435489 , 315544362 , 394430452 , 493038065 , 616297582 , 770371977 , 962964972 , 1203706215 , 1504632769 ,
129+ 1880790961 , 2350988701 , 2938735877 , 3673419846 , 4591774807 , 5739718509 };
0 commit comments