Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes to ini blockage and vent settings #2136

Merged
merged 6 commits into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions Source/smokeview/menus.c
Original file line number Diff line number Diff line change
Expand Up @@ -6320,9 +6320,17 @@ void ShowInternalBlockages(void){
solid_state=visBLOCKHide;
}
else{
visBlocks=visBLOCKNormal;
solid_state=visBLOCKNormal;
outline_state=OUTLINE_NONE;
if(update_showblock_ini == 1){
update_showblock_ini = 0;
visBlocks = visBlocks_ini;
solid_state = solid_state_ini;
outline_state = outline_state_ini;
}
else{
visBlocks = visBLOCKNormal;
solid_state = visBLOCKNormal;
outline_state = OUTLINE_NONE;
}
GeometryMenu(17 + TERRAIN_HIDDEN);
}
updatemenu = 1;
Expand Down Expand Up @@ -7652,8 +7660,13 @@ void GeometryMenu(int value){
global_scase.visTerrainType = value-17;
GLUIUpdateTerrain();
if(global_scase.visTerrainType == TERRAIN_HIDDEN){
if(global_scase.visOtherVents!=global_scase.visOtherVentsSAVE){
global_scase.visOtherVents=global_scase.visOtherVentsSAVE;
if(update_ini_vents == 0){
if(global_scase.visOtherVents != global_scase.visOtherVentsSAVE){
global_scase.visOtherVents = global_scase.visOtherVentsSAVE;
}
}
else{
update_ini_vents = 0;
}
}
else{
Expand Down
6 changes: 4 additions & 2 deletions Source/smokeview/readsmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -14206,7 +14206,8 @@ int ReadIni2(const char *inifile, int localfile){
}
if(MatchINI(buffer, "SHOWBLOCKS") == 1){
fgets(buffer, 255, stream);
sscanf(buffer, "%i ", &visBlocks);
sscanf(buffer, "%i %i %i", &visBlocks_ini, &solid_state_ini, &outline_state_ini);
update_showblock_ini = 1;
continue;
}
if(MatchINI(buffer, "SHOWSENSORS") == 1){
Expand Down Expand Up @@ -14622,6 +14623,7 @@ int ReadIni2(const char *inifile, int localfile){
if(MatchINI(buffer, "SHOWOTHERVENTS") == 1){
fgets(buffer, 255, stream);
sscanf(buffer, "%i", &global_scase.visOtherVents);
update_ini_vents = 1;
ONEORZERO(global_scase.visOtherVents);
continue;
}
Expand Down Expand Up @@ -17149,7 +17151,7 @@ void WriteIni(int flag,char *filename){
fprintf(fileout, "SHOWBLOCKLABEL\n");
fprintf(fileout, " %i\n", visMeshlabel);
fprintf(fileout, "SHOWBLOCKS\n");
fprintf(fileout, " %i\n", visBlocks);
fprintf(fileout, " %i %i %i\n", visBlocks, solid_state, outline_state);
fprintf(fileout, "SHOWBOUNDS\n");
fprintf(fileout, " %i %i\n", bounds_each_mesh, show_bound_diffs);
fprintf(fileout, "SHOWCADOPAQUE\n");
Expand Down
7 changes: 5 additions & 2 deletions Source/smokeview/smokeviewvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,6 @@ SVEXTERN int SVDECL(visMeshlabel, 1);
SVEXTERN int SVDECL(visOpenVents,1),SVDECL(visDummyVents,1),SVDECL(visCircularVents,VENT_CIRCLE);
SVEXTERN int SVDECL(visOpenVentsAsOutline,0);
SVEXTERN int SVDECL(visParticles,1), SVDECL(visZone,0);
SVEXTERN int visBlocks;

// need to clean up these variables
#ifdef pp_PATCH_HIDE
Expand All @@ -1576,7 +1575,10 @@ SVEXTERN int SVDECL(menu_hide_internal_blockages, 0);
SVEXTERN int SVDECL(hide_internal_blockages, 0);

SVEXTERN int SVDECL(outline_color_flag,0);
SVEXTERN int SVDECL(solid_state,-1),SVDECL(outline_state,-1);
SVEXTERN int visBlocks, SVDECL(solid_state,-1), SVDECL(outline_state,-1);
SVEXTERN int SVDECL(visBlocks_ini,-1), SVDECL(solid_state_ini, -1), SVDECL(outline_state_ini, -1);
SVEXTERN int SVDECL(update_showblock_ini, 0);

SVEXTERN int SVDECL(visTransparentBlockage,0);
SVEXTERN int SVDECL(blocklocation,BLOCKlocation_grid);
SVEXTERN int SVDECL(blocklocation_menu, BLOCKlocation_grid);
Expand All @@ -1586,6 +1588,7 @@ SVEXTERN int SVDECL(visWalls,0), SVDECL(visGrid,0), SVDECL(visCeiling,0);
SVEXTERN int SVDECL(visZonePlane,ZONE_YPLANE), SVDECL(viszonefire,1), SVDECL(visSZone,0);
SVEXTERN int SVDECL(visSensor,1), SVDECL(visSensorNorm,1), SVDECL(hasSensorNorm,0);
SVEXTERN int SVDECL(visVents, 1), SVDECL(visVentFlow, 1),SVDECL(visVentHFlow, 1),SVDECL(visVentVFlow, 1),SVDECL(visVentMFlow, 1);
SVEXTERN int SVDECL(update_ini_vents, 0);
SVEXTERN int SVDECL(viewoption,0);
SVEXTERN int SVDECL(clip_mode,CLIP_OFF),clip_mode_last;
SVEXTERN int clip_i,clip_j,clip_k;
Expand Down
Loading
Loading