Changeset 247 for cpp/frams/model


Ignore:
Timestamp:
11/07/14 17:51:01 (10 years ago)
Author:
Maciej Komosinski
Message:

Sources support both 32-bit and 64-bit, and more compilers

Location:
cpp/frams/model
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.cpp

    r197 r247  
    129129Model::~Model()
    130130{
    131 delmodel_list.action((long)this);
     131delmodel_list.action((intptr_t)this);
    132132clear();
    133133}
  • cpp/frams/model/modelparts.cpp

    r197 r247  
    163163                        {
    164164                        case 'd': t+=" integer";
    165                         {long a,b,c; if (p.getMinMax(i,a,b,c)>=2) t+=SString::sprintf(" %d..%d",a,b);}
     165                        {paInt a,b,c; if (p.getMinMax(i,a,b,c)>=2) t+=SString::sprintf(" %d..%d",a,b);}
    166166                                break;
    167167                        case 'f': t+=" float";
  • cpp/frams/model/modelparts.h

    r197 r247  
    3838MultiRange *mapped;
    3939enum PartBaseFlags { Selected=1 };
    40 long flags;
     40int flags;
    4141Model *owner;   ///< backlink to the model
    4242
     
    8080Param extraProperties();
    8181Param properties();
    82 long refno;
     82paInt refno;
    8383Pt3D rot;///< rotation angles
    8484
    8585///
    86 long shape;///default=old framsticks compatible, do not mix with shapes>0
     86paInt shape;///default=old framsticks compatible, do not mix with shapes>0
    8787enum Shape {SHAPE_DEFAULT=0, SHAPE_ELLIPSOID=1, SHAPE_CUBOID=2, SHAPE_CYLINDER=3};
    8888double mass,size,density,friction,ingest,assim;
     
    119119public:
    120120// base properties:
    121 long p1_refno,p2_refno; ///< parts' reference numbers
     121paInt p1_refno,p2_refno; ///< parts' reference numbers
    122122
    123123Part *part1,*part2;     ///< references to parts
     
    125125class Pt3D rot; ///< orientation delta between parts expressed as 3 angles
    126126enum Shape {SHAPE_DEFAULT=0, SHAPE_SOLID=1};
    127 long shape;///< default=old framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with shape>0,  solid=merge parts into one physical entity
     127paInt shape;///< default=old framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with shape>0,  solid=merge parts into one physical entity
    128128
    129129Joint();
     
    159159
    160160// do not touch these:
    161 long refno; ///< this joint's reference number
     161paInt refno; ///< this joint's reference number
    162162double stamina;
    163163double stif,rotstif;    ///< stiffness for moving and bending forces
     
    189189ParamEntry *props;
    190190bool ownedprops;//< destructor will free props using ParamObject::freeParamTab
    191 long prefinputs,prefoutput;
    192 long preflocation;
     191paInt prefinputs,prefoutput;
     192paInt preflocation;
    193193int *vectordata;
    194 long visualhints;
     194paInt visualhints;
    195195
    196196//void *impl;
     
    220220    extra inputs may be ignored by the object (depends on the class).
    221221 */
    222 int getPreferredInputs() {return prefinputs;}
     222int getPreferredInputs() {return (int)prefinputs;}
    223223
    224224/** @return 0 if this object doesn't provide useful output signal. */
    225 int getPreferredOutput() {return prefoutput;}
     225int getPreferredOutput() {return (int)prefoutput;}
    226226
    227227/** @return 0 if the object doesn't need any assignment to the body element.
     
    229229    @return 2 = the object prefers to have the Joint ( @see Neuro::attachToJoint() )
    230230 */
    231 int getPreferredLocation() {return preflocation;}
     231int getPreferredLocation() {return (int)preflocation;}
    232232/** vector drawing to be used in neuro net diagram.
    233233    interpretation:
     
    251251 */
    252252int getVisualHints()
    253  {return visualhints;}
     253 {return (int)visualhints;}
    254254
    255255enum Hint
     
    377377SyntParam classProperties(bool handle_defaults_when_saving=true);
    378378// base properties:
    379 long refno; ///< unique reference number (former 'neuro' refno)
    380 
    381 long part_refno; ///< can be used by some items as the part ref#
    382 long joint_refno; ///< can be used by some items as the joint ref#
     379paInt refno; ///< unique reference number (former 'neuro' refno)
     380
     381paInt part_refno; ///< can be used by some items as the part ref#
     382paInt joint_refno; ///< can be used by some items as the joint ref#
    383383
    384384Pt3D pos,rot;   ///< default = zero
     
    451451   or -1 if 'child' is not connected with this Neuro.*/
    452452int findInput(Neuro* child) const;
    453 void removeInput(int refno);
     453void removeInput(paInt refno);
    454454/**    @return reference number of the child connection, like findInput() */
    455455int removeInput(Neuro* child);
     
    470470#ifdef MODEL_V1_COMPATIBLE
    471471friend class OldItems;
    472 long neuro_refno; ///< parent ref# (called neuro_refno for compatibility with old Neuro class), @see moredata
    473 long conn_refno; ///< the other neuron ref# in N-N connections, can be used by some other items
     472paInt neuro_refno; ///< parent ref# (called neuro_refno for compatibility with old Neuro class), @see moredata
     473paInt conn_refno; ///< the other neuron ref# in N-N connections, can be used by some other items
    474474double weight; ///< weight of the N-N connection and (all?) receptors
    475475double inertia,force,sigmo; //!!!
Note: See TracChangeset for help on using the changeset viewer.