|
|
2006.08.21 Monday | 16:02
2006.08.21 Monday | 10:04
DXライブラリ置き場 ( 開始 ) ふるいむかし
DXライブラリ置き場
関数リファレンスページ
1) ダウンロード
2) C:\dxlib に解凍
3) -----
C:\dxlib\DxLib_VC\プロジェクトに追加すべきファイル_VC用の中身を C:\dxlib に移動
4) プロジェクト作成


5) C++ ソースを追加して以下を貼り付け
6) リビルド後、外部依存関係の DxLib.h を Header Files に移動
関数リファレンスページ
1) ダウンロード
2) C:\dxlib に解凍
3) -----
C:\dxlib\DxLib_VC\プロジェクトに追加すべきファイル_VC用の中身を C:\dxlib に移動
4) プロジェクト作成


5) C++ ソースを追加して以下を貼り付け
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
SetMainWindowText( "ゲームプログラミング" ) ;
// Windows モード
ChangeWindowMode( TRUE ) ;
// DXライブラリ初期化処理
if( DxLib_Init() == -1 ) {
return -1 ;
}
int i;
for( i = 0; i < 100; i += 2 ) {
DrawPixel( 320 , 240+i , 0xffff );
}
// キー入力待ち
WaitKey() ;
// DXライブラリ使用の終了処理
DxLib_End() ;
return 0;
}
6) リビルド後、外部依存関係の DxLib.h を Header Files に移動
2006.08.21 Monday | 09:47
ソースコードテスト ふるいむかし
http://winofsql.jp/VA003334/skywalker060608131301.htm#ttl8
sub _body_text { # 本文・続き・概要
my $cms = shift;
my $entry = shift;
my %var = @_;
if ($entry->body ne '') { # 本文
my $body = $entry->formated_body;
# ここから改造コード
my @line = split(/\n/, $body);
my $i;
my $flg = 0;
for ($i = 0; $i <= $#line; $i++) {
if ($line[$i] =~ /^\@S/ ) {
$flg = 1;
$line[$i] = "<PRE class=\"src_code\">";
next;
}
if ($line[$i] =~ /^\@E/ ) {
$flg = 0;
$line[$i] = "</PRE>";
next;
}
if ( $flg == 1 ) {
$line[$i] =~ s/<br \/>//g;
$line[$i] =~ s/&/&/g;
$line[$i] =~ s/</</g;
$line[$i] =~ s/>/>/g;
open(OUT, "> datafile.txt");
print(OUT "/" . $line[$i] . "/" );
close(OUT);
}
}
$body = join("\n", @line);
# ここまで改造コード
以下オリジナルコードのまま
2006.06.01 Thursday | 04:21
件数0のカテゴリーはリンクしない ふるいむかし
lib\sb\Content.pm
sub _category_tree { # カテゴリーツリー
my %param = (
'cat' => [],
'branch' => undef,
'num' => {},
'no_num' => undef,
@_
);
my $list = '';
foreach my $cat ( @{$param{'cat'}} ) {
next if ($cat->get_option('list') == 1);
next if (!defined($param{'branch'}) and $cat->main ne '');
next if ( defined($param{'branch'}) and $cat->main ne $param{'branch'});
my $text = $cat->text; # code by Fuco. Thanks!
$text = ($text ne '') ? ' title="' . sb::Text->entitize($text) . '"' : '';
if ( int($param{'num'}->{$cat->id}) == 0 ) {
$list .= '<li><b>' . $cat->name . '</b>';
}
else {
$list .= '<li><a href="' . $cat->cat_url . '"' . $text . '>' . $cat->name . '</a>';
}
# $list .= ' (' . int($param{'num'}->{$cat->id}) . ')' if (!$param{'no_num'});
if ($cat->sub ne '') {
$list .= "\n" . '<ul>';
$list .= &_category_tree(
'cat' => $param{'cat'},
'branch' => $cat->id,
'num' => $param{'num'},
'no_num' => $param{'no_num'},
);
$list .= '</ul>';
}
$list .= '</li>' . "\n";
}
return($list);
}
2006.06.01 Thursday | 03:42
カテゴリツリーの横の件数表示削除 ふるいむかし
lib\sb\Content.pmsub _category_tree { # カテゴリーツリー my %param = ( 'cat' => [], 'branch' => undef, 'num' => {}, 'no_num' => undef, @_ ); my $list = ''; foreach my $cat ( @{$param{'cat'}} ) { next if ($cat->get_option('list') == 1); next if (!defined($param{'branch'}) and $cat->main ne ''); next if ( defined($param{'branch'}) and $cat->main ne $param{'branch'}); my $text = $cat->text; # code by Fuco. Thanks! $text = ($text ne '') ? ' title="' . sb::Text->entitize($text) . '"' : ''; $list .= '<li><a href="' . $cat->cat_url . '"' . $text . '>' . $cat->name . '</a>'; # $list .= ' (' . int($param{'num'}->{$cat->id}) . ')' if (!$param{'no_num'}); if ($cat->sub ne '') { $list .= "\n" . '<ul>'; $list .= &_category_tree( 'cat' => $param{'cat'}, 'branch' => $cat->id, 'num' => $param{'num'}, 'no_num' => $param{'no_num'}, ); $list .= '</ul>'; } $list .= '</li>' . "\n"; } return($list); }
2006.04.29 Saturday | 16:25
|
|
