aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-11 22:04:05 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-11 22:04:05 +0800
commit627d814f487ac38d4f9b9b71da9bef46f33b3dad (patch)
tree8fe9ffba654b40ede31575874793b735df0fdf2e /tools
parentf54345e4fc889471513cba99151a5e6a2dcef2d8 (diff)
downloadbullet-lab-remix-627d814f487ac38d4f9b9b71da9bef46f33b3dad.tar.xz
Implement the collision system and a simple effect.
Fixed a problem that keeps the screen black on start up. Replace the build script in dtputil with makefile. Sync with the newest SMELT revision.
Diffstat (limited to 'tools')
-rw-r--r--tools/dtputil/anmutil.cpp5
-rwxr-xr-xtools/dtputil/build3
-rw-r--r--tools/dtputil/dtputil.cpp5
-rw-r--r--tools/dtputil/makefile10
4 files changed, 16 insertions, 7 deletions
diff --git a/tools/dtputil/anmutil.cpp b/tools/dtputil/anmutil.cpp
index 6636e2c..fd5d376 100644
--- a/tools/dtputil/anmutil.cpp
+++ b/tools/dtputil/anmutil.cpp
@@ -45,7 +45,7 @@ int main(int argc,char** argv)
puts(c);
char *ptr=file.getFilePtr(c);
if(!ptr)printf("error\n");else
- printf("size:%lu, first bytes:%c%c%c\n",file.getFileSize(c),*ptr,*(ptr+1),*(ptr+2));
+ printf("size:%u, CRC 0x%08X\n",file.getFileSize(c),file.getFileCRC(c));
file.releaseFilePtr(c);
}
}
@@ -53,7 +53,8 @@ int main(int argc,char** argv)
for(int i=3;i<argc;++i)
{
char *ptr=file.getFilePtr(argv[i]);
- printf("size:%lu, first bytes:%c%c%c\n",file.getFileSize(argv[i]),*ptr,*(ptr+1),*(ptr+2));
+ if(!ptr)printf("error\n");else
+ printf("size:%u, CRC 0x%08X\n",file.getFileSize(argv[i]),file.getFileCRC(argv[i]));
file.releaseFilePtr(argv[i]);
}
file.closeDtp();
diff --git a/tools/dtputil/build b/tools/dtputil/build
deleted file mode 100755
index 7093351..0000000
--- a/tools/dtputil/build
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-g++ dtputil.cpp -Wall -o dtputil -lz -Wl,../../extensions/libsmeltext.a -g
-g++ anmutil.cpp -Wall -o anmutil -lz -Wl,../../extensions/libsmeltext.a -g \ No newline at end of file
diff --git a/tools/dtputil/dtputil.cpp b/tools/dtputil/dtputil.cpp
index 142a679..6563c56 100644
--- a/tools/dtputil/dtputil.cpp
+++ b/tools/dtputil/dtputil.cpp
@@ -27,7 +27,7 @@ int main(int argc,char** argv)
puts(c);
char *ptr=file.getFilePtr(c);
if(!ptr)printf("error\n");else
- printf("size:%lu, first bytes:%c%c%c\n",file.getFileSize(c),*ptr,*(ptr+1),*(ptr+2));
+ printf("size:%u, CRC: 0x%08X\n",file.getFileSize(c),file.getFileCRC(c));
file.releaseFilePtr(c);
}
}
@@ -35,7 +35,8 @@ int main(int argc,char** argv)
for(int i=3;i<argc;++i)
{
char *ptr=file.getFilePtr(argv[i]);
- printf("size:%lu, first bytes:%c%c%c\n",file.getFileSize(argv[i]),*ptr,*(ptr+1),*(ptr+2));
+ if(!ptr)printf("error\n");else
+ printf("size:%u, CRC: 0x%08X\n",file.getFileSize(argv[i]),file.getFileCRC(argv[i]));
file.releaseFilePtr(argv[i]);
}
file.closeDtp();
diff --git a/tools/dtputil/makefile b/tools/dtputil/makefile
new file mode 100644
index 0000000..92ed0fb
--- /dev/null
+++ b/tools/dtputil/makefile
@@ -0,0 +1,10 @@
+CC= g++
+CXXFLAGS= -Wall
+LINK= -lz -lsmeltext
+LINK_FOLDER= -L../../extensions/
+
+all: anmutil dtputil
+anmutil: anmutil.cpp
+ $(CC) anmutil.cpp -o anmutil $(CXXFLAGS) $(LINK_FOLDER) $(LINK)
+dtputil: dtputil.cpp
+ $(CC) dtputil.cpp -o dtputil $(CXXFLAGS) $(LINK_FOLDER) $(LINK) \ No newline at end of file