1
0

credits.cpp 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. /** (c) Nullsoft, Inc. C O N F I D E N T I A L
  2. ** Filename:
  3. ** Project:
  4. ** Description: Unused (left for reference)
  5. ** Author:
  6. ** Created:
  7. **/
  8. #include "main.h"
  9. #if 0
  10. #ifndef NETSCAPE
  11. #include <math.h>
  12. static void RenderInit(HWND hwnd);
  13. static void RenderQuit(HWND hwnd);
  14. static int RenderFrame(HWND hwnd);
  15. static int w_width, w_height,w_offs;
  16. static volatile int killsw;
  17. void About2_Kill()
  18. {
  19. killsw=1;
  20. }
  21. void About2_Start(HWND hwndParent)
  22. {
  23. RECT r;
  24. killsw=0;
  25. Sleep(100);
  26. GetWindowRect(hwndParent,&r);
  27. w_width =r.right-r.left;
  28. w_height=((r.bottom-r.top)); // *3/4
  29. w_offs=0;//((r.bottom-r.top)*1)/9;
  30. w_width += 3;
  31. w_width &= ~3;
  32. RenderInit(hwndParent);
  33. while (!killsw)
  34. {
  35. int rtime=GetTickCount();
  36. RenderFrame(hwndParent);
  37. rtime = GetTickCount()-rtime;
  38. if (rtime > 16) rtime=16;
  39. Sleep(16-rtime);
  40. }
  41. RenderQuit(hwndParent);
  42. }
  43. static HFONT hFont, hOldFont;
  44. static int th,linepos,fadepos,egg_pos;
  45. static HDC bm_hdc, egg_hdc;
  46. static HBITMAP bm_bitmap, bm_oldbm, egg_bm, egg_oldbm;
  47. static int egg_dobg=0, egg_hacko;
  48. static void RenderInit(HWND hwnd)
  49. {
  50. RECT r = {0,0,w_width,w_height+40};
  51. TEXTMETRIC tm;
  52. egg_dobg=0;
  53. egg_hacko=eggstat;
  54. if (egg_hacko) egg_oldbm=(HBITMAP)SelectObject(egg_hdc=CreateCompatibleDC(NULL),egg_bm=LoadBitmap(hMainInstance,MAKEINTRESOURCE(IDB_CAT)));
  55. bm_hdc=CreateCompatibleDC(egg_hacko?egg_hdc:NULL);
  56. bm_bitmap=CreateCompatibleBitmap(egg_hacko?egg_hdc:bm_hdc,r.right,r.bottom);
  57. bm_oldbm=(HBITMAP)SelectObject(bm_hdc,bm_bitmap);
  58. BitBlt(bm_hdc,0,0,r.right,r.bottom,bm_hdc,0,0,BLACKNESS);
  59. SetMapMode(bm_hdc,MM_TEXT);
  60. hFont=CreateFont(16,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,
  61. DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DRAFT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,"Times New Roman");
  62. hOldFont=(HFONT)SelectObject(bm_hdc,hFont);
  63. GetTextMetrics(bm_hdc,&tm);
  64. th=tm.tmHeight;
  65. if (th > 39) th = 39;
  66. SetTextColor(bm_hdc,RGB(255,255,255));
  67. SetBkColor(bm_hdc,RGB(0,0,0));
  68. linepos=6;
  69. fadepos=256;
  70. }
  71. static void RenderQuit(HWND hwnd)
  72. {
  73. SelectObject(bm_hdc,hOldFont);
  74. SelectObject(bm_hdc,bm_oldbm);
  75. DeleteObject(bm_bitmap);
  76. DeleteDC(bm_hdc);
  77. DeleteObject(hFont);
  78. if (egg_oldbm || egg_hdc)
  79. {
  80. SelectObject(egg_hdc,egg_oldbm);
  81. DeleteObject(egg_bm);
  82. DeleteDC(egg_hdc);
  83. egg_bm=NULL;
  84. egg_hdc=NULL;
  85. }
  86. }
  87. typedef struct
  88. {
  89. char *col1,*col2;
  90. } t_line;
  91. #define BLINE {"",}
  92. static t_line text_lines[] =
  93. {
  94. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  95. { APP_NAME " [tm]",},
  96. { "———————————————",},
  97. { "Copyright © 1997-2000 - Nullsoft",},
  98. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  99. {"CREDITS",},
  100. BLINE,
  101. {"Unit One",},
  102. {"——————",},
  103. {"PRODUCTION AND DESIGN","Justin Frankel"},
  104. BLINE,
  105. {"CREW","Tom Pepper"},
  106. {"","Robert Lord"},
  107. {"","Ian Rogers"},
  108. {"","Steve Gedikian"},
  109. {"","Brennan Underwood"},
  110. BLINE,
  111. {"MIKMOD PLUG-IN","Jake Stine"},
  112. BLINE,
  113. {"SPLASH SCREEN","Christian Lundquist"},
  114. BLINE,
  115. BLINE,BLINE,BLINE,BLINE,
  116. {"Unit Two",},
  117. {"——————",},
  118. {"STUNT COORDINATOR","Jean-Hugues Royer"},
  119. BLINE,
  120. {"STUNTS","Jay Downing"},
  121. {"","Tim Russell"},
  122. {"","Rob Markovic"},
  123. {"","Peter A. DeNitto"},
  124. {"","Colten Edwards"},
  125. {"","Mike Wickenden"},
  126. {"","Peter Hollandare"},
  127. {"","Nicholas Head"},
  128. {"","Craig Vallelunga"},
  129. {"","Jason Reimer"},
  130. {"","Kenric Tam"},
  131. BLINE,
  132. {"PUPPETEER","Rob 'Wonderful"},
  133. {""," Wawb' Bresner"},
  134. BLINE,
  135. {"ICON TRAINERS", "Torsten Daeges"},
  136. {"","Ben Lowery"},
  137. BLINE,
  138. {"LLAMA WRANGLER","Tom Pepper"},
  139. BLINE,
  140. {"ANIMAL TRAINER","Nova Hall"},
  141. BLINE,
  142. {"ASSISTANT TO FIFI","Robert Lord"},
  143. BLINE,
  144. {"WATCHING ANIME","Ted Cooper"},
  145. BLINE,
  146. {"NUDE SCENES","Charlie Hinz"},
  147. BLINE,
  148. {"KARATE SCENE","Dan Khamsing"},
  149. {"COORDINATORS","Thanh Tran"},
  150. BLINE,
  151. {"TOPLESS DANCER","Jenn Spencer"},
  152. BLINE,
  153. {"HAIR AND MAKEUP DESIGN","Brennan Underwood"},
  154. {"FOR MR. FRANKEL",""},
  155. BLINE,
  156. {"MYSTERY LADY","Al"},
  157. BLINE,
  158. {"COSTUME DESIGNER","Casey Scales"},
  159. BLINE,
  160. {"PRIME NUMBERS","Cap Petschulat"},
  161. BLINE,
  162. {"BIG BIZ EXPLOITER","Kenneth Chen"},
  163. BLINE,
  164. {"RESIDENT DENTIST","Meng"},
  165. BLINE,
  166. {"NITE FIEND","David Pui"},
  167. BLINE,
  168. {"PYROTECHNICS","Jaben Cargman"},
  169. BLINE,
  170. {"CATERING","Charles H. Frankel"},
  171. {"","Kathleen Blake-Frankel"},
  172. {"","Loretta Spinster"},
  173. BLINE,
  174. {"BEER","Peregrine Computing",},
  175. BLINE,
  176. {"ELEVATOR MUSIC","The Robies",},
  177. BLINE,
  178. {"GAFFER","Adara Frankel"},
  179. BLINE,
  180. {"BEST BOY","Paul Garcia"},
  181. BLINE,
  182. {"KEY GRIP","Josh Marso"},
  183. BLINE,
  184. {"GRIPS","Ryan Underwood"},
  185. {"","Alex Derbes"},
  186. {"","Mike Wickenden"},
  187. BLINE,
  188. {"OFTEN ANNOYING","Angelo Sotira"},
  189. {"PUBLIC MANIPULATION","Andrew Smith"},
  190. BLINE,
  191. {"CRASH TEST DUMMY","Alun Wile"},
  192. BLINE,
  193. {"GENETIC ENGINEERING","Jawed Karim"},
  194. BLINE,
  195. {"BREAST EXAMINER","Shaun Curtis"},
  196. BLINE,
  197. {"TRANSLATOR","Alix Reyes"},
  198. BLINE,
  199. {"WARFARE TECH","Thanh Tran"},
  200. BLINE,
  201. {"SHIPBUILDING", "Gary Calpo"},
  202. BLINE,
  203. {"BAD HUMOR","Adara Blake"},
  204. BLINE,
  205. {"ANAL PROBER","Dave \"Lestat\" Wile"},
  206. BLINE,
  207. {"CLEARANCES","Franc Zijderveld"},
  208. BLINE,
  209. {"JANITORS","Ian Lyman"},
  210. {"","Andrew McCann"},
  211. BLINE,
  212. {"PLASTERER","Dmitry Boldyrev"},
  213. BLINE,
  214. {"CARPENTRY","Marc Pirotte"},
  215. {"","Dána M. Epp"},
  216. {"","Graham Batty"},
  217. {"","John Stephens"},
  218. {"","Jon Lippincott"},
  219. {"","Doug Mealing"},
  220. {"","Jessica Wirna"},
  221. {"","Chris Fitzpatrick"},
  222. BLINE,
  223. {"EXTRAS","Bill Harper"},
  224. {"","Dana Dahlstrom"},
  225. {"","Allen Anderson"},
  226. {"","Diane Downard"},
  227. {"","Tima Kunayev"},
  228. BLINE,
  229. {"STAND-INS","Ryan Houle"},
  230. {"","Bryan Burton"},
  231. {"","Justin Derbes"},
  232. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  233. {"Special Thanks:",},
  234. BLINE,
  235. {"The City of Detroit, Michigan",},
  236. {"US Department of Justice",},
  237. {"Dallas Square-Dancing Hall of Fame",},
  238. {"Lighthouse Communications",},
  239. {"Samsung USA",},
  240. {"Phoenix International Raceway",},
  241. {"San Diego Zoo",},
  242. {"Audi America",},
  243. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  244. {"Filmed in Amazing Technicolor®",},
  245. BLINE,BLINE,
  246. {"Soundtrack available on Fuckit Records",},
  247. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  248. {"—————————————————",},
  249. {"No animals were harmed in the filming",},
  250. {"and/or production of this product",},
  251. {"—————————————————",},
  252. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  253. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  254. {"© MM Nullsoft Inc.",},
  255. {"http://www.nullsoft.com/",},
  256. BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,BLINE,
  257. {NULL,NULL}
  258. };
  259. static int RenderFrame(HWND hwnd)
  260. {
  261. static int y;
  262. if (fadepos < 256)
  263. {
  264. fadepos-=2;
  265. if (fadepos <= 0)
  266. {
  267. fadepos=256;
  268. y=0;
  269. BitBlt(bm_hdc,0,0,w_width,w_height+th+1,bm_hdc,
  270. 0,0,BLACKNESS);
  271. }
  272. }
  273. else if (!y)
  274. {
  275. RECT r={0,w_height,w_width,w_height+th};
  276. y=th;
  277. if (!text_lines[linepos].col1)
  278. {
  279. egg_pos=0;
  280. egg_dobg=0;
  281. linepos=0;
  282. fadepos=255;
  283. }
  284. else if (1)
  285. {
  286. if (egg_hacko) {
  287. int h=(th*80)/w_width,h2,h3;
  288. h2=h;
  289. if (h2+egg_pos >= 60)
  290. {
  291. h2=60-egg_pos;
  292. h-=h2;
  293. h3=(h2*w_width)/80;
  294. } else h=0;
  295. if (h2) StretchBlt(bm_hdc,0,w_height,w_width,th+1,egg_hdc, 0,egg_pos,80, h2, egg_dobg?SRCCOPY:BLACKNESS);
  296. egg_pos+=h2;
  297. if (egg_pos>=60) { egg_pos=0; egg_dobg=!egg_dobg; }
  298. if (h) StretchBlt(bm_hdc,0,w_height+h3,w_width,th+1,egg_hdc, 0,egg_pos,80, h, egg_dobg?SRCCOPY:BLACKNESS);
  299. egg_pos+=h;
  300. SetBkMode(bm_hdc,TRANSPARENT);
  301. }
  302. if (!text_lines[linepos].col2)
  303. DrawText(bm_hdc,text_lines[linepos++].col1,-1,&r,DT_CENTER);
  304. else
  305. {
  306. RECT r1={0,w_height,w_width/2 - 10,w_height+th};
  307. RECT r2={w_width/2 + 10,w_height,w_width,w_height+th};
  308. DrawText(bm_hdc,text_lines[linepos].col1,-1,&r1,DT_RIGHT);
  309. DrawText(bm_hdc,text_lines[linepos++].col2,-1,&r2,DT_LEFT);
  310. }
  311. }
  312. BitBlt(bm_hdc,0,0,w_width,w_height+th+1,bm_hdc,
  313. 0,1,SRCCOPY);
  314. }
  315. else
  316. {
  317. y--;
  318. BitBlt(bm_hdc,0,0,w_width,w_height+th+1,bm_hdc,
  319. 0,1,SRCCOPY);
  320. }
  321. {
  322. HDC hdc=GetDC(hwnd);
  323. BitBlt(hdc,0,w_offs,w_width,w_height,bm_hdc,0,0,SRCCOPY);
  324. ReleaseDC(hwnd,hdc);
  325. }
  326. return 0;
  327. }
  328. #endif
  329. #endif