• R/O
  • SSH
  • HTTPS

gd10: Commit


Commit MetaInfo

Revisão142 (tree)
Hora2019-08-20 01:58:48
Autorhgtterry

Mensagem de Log

Stock Sounds 190819

Mudança Sumário

Diff

--- Equity10/GD10_LookUps.cpp (revision 141)
+++ Equity10/GD10_LookUps.cpp (revision 142)
@@ -127,6 +127,26 @@
127127 }
128128
129129 // *************************************************************************
130+// * Stock_Sound_GetCount Terry Bernie *
131+// *************************************************************************
132+int GD10_LookUps::Stock_Sound_GetCount(void)
133+{
134+ int RealCount = 0;
135+ int Count = 0;
136+ int Total = App->GDCL_Scene_Data->Stock_Sound_Count;
137+
138+ while (Count < Total)
139+ {
140+ if (App->GDCL_Scene_Data->St_Sounds[Count]->Deleted == 0)
141+ {
142+ RealCount++;
143+ }
144+ Count++;
145+ }
146+ return RealCount;
147+}
148+
149+// *************************************************************************
130150 // * Check_Usage Terry *
131151 // *************************************************************************
132152 bool GD10_LookUps::Check_Usage(int Index)
--- Equity10/GD10_LookUps.h (revision 141)
+++ Equity10/GD10_LookUps.h (revision 142)
@@ -40,6 +40,7 @@
4040
4141 // Returns The real Count Minus Deleted Files
4242 int Player_Location_GetCount(void);
43+ int Stock_Sound_GetCount(void);
4344
4445 // Check if been used by another Object
4546 bool Check_Usage(int Index);
@@ -49,5 +50,6 @@
4950
5051 // Get Real Count - Deleted
5152 int Get_AdjustedCount(void);
53+
5254 };
5355
--- Equity10/GD_Save_Scene.cpp (revision 141)
+++ Equity10/GD_Save_Scene.cpp (revision 142)
@@ -207,8 +207,8 @@
207207 fclose(WriteScene);
208208
209209 Write_Player_Locations_New();
210+ Write_Stock_Sounds_New();
210211
211-
212212 SetWindowText(App->MainHwnd, App->CL10_File->Full_Path_And_File);
213213
214214 strcpy(App->GDCL_FileView->LevelName, App->GDCL_Scene_Data->S_Scene[0]->LevelName);
@@ -647,4 +647,83 @@
647647
648648 fclose(WriteScene);
649649 return 1;
650+}
651+
652+// *************************************************************************
653+// * Write_Player_Locations_New *
654+// *************************************************************************
655+bool GD_Save_Scene::Write_Stock_Sounds_New()
656+{
657+ float w = 0;
658+ float x = 0;
659+ float y = 0;
660+ float z = 0;
661+
662+ WriteScene = NULL;
663+
664+ // From Save Dialog
665+ char buff[1024];
666+ char Temp[1024];
667+
668+ // Change File to GPL
669+ strcpy(Temp, App->CL10_File->Full_Path_And_File);
670+ int len = strlen(Temp);
671+ Temp[len - 8] = 0;
672+ strcpy(buff, Temp);
673+ strcat(buff, ".gss");
674+ //----------------------------------
675+
676+ WriteScene = fopen(buff, "wt");
677+ if (!WriteScene)
678+ {
679+ App->Say("Cant Create Save File");
680+ return 0;
681+ }
682+
683+ fprintf(WriteScene, "%s\n", "[GDScene]");
684+ fprintf(WriteScene, "%s%s\n", "Version=", "4.0");
685+
686+ // Player
687+ fprintf(WriteScene, "%s\n", " ");
688+ fprintf(WriteScene, "%s\n", "[Sounds]");
689+
690+ int RealCount = App->CL10_LookUps->Stock_Sound_GetCount(); // Get The real Count Minus Deleted Files
691+
692+ fprintf(WriteScene, "%s%i\n", "Sounds_Count=", RealCount);
693+
694+ int Location = 0; // Correct for Deleted Files
695+ int Count = 0;
696+ while (Count < App->GDCL_Scene_Data->Stock_Sound_Count)
697+ {
698+ if (App->GDCL_Scene_Data->St_Sounds[Count]->Deleted == 0)
699+ {
700+ fprintf(WriteScene, "%s\n", " ");
701+
702+ char Cbuff[255];
703+ char buff[255];
704+ strcpy(buff, "[Sound_");
705+ itoa(Location, Cbuff, 10);
706+ strcat(buff, Cbuff);
707+ strcat(buff, "]");
708+ fprintf(WriteScene, "%s\n", buff);
709+
710+ fprintf(WriteScene, "%s%i\n", "Sound_ID=", App->GDCL_Scene_Data->St_Sounds[Count]->Sound_ID);
711+ fprintf(WriteScene, "%s%s\n", "Name=", App->GDCL_Scene_Data->St_Sounds[Count]->Name);
712+
713+ fprintf(WriteScene, "%s%s\n", "SoundFile=", App->GDCL_Scene_Data->St_Sounds[Count]->SoundFile);
714+ fprintf(WriteScene, "%s%f\n", "Volume=", App->GDCL_Scene_Data->St_Sounds[Count]->Volume);
715+
716+ Location++;
717+ }
718+
719+ Count++;
720+ }
721+
722+
723+ fprintf(WriteScene, "%s\n", " ");
724+ fprintf(WriteScene, "%s\n", "[Counters]");
725+ fprintf(WriteScene, "%s%i\n", "Location_ID_Counter=", App->GDCL_Scene_Data->StockSounds_ID_Counter);
726+
727+ fclose(WriteScene);
728+ return 1;
650729 }
\ No newline at end of file
--- Equity10/GD_Save_Scene.h (revision 141)
+++ Equity10/GD_Save_Scene.h (revision 142)
@@ -24,6 +24,8 @@
2424
2525 bool Write_NewScene();
2626
27+ bool Write_Stock_Sounds_New();
28+
2729 char SceneVersion[16];
2830
2931 FILE *WriteScene;
--- Equity10/GD_Stock.cpp (revision 141)
+++ Equity10/GD_Stock.cpp (revision 142)
@@ -286,11 +286,10 @@
286286 char buf[255];
287287 strcpy(buf,App->GDCL_Scene_Data->CL_Object[Index]->Name);
288288
289- char chr_Play[100];
289+ char chr_Volume[100];
290+ sprintf(chr_Volume,"%i",int(App->GDCL_Scene_Data->St_Sounds[Index]->Volume));
290291
291- sprintf(chr_Play,"%i ",App->GDCL_Scene_Data->St_Sounds[Index]->Play);
292-
293- const int NUM_ITEMS = 14;
292+ const int NUM_ITEMS = 3;
294293 const int NUM_COLS = 2;
295294 string grid[NUM_COLS][NUM_ITEMS]; // string table
296295 LV_ITEM pitem;
@@ -299,7 +298,7 @@
299298
300299 grid[0][0] = "Name", grid[1][0] = App->GDCL_Scene_Data->St_Sounds[Index]->Name;
301300 grid[0][1] = "Sound", grid[1][1] = App->GDCL_Scene_Data->St_Sounds[Index]->SoundFile;
302- grid[0][2] = "Play", grid[1][2] = chr_Play;
301+ grid[0][2] = "Volume", grid[1][2] = chr_Volume;
303302 grid[0][3] = " ", grid[1][3] = " ";//chr_TextColour;
304303 grid[0][4] = " ", grid[1][4] = " ";//chr_PosY;
305304 grid[0][5] = " ", grid[1][5] = " ";//chr_PosVert;
--- Equity10/VersionNo2.h (revision 141)
+++ Equity10/VersionNo2.h (revision 142)
@@ -39,21 +39,21 @@
3939 #ifndef _VERSIONNO__H_
4040 #define _VERSIONNO__H_
4141
42-#define VERSION_FULL 1.22.230.46
42+#define VERSION_FULL 1.22.230.50
4343
4444 #define VERSION_BASEYEAR 2019
4545 #define VERSION_DATE "2019-08-19"
46-#define VERSION_TIME "17:33:02"
46+#define VERSION_TIME "17:58:27"
4747
4848 #define VERSION_MAJOR 1
4949 #define VERSION_MINOR 22
5050 #define VERSION_BUILDNO 230
51-#define VERSION_EXTEND 46
51+#define VERSION_EXTEND 50
5252
53-#define VERSION_FILE 1,22,230,46
54-#define VERSION_PRODUCT 1,22,230,53
55-#define VERSION_FILESTR "1,22,230,46\0"
56-#define VERSION_PRODUCTSTR "1,22,230,53\0"
53+#define VERSION_FILE 1,22,230,50
54+#define VERSION_PRODUCT 1,22,230,57
55+#define VERSION_FILESTR "1,22,230,50\0"
56+#define VERSION_PRODUCTSTR "1,22,230,57\0"
5757 #define VERSION_EVERSION "0.3.4.0\0"
5858
5959 #endif
\ No newline at end of file
Show on old repository browser