~mjmendoza/quixie/trunk

« back to all changes in this revision

Viewing changes to src/core/kse_Main_Header_Engine.cpp

  • Committer: creek23
  • Date: 2018-06-24 21:04:24 UTC
  • Revision ID: svn-v4:5d579d6f-57a3-4165-9b1e-6dacaf8da75a:quixie:686
* separated trigger of Main on a thread
* added kse_gui.cpp for main screen
* fixed RGBA_R/G/B/A
* fixed unsigned long issue with ProcessScript_Statement_Define
* implemented a thread safe (pseudo) MessageBox
* initialized variables to avoid random script-parsing problem (somehow)
* "Common Gateway Interface"-related changes; didn't actually resumed work on this
* added gtk_main_quit on Engine_Exit
* implemented chrono sleep
* updated LICENSE info; still hoping for site's come-back :(

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
                        #ifdef QUIXIE_CGI
22
22
                                if (bHeaderOut == false) {
23
23
                                        bHeaderOut = true;
24
 
                                        KS_CGI_Out = KS_CGI_Out + "Server: KonsolScript/1.0 via Apache/2.2.x\r\n";
25
 
                                        KS_CGI_Out = KS_CGI_Out + "Content-type: text/html\r\n\r\n";
 
24
                                        KS_CGI_Out += "Server: KonsolScript/1.0 via Apache/2.2.x\r\n";
 
25
                                        KS_CGI_Out += "Content-type: text/html\r\n\r\n";
26
26
                                }
27
 
                                KS_CGI_Out = KS_CGI_Out + sMsg;
 
27
                                KS_CGI_Out += sMsg;
28
28
                        #else
29
 
                                cout << sMsg << endl;
 
29
                                std::cout << sMsg << std::endl;
30
30
                        #endif
31
31
                }
32
32
                
114
114
        #endif
115
115
        #ifdef QUIXIE_CGI
116
116
                Engine_EchoVars();
117
 
                Integer iLogfile = FreeFile;
118
 
                Open Cons For Output #iLogfile
119
 
                        Print #iLogfile, KS_CGI_Out
120
 
                Close #iLogfile
 
117
                std::cout << KS_CGI_Out;
121
118
        #endif
122
119
        if (fileExists(sKonsolPath + kseSLASH + kseLOG_FILE) == true) {
123
120
                if (sCleanUpLogFile == "1") {
128
125
                        }
129
126
                }
130
127
        }
131
 
        unsigned long i;
 
128
        unsigned long i = 0;
132
129
        //avoid memory from leaking
133
130
        #ifdef CLASS_IMAGE
134
131
                for (i = 0; i < kseImg.size() - 1; ++i) {
141
138
                        if (kseSnd[i].inUse) { UnloadSound(i); }
142
139
                }
143
140
        #endif
144
 
   
145
 
   #ifdef CLASS_ENTITY
 
141
        
 
142
        #ifdef CLASS_ENTITY
146
143
                //deallocate entity defines
147
144
                for (i = 0; i < iEntityCtr; ++i) {
148
145
                        if (kseEntity[i].bUsed == true) {
173
170
        
174
171
        //then continue to exit
175
172
        exit(0);
 
173
        gtk_main_quit();
176
174
}
177
175
 
178
176
void DumpScript() {