a
splitData.h@0:ef757693b9f8, 2019-02-20 (annotated)
- Committer:
- yuto17320508
- Date:
- Wed Feb 20 04:30:28 2019 +0000
- Revision:
- 0:ef757693b9f8
sorry
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yuto17320508 | 0:ef757693b9f8 | 1 | /*intの数をchar型の欲しいbyte数に変換*/ |
yuto17320508 | 0:ef757693b9f8 | 2 | |
yuto17320508 | 0:ef757693b9f8 | 3 | #ifndef __INCLEDED_SPRITDATA_H |
yuto17320508 | 0:ef757693b9f8 | 4 | #define __INCLEDED_SPRITDATA_H |
yuto17320508 | 0:ef757693b9f8 | 5 | |
yuto17320508 | 0:ef757693b9f8 | 6 | void Intobyte(int wannaChange,int byte,char *chardata,int firstElement); |
yuto17320508 | 0:ef757693b9f8 | 7 | //指定されたbyte数のchar型に分解.最初の配列に下八桁が入る。一番左に符号(正だと0,負だと1)。 |
yuto17320508 | 0:ef757693b9f8 | 8 | |
yuto17320508 | 0:ef757693b9f8 | 9 | //例 wantChangeという変数の下23桁(3バイト)を、charnum[5]から順に入れたい。 |
yuto17320508 | 0:ef757693b9f8 | 10 | // →Intobyte(wantChange,3,charnum,5); |
yuto17320508 | 0:ef757693b9f8 | 11 | //これでcharnum[5]にwantChangeの下八桁,でcharnum[6]に下16桁、charnum[7]に下23桁が入り、charnum[7]の一番左に符号が入る。 |
yuto17320508 | 0:ef757693b9f8 | 12 | |
yuto17320508 | 0:ef757693b9f8 | 13 | |
yuto17320508 | 0:ef757693b9f8 | 14 | #endif |