root/dev/mods/signature_generator/settings/default.php @ 39

Revision 39, 1.7 KB (checked in by exi, 14 years ago)

created cache/data for several purposes
small changes to comments and kill details to filter for valid killids
added signature generator alpha-version

Line 
1<?php
2// corp
3$box = imagettfbbox(10, 0, 'fonts/GUNSHIP2.TTF', $corp->getName());
4$width = $box[4];
5imagettftext($im, 10, 0, 319-$width, 71, $black, 'fonts/GUNSHIP2.TTF', $corp->getName());
6imagettftext($im, 10, 0, 318-$width, 70, $red, 'fonts/GUNSHIP2.TTF', $corp->getName());
7
8// player
9$box = imagettfbbox(16, 0, 'fonts/GUNSHIP2.TTF', $name);
10$width = $box[4];
11imagettftext($im, 16, 0, 319-$width, 91, $black, 'fonts/GUNSHIP2.TTF', $name);
12imagettftext($im, 16, 0, 318-$width, 90, $red, 'fonts/GUNSHIP2.TTF', $name);
13
14// time, victim, victim corp and ship killed
15imagettftext($im, 11, 0, 39, 16, $black, 'fonts/spaceage.ttf', $kill->getTimeStamp());
16imagettftext($im, 11, 0, 38, 15, $white, 'fonts/spaceage.ttf', $kill->getTimeStamp());
17imagettftext($im, 11, 0, 39, 26, $black, 'fonts/spaceage.ttf', $kill->getVictimName());
18imagettftext($im, 11, 0, 38, 25, $white, 'fonts/spaceage.ttf', $kill->getVictimName());
19imagettftext($im, 11, 0, 39, 36, $black, 'fonts/spaceage.ttf', $kill->getVictimCorpName());
20imagettftext($im, 11, 0, 38, 35, $white, 'fonts/spaceage.ttf', $kill->getVictimCorpName());
21
22imagettftext($im, 11, 0, 6, 46, $black, 'fonts/spaceage.ttf', $kill->getVictimShipName());
23imagettftext($im, 11, 0, 5, 45, $white, 'fonts/spaceage.ttf', $kill->getVictimShipName());
24
25// ship
26$sid = $kill->victimshipexternalid_;
27$img = imagecreatefrompng("img/ships/64_64/".$sid.".png");
28imagecopyresized($im, $img, 5, 5, 0, 0, 30, 30, 64, 64);
29
30
31// player portrait
32$pid = $pilot->row_['plt_externalid'];
33if (!$pid)
34{
35    $pid = 0;
36}
37$img = imagecreatefromjpeg("cache/portraits/".$pid."_512.jpg");
38imagefilledrectangle($im, 318, 18, 392, 92, $greyred_trans);
39imagecopyresized($im, $img, 320, 20, 0, 0, 70, 70, 512, 512);
40imagedestroy($img);
41?>
Note: See TracBrowser for help on using the browser.