[過去ログ]
DXライブラリ 総合スレッド その19 [無断転載禁止]©2ch.net (1002レス)
DXライブラリ 総合スレッド その19 [無断転載禁止]©2ch.net http://mevius.5ch.net/test/read.cgi/gamedev/1452005069/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
476: 名前は開発中のものです。 [sage] 2018/09/07(金) 17:09:17.90 ID:stA8I9vh 良く分からんけど、こんな感じの事がしたいの? void LoadData( int t_Width, int t_Height, std::string t_FileName ) { int t_FileHandle = FileRead_open( t_FileName.c_str() ); int t_FileSize = FileRead_size( t_FileName.c_str() ); std::vector< std::vector< int > > t_MapDataVec; int t_LoadNum = 0; char t_Char; //マップの配列を確保 t_MapDataVec.resize( t_Height ); for( int i = 0; i < t_Height; i++ ) { t_MapDataVec[ i ].resize( t_Width ); } //正常に1文字を読み込める間、繰り返す while( ( t_Char = FileRead_getc( t_FileHandle ) ) != -1 ){ if( isdigit( t_Char ) != 0 ){ int t_Sum = 0; do{ t_Sum = ( t_Sum * 10 ) + ( t_Char - '0' ); t_Char = FileRead_getc( t_FileHandle ); }while( isdigit( t_Char ) != 0 ); t_MapDataVec[ t_LoadNum / t_Width ][ t_LoadNum % t_Width ] = t_Sum; ++t_LoadNum; } } FileRead_close( t_FileHandle ); } http://mevius.5ch.net/test/read.cgi/gamedev/1452005069/476
477: 名前は開発中のものです。 [sage] 2018/09/07(金) 20:11:51.17 ID:stA8I9vh >>473 int fh = FileRead_open(s.c_str()); while(fh && getline(fh,buf[line])){line++;} ん? FileRead_readとかのDXライブラリ関数じゃなくて getlineが使われてる様だが? 例えばabc.csvを他のファイルと纏めて Archive.dxaっていうアーカイブにした場合、 std::ifstream t; t.open( "abc.csv");とかしたって読み込まないよ そんなファイル無いんだから DXライブラリ用のArchive作ってるのに それを通常の入出力関数で読み出そうとしてるのがバグの原因だよ http://mevius.5ch.net/test/read.cgi/gamedev/1452005069/477
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.028s