Menu-FN/FS: Only parse sprays from logos/, not root of mod-dir

anymore. Users with giant BMP screenshots will rejoice
This commit is contained in:
Marco Cawthorne 2021-08-29 09:53:36 +02:00
parent 34505bcacf
commit 42b1abf668
7 changed files with 18 additions and 10 deletions

View File

@ -2,7 +2,6 @@ FTEMANIFEST 1
GAME base
NAME "Nuclide"
BASEGAME platform
BASEGAME logos
BASEGAME base
// you don't really want to change these

View File

@ -76,10 +76,7 @@ else
cp "./platform/menu.dat" "./$BUILD_DIR/platform/menu.dat"
rm "./$BUILD_DIR/platform/test_maps.pk3"
# spray logos
mkdir -p ./$BUILD_DIR/logos
cp ./logos/README ./$BUILD_DIR/logos/README
cp ./logos/fte.png ./$BUILD_DIR/logos/fte.png
# manifest
cp ./default.fmf ./$BUILD_DIR/default.fmf
sed -i "s|base|$GAME_DIR|g" ./$BUILD_DIR/default.fmf
cp ./doc/release-readme ./$BUILD_DIR/README.txt

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -61,6 +61,7 @@ class CBaseEntity
virtual void(void) Respawn;
virtual void(void) Hide;
virtual void(void) ParentUpdate;
virtual void(void) EvaluateEntity;
virtual float(entity, float) SendEntity;
virtual void(void) Pain;
virtual void(void) Death;

View File

@ -563,9 +563,8 @@ CBaseEntity::Death(void)
}
/* Make sure StartFrame calls this */
void
CBaseEntity::ParentUpdate(void)
CBaseEntity::EvaluateEntity(void)
{
/* while the engine is still handling physics for these, we can't
* predict when origin/angle might change */
@ -585,6 +584,13 @@ CBaseEntity::ParentUpdate(void)
net_velocity = velocity;
SendFlags |= BASEFL_CHANGED_VELOCITY;
}
}
/* Make sure StartFrame calls this */
void
CBaseEntity::ParentUpdate(void)
{
EvaluateEntity();
frame1time += frametime;

View File

@ -177,12 +177,15 @@ menu_customize_init(void)
g_sprayscount = 0;
/* scan and cache the sprays */
searchhandle searchy = search_begin("*.*", SEARCH_NAMESORT, TRUE);
searchhandle searchy = search_begin("logos/*.*", SEARCH_NAMESORT, TRUE);
for (int i = 0; i < search_getsize(searchy); i++) {
string full = search_getfilename(searchy, i);
string filename = substring(search_getfilename(searchy, i), 0, -5);
string extension = substring(full, strlen(full) - 3, 3);
if (extension == "bmp" || extension == "png" || extension == "jpg") {
print(full);
print("\n");
/*if (extension == "bmp" || extension == "png" || extension == "jpg")*/ {
g_sprayscount++;
}
}
@ -194,8 +197,10 @@ menu_customize_init(void)
string full = search_getfilename(searchy, i);
string filename = substring(full, 0, -5);
string extension = substring(full, strlen(full) - 3, 3);
print(full);
print("\n");
if (extension == "bmp" || extension == "png" || extension == "jpg") {
/*if (extension == "bmp" || extension == "png" || extension == "jpg")*/ {
g_sprays[sid] = precache_pic(full);
sid++;
}