uid.pl
来自「symbian 的一个 二维飞行游戏 源码 及相关技术文章」· PL 代码 · 共 36 行
PL
36 行
#!/usr/bin/perl
if(! @ARGV[0]) {
die "Usage <filename>\n";
}
# get uid from .h file
my $uid=readpipe("grep KUidExampleGame ../code/uiinc/CGameApplication.h");
$uid =~ /\{([^\}]*)\}/;
$uid = $1;
my $mapuid=readpipe("grep KMapTypeUid ../code/uisrc/CGameAppUi.cpp");
$mapuid =~ /\{([^\}]*)\}/;
$mapuid = $1;
my $leveluid=readpipe("grep KLevelTypeUid ../code/uisrc/CGameAppUi.cpp");
$leveluid =~ /\{([^\}]*)\}/;
$leveluid = $1;
my $levelNumberuid;
if( @ARGV[0] =~ /^([0-9]*)[._]/ ) {
$levelNumberuid = $1;
}
if(! $levelNumberuid) {
die "Missing level number at start of filename\n";
}
if(@ARGV[0] =~ /.map$/ ) {
print "$uid $mapuid $levelNumberuid\n";
} elsif(@ARGV[0] =~ /.lev$/ ) {
print "$uid $leveluid $levelNumberuid\n";
} else {
die "Not .lev or .map extension to filename\n";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?