Afforess
The White Wizard
I'm trying to turn the larger radius cities code that a modder for RoM made into a game option, but the Globals.cpp refuses to cooperate, despite by best efforts. Here's the section I'm changing.
Normal BTS Code:
My Code:
Needless to say, I'm getting compiler errors, and I'm not sure what else to do...
Normal BTS Code:
Spoiler :
Code:
int aiCityPlotX[NUM_CITY_PLOTS] =
{
0,
0, 1, 1, 1, 0,-1,-1,-1,
0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2,-1,
};
int aiCityPlotY[NUM_CITY_PLOTS] =
{
0,
1, 1, 0,-1,-1,-1, 0, 1,
2, 2, 1, 0,-1,-2,-2,-2,-1, 0, 1, 2,
};
int aiCityPlotPriority[NUM_CITY_PLOTS] =
{
0,
1, 2, 1, 2, 1, 2, 1, 2,
3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 4,
};
int aaiXYCityPlot[CITY_PLOTS_DIAMETER][CITY_PLOTS_DIAMETER] =
{
{-1, 17, 18, 19, -1,},
{16, 6, 7, 8, 20,},
{15, 5, 0, 1, 9,},
{14, 4, 3, 2, 10,},
{-1, 13, 12, 11, -1,}
};
My Code:
Spoiler :
Code:
if (GC.getGameINLINE().isOption(GAMEOPTION_LARGER_CITIES))
{
int aiCityPlotX[NUM_CITY_PLOTS] =
{
0,
0, 1, 1, 1, 0,-1,-1,-1,
0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2,-1,
/*************************************************************************************************/
/** JOOYO_ADDON, Added by Jooyo, 06/17/09 */
/** */
/** */
/*************************************************************************************************/
0, 1, 2, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -2, -1,
/*************************************************************************************************/
/** JOOYO_ADDON END */
/*************************************************************************************************/
}'
}
else
{
int aiCityPlotX[NUM_CITY_PLOTS] =
{
0,
0, 1, 1, 1, 0,-1,-1,-1,
0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2,-1,
};
}
if (GC.getGameINLINE().isOption(GAMEOPTION_LARGER_CITIES))
{
int aiCityPlotY[NUM_CITY_PLOTS] =
{
0,
1, 1, 0,-1,-1,-1, 0, 1,
2, 2, 1, 0,-1,-2,-2,-2,-1, 0, 1, 2,
/*************************************************************************************************/
/** JOOYO_ADDON, Added by Jooyo, 06/17/09 */
/** */
/** */
/*************************************************************************************************/
3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -2, -1, 0, 1, 2, 3,
/*************************************************************************************************/
/** JOOYO_ADDON END */
/*************************************************************************************************/
};
}
else
{
int aiCityPlotY[NUM_CITY_PLOTS] =
{
0,
1, 1, 0,-1,-1,-1, 0, 1,
2, 2, 1, 0,-1,-2,-2,-2,-1, 0, 1, 2,
};
}
if (GC.getGameINLINE().isOption(GAMEOPTION_LARGER_CITIES))
{
int aiCityPlotPriority[NUM_CITY_PLOTS] =
{
0,
1, 2, 1, 2, 1, 2, 1, 2,
3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 4,
/*************************************************************************************************/
/** JOOYO_ADDON, Added by Jooyo, 06/17/09 */
/** */
/** */
/*************************************************************************************************/
5, 6, 7, 6, 5, 6, 7, 6, 5, 6, 7, 6, 5, 6, 7, 6,
/*************************************************************************************************/
/** JOOYO_ADDON END */
/*************************************************************************************************/
};
}
else
{
int aiCityPlotPriority[NUM_CITY_PLOTS] =
{
0,
1, 2, 1, 2, 1, 2, 1, 2,
3, 4, 4, 3, 4, 4, 3, 4, 4, 3, 4, 4,
};
}
if (GC.getGameINLINE().isOption(GAMEOPTION_LARGER_CITIES))
{
int aaiXYCityPlot[CITY_PLOTS_DIAMETER][CITY_PLOTS_DIAMETER] =
{
/*************************************************************************************************/
/** JOOYO_ADDON, Added by Jooyo, 06/17/09 */
/** */
/** */
/*************************************************************************************************/
{-1, -1, 32, 33, 34, -1, -1},
{-1, 31, 17, 18, 19, 35, -1},
{30, 16, 6, 7, 8, 20, 36},
{29, 15, 5, 0, 1, 9, 21},
{28, 14, 4, 3, 2, 10, 22},
{-1, 27, 13, 12, 11, 23, -1},
{-1, -1, 26, 25, 24, -1, -1},
/*************************************************************************************************/
/** JOOYO_ADDON END */
/*************************************************************************************************/
};
}
else
{
int aaiXYCityPlot[CITY_PLOTS_DIAMETER][CITY_PLOTS_DIAMETER] =
{
{-1, 17, 18, 19, -1,},
{16, 6, 7, 8, 20,},
{15, 5, 0, 1, 9,},
{14, 4, 3, 2, 10,},
{-1, 13, 12, 11, -1,}
};
}
Needless to say, I'm getting compiler errors, and I'm not sure what else to do...
Spoiler :
CvGlobals.cpp
CvGlobals.cpp(545) : error C2065: 'aiCityPlotX' : undeclared identifier
CvGlobals.cpp(545) : error C2070: ''unknown-type'': illegal sizeof operand
CvGlobals.cpp(545) : error C3861: 'aiCityPlotX': identifier not found, even with argument-dependent lookup
CvGlobals.cpp(546) : error C2065: 'aiCityPlotY' : undeclared identifier
CvGlobals.cpp(546) : error C2070: ''unknown-type'': illegal sizeof operand
CvGlobals.cpp(546) : error C3861: 'aiCityPlotY': identifier not found, even with argument-dependent lookup
CvGlobals.cpp(547) : error C2065: 'aiCityPlotPriority' : undeclared identifier
CvGlobals.cpp(547) : error C2070: ''unknown-type'': illegal sizeof operand
CvGlobals.cpp(547) : error C3861: 'aiCityPlotPriority': identifier not found, even with argument-dependent lookup
CvGlobals.cpp(550) : error C2065: 'aaiXYCityPlot' : undeclared identifier