// Export: void AboutOpera::generateData( URL& url ) { writePreamble( url ); // <html><body> surplus // <require> each of these should close exactly the HTML tags it opens: writeVersion( url ); writeUA( url ); writeRegInfo( url ); writePaths( url ); writeSound( url ); writeCredits( url ); // </require> url.WriteDocumentData(UNI_L("\n\n <address>")); #ifdef GEIR_MEMORIAL OP_STATUS rc; OpString span; TRAP(rc, g_languageManager->GetStringL(Str::S_DEDICATED_TO, span)); if (OpStatus::IsSuccess(rc)) { url.WriteDocumentData(UNI_L("<span>")); // In memory of Geir Ivarsøy. url.WriteDocumentData(span); url.WriteDocumentData(UNI_L("</span> ")); } #endif outASCII(url, "Copyright © 1995-"); outASCII(url, __DATE__ + 7); // "Mmm dd Year" + 7 == "Year" outASCII(url, " Opera Software ASA.\n" "All rights reserved.</address>\n" "</body>\n</html>\n"); url.WriteDocumentDataFinished(); }
void screen_credits () { if ( DEV > 1 ) return; music_stop(); displayOff(0); resetScreen(); VDP_setTextPalette ( PAL0 ); prepareColor ( 1, 0xfff ); prepareColor ( 2, 0x444 ); prepareColor ( 17, font_palette.data [ 7 ] ); prepareColor ( 18, font_palette.data [ 8 ] ); prepareColor ( 33, 0xfff ); prepareColor ( 34, 0x444 ); writeCredits ( 1, 4 ); writeCredits ( 2, 4 ); writeCredits ( 3, 9 ); //waitSc(2); }
void multAllCredits(float factor) { for(int i=0;i<nEntFiles;i++) { if(!quiet) printf("Multiplying credits of %s by %.3f\n",entFileNames[i],factor); writeCredits(i,max(0,(int)(readCredits(i)*factor))); } }
void addAllCredits(int credits) { for(int i=0;i<nEntFiles;i++) { if(!quiet) printf("Adding %d credits to %s\n",credits,entFileNames[i]); writeCredits(i,max(0,readCredits(i)+credits)); } }
void setAllCredits(int credits) { for(int i=0;i<nEntFiles;i++) { if(!quiet) printf("Setting %d credits to %s\n",credits,entFileNames[i]); writeCredits(i,max(0,credits)); } }
void tryWrite() { QPointer<QObject> self = this; if(state == Connected || state == ConnectedPeerClosed) { int written = 0; int contentBytesWritten = 0; while(!outFrames.isEmpty() && outCredits >= outFrames.first().data.size()) { // if we have data to send, and the credits to do so, then send data. // also send credits if we need to. Frame f = outFrames.takeFirst(); outCredits -= f.data.size(); int credits = -1; if(state != ConnectedPeerClosed && pendingInCredits > 0) { credits = pendingInCredits; pendingInCredits = 0; } writeFrameInternal(f, credits); ++written; contentBytesWritten += f.data.size(); } if(written > 0) { emit q->framesWritten(written, contentBytesWritten); if(!self) return; } if(outFrames.isEmpty() && outClosed) { writeClose(closeCode); if(state == ConnectedPeerClosed) { // if peer was already closed, then we're done! state = Idle; cleanup(); emit q->closed(); } else { // if peer was not closed, then we wait around state = ClosedPeerConnected; } } } // if we didn't send credits in a data packet, then do them now if(state != ConnectedPeerClosed && pendingInCredits > 0) { int credits = pendingInCredits; pendingInCredits = 0; writeCredits(credits); } }