Changeset e43c8d0 in thomson
- Timestamp:
- Mar 24, 2012, 3:26:03 PM (12 years ago)
- Branches:
- main
- Children:
- 4a558d7
- Parents:
- fe55aa5
- Location:
- elec/CrO2/software
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
elec/CrO2/software/Makefile
rfe55aa5 re43c8d0 3 3 ifdef WINDIR 4 4 # windows 5 USBFLAGS = -I/ usr/local/mingw/include6 USBLIBS = -L/ usr/local/mingw/lib -lusb5 USBFLAGS = -I/local/include 6 USBLIBS = -L/local/lib -lusb 7 7 EXE_SUFFIX = .exe 8 8 else … … 14 14 15 15 CC = g++ 16 CPPFLAGS = $(USBFLAGS) -Os -Wall -I/ usr/include/IUP/ -I/local/include -std=c++0x -mthreads17 LIBS = $(USBLIBS) -Os - L/usr/lib/ -mwindows -liup -liupcontrols -liupcd -lcd -lfreetype -lz -lcomctl32 -lole32 -mthreads16 CPPFLAGS = $(USBFLAGS) -Os -Wall -I/local/include -std=c++0x -mthreads 17 LIBS = $(USBLIBS) -Os -mwindows -liup -liupcontrols -liupcd -lcd -lfreetype -lz -lcomctl32 -lole32 -mthreads 18 18 19 19 PROJECT = CrO2 -
elec/CrO2/software/device.cpp
rfe55aa5 re43c8d0 30 30 Device& Device::getDevice() throw(const char*) 31 31 { 32 // If Device constructor throws an exception, instance is not initialized. 33 // So, the constructor will be called again at next getDevice call, until 34 // it succeeds. 32 35 if (instance == NULL) 33 36 instance = new Device(); -
elec/CrO2/software/gui.cpp
rfe55aa5 re43c8d0 108 108 IupSetAttribute(hexEd, "ALIGNMENT", "ALEFT"); 109 109 Callback<Gui, const char*, int, int>::create(hexEd, "VALUE_CB", this, &Gui::matVal); 110 Callback<Gui, int, int, int, const char*>::create(hexEd, "VALUE_EDIT_CB", this, &Gui::setMatVal); 110 111 111 112 // WINDOW LAYOUT … … 227 228 return IUP_DEFAULT; 228 229 } 230 231 232 int Gui::setMatVal(int x, int y, const char* val) 233 { 234 int pos = (y-1) * 16 + (x-1); 235 236 if (file == NULL || selblock < 0 || selblock >= file->getBlockCount()) 237 return 0; 238 239 const Tape::Block& block = file->getBlock(selblock); 240 block.data[pos] = 0; // TODO parse hex val to int 241 242 return 0; 243 } 244 229 245 230 246 const char* Gui::matVal(int y, int x) -
elec/CrO2/software/gui.h
rfe55aa5 re43c8d0 27 27 // Explore 28 28 int selectBlock(int id, int what); 29 int setMatVal(int x, int y, const char* newVal); 29 30 const char* matVal(int y, int x); 30 31 const char* toHex(int val);
Note:
See TracChangeset
for help on using the changeset viewer.